Go to the documentation of this file.
15 #ifndef LLVM_CLANG_TOOLING_REFACTORING_RECURSIVESYMBOLVISITOR_H
16 #define LLVM_CLANG_TOOLING_REFACTORING_RECURSIVESYMBOLVISITOR_H
34 :
SM(
SM), LangOpts(LangOpts) {}
65 return visit(
Expr->getFoundDecl(),
Expr->getLocation());
69 return visit(
Expr->getFoundDecl().getDecl(),
Expr->getMemberLoc());
73 for (
unsigned I = 0, E = S->getNumComponents(); I != E; ++I) {
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);
127 if (D.isFieldDesignator() && D.getField()) {
129 if (!visit(
Decl, D.getFieldLoc(), D.getFieldLoc()))
153 #endif // LLVM_CLANG_TOOLING_REFACTORING_RECURSIVESYMBOLVISITOR_H
SourceLocation getLocalEndLoc() const
Retrieve the location of the end of this component of the nested-name-specifier.
Represents a C++ constructor within a class.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
A trivial tuple used to represent a source range.
Represents a C99 designated initializer expression.
Encodes a location in the source.
This represents a decl that may have a name.
Kind getKind() const
Determine what kind of offsetof node this is.
Represents a member of a struct/union/class.
SourceLocation getLocalBeginLoc() const
Retrieve the location of the beginning of this component of the nested-name-specifier.
SourceLocation getEndLoc() const LLVM_READONLY
const Type * getTypePtr() const
This class handles loading and caching of source files into memory.
The base class of the type hierarchy.
SourceLocation getBeginLoc() const
Get the begin source location.
A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...
FieldDecl * getField() const
For a field offsetof node, returns the field.
A C++ nested-name-specifier augmented with source location information.
Helper class for OffsetOfExpr.
llvm::MutableArrayRef< Designator > designators()
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
Decl - This represents one declaration (or definition), e.g.
Base wrapper for a particular "section" of type source info.
Represents a single C99 designator.
QualType getType() const
Get the type for which this source info wrapper provides information.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
TypedefNameDecl * getTypedefNameDecl() const
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
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.
This represents one expression.
SourceLocation getLocation() const
A reference to a declared variable, function, enum, etc.
Represent a C++ namespace.
bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Recursively visit a C++ nested-name-specifier with location information.
Wrapper for source info for typedefs.