15 #ifndef LLVM_CLANG_TOOLING_REFACTOR_RECURSIVE_SYMBOL_VISITOR_H 16 #define LLVM_CLANG_TOOLING_REFACTOR_RECURSIVE_SYMBOL_VISITOR_H 34 : SM(SM), LangOpts(LangOpts) {}
44 return isa<CXXConversionDecl>(D) ?
true : visit(D, D->
getLocation());
90 if (
const auto *TemplateTypeParm =
91 dyn_cast<TemplateTypeParmType>(Loc.
getType())) {
92 if (!visit(TemplateTypeParm->getDecl(), TypeBeginLoc, TypeEndLoc))
95 if (
const auto *TemplateSpecType =
96 dyn_cast<TemplateSpecializationType>(Loc.
getType())) {
97 if (!visit(TemplateSpecType->getTemplateName().getAsTemplateDecl(),
98 TypeBeginLoc, TypeEndLoc))
102 if (TP->getTypeClass() == clang::Type::Record)
103 return visit(TP->getAsCXXRecordDecl(), TypeBeginLoc, TypeEndLoc);
142 #endif // LLVM_CLANG_TOOLING_REFACTOR_RECURSIVE_SYMBOL_VISITOR_H NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
NamedDecl * getDecl() const
The base class of the type hierarchy.
Represent a C++ namespace.
Wrapper for source info for typedefs.
Represents a C++ constructor within a class.
SourceLocation getLocalBeginLoc() const
Retrieve the location of the beginning of this component of the nested-name-specifier.
const Type * getTypePtr() const
Base wrapper for a particular "section" of type source info.
FieldDecl * getField() const
For a field offsetof node, returns the field.
A C++ nested-name-specifier augmented with source location information.
Represents a member of a struct/union/class.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
SourceLocation getLocalEndLoc() const
Retrieve the location of the end of this component of the nested-name-specifier.
Helper class for OffsetOfExpr.
A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...
SourceLocation getLocation() const
SourceLocation getBeginLoc() const
Get the begin source location.
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
This represents one expression.
static SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset, const SourceManager &SM, const LangOptions &LangOpts)
Computes the source location just past the end of the token at this source location.
Kind getKind() const
Determine what kind of offsetof node this is.
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
const OffsetOfNode & getComponent(unsigned Idx) const
SourceLocation getEndLoc() const LLVM_READONLY
Encodes a location in the source.
bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Recursively visit a C++ nested-name-specifier with location information.
Dataflow Directional Tag Classes.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
QualType getType() const
Get the type for which this source info wrapper provides information.
TypedefNameDecl * getTypedefNameDecl() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
unsigned getNumComponents() const
A reference to a declared variable, function, enum, etc.
A trivial tuple used to represent a source range.
This represents a decl that may have a name.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
This class handles loading and caching of source files into memory.
SourceLocation getLocation() const