clang  9.0.0
Typedefs | Functions
Transformer.cpp File Reference
#include "clang/Tooling/Refactoring/Transformer.h"
#include "clang/AST/Expr.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/Refactoring/AtomicChange.h"
#include "clang/Tooling/Refactoring/SourceCode.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include <deque>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for Transformer.cpp:

Go to the source code of this file.

Typedefs

using MatchResult = MatchFinder::MatchResult
 

Functions

static bool isOriginMacroBody (const clang::SourceManager &SM, clang::SourceLocation Loc)
 
static bool isBaseOf (ASTNodeKind A, ASTNodeKind B)
 
static ASTNodeKind findCommonKind (const SmallVectorImpl< RewriteRule::Case > &Cases)
 
static std::vector< DynTypedMatcher > taggedMatchers (StringRef TagBase, const SmallVectorImpl< RewriteRule::Case > &Cases)
 
static DynTypedMatcher joinCaseMatchers (const RewriteRule &Rule)
 

Typedef Documentation

◆ MatchResult

using MatchResult = MatchFinder::MatchResult

Definition at line 37 of file Transformer.cpp.

Function Documentation

◆ findCommonKind()

static ASTNodeKind findCommonKind ( const SmallVectorImpl< RewriteRule::Case > &  Cases)
static

Definition at line 125 of file Transformer.cpp.

References isBaseOf().

Referenced by joinCaseMatchers().

◆ isBaseOf()

static bool isBaseOf ( ASTNodeKind  A,
ASTNodeKind  B 
)
static

Mimic the implicit conversions of Matcher<>.

  • From Matcher<Type> to Matcher<QualType>
  • From Matcher<Base> to Matcher<Derived>

Definition at line 113 of file Transformer.cpp.

References clang::ast_type_traits::ASTNodeKind::isBaseOf(), and clang::ast_type_traits::ASTNodeKind::isSame().

Referenced by findCommonKind(), clang::ast_type_traits::ASTNodeKind::hasPointerIdentity(), clang::ast_type_traits::DynTypedNode::DenseMapInfo::isEqual(), and clang::ast_type_traits::ASTNodeKind::isNone().

◆ isOriginMacroBody()

static bool isOriginMacroBody ( const clang::SourceManager SM,
clang::SourceLocation  Loc 
)
static

◆ joinCaseMatchers()

static DynTypedMatcher joinCaseMatchers ( const RewriteRule Rule)
static

◆ taggedMatchers()

static std::vector<DynTypedMatcher> taggedMatchers ( StringRef  TagBase,
const SmallVectorImpl< RewriteRule::Case > &  Cases 
)
static

Definition at line 148 of file Transformer.cpp.

Referenced by joinCaseMatchers().