clang 8.0.0

USRFinder.h
Go to the documentation of this file.
1 //===--- USRFinder.h - Clang refactoring library --------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// Methods for determining the USR of a symbol at a location in source
12 /// code.
13 ///
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CLANG_TOOLING_REFACTOR_RENAME_USR_FINDER_H
17 #define LLVM_CLANG_TOOLING_REFACTOR_RENAME_USR_FINDER_H
18
19 #include "clang/AST/AST.h"
20 #include "clang/AST/ASTContext.h"
21 #include <string>
22 #include <vector>
23
24 namespace clang {
25
26 class ASTContext;
27 class Decl;
28 class SourceLocation;
29 class NamedDecl;
30
31 namespace tooling {
32
33 // Given an AST context and a point, returns a NamedDecl identifying the symbol
34 // at the point. Returns null if nothing is found at the point.
35 const NamedDecl *getNamedDeclAt(const ASTContext &Context,
36 const SourceLocation Point);
37
38 // Given an AST context and a fully qualified name, returns a NamedDecl
39 // identifying the symbol with a matching name. Returns null if nothing is
40 // found for the name.
41 const NamedDecl *getNamedDeclFor(const ASTContext &Context,
42 const std::string &Name);
43
44 // Converts a Decl into a USR.
45 std::string getUSRForDecl(const Decl *Decl);
46
47 } // end namespace tooling
48 } // end namespace clang
49
50 #endif // LLVM_CLANG_TOOLING_REFACTOR_RENAME_USR_FINDER_H
ASTContext.h
Defines the clang::ASTContext interface.
AST.h
clang::CodeGen::AlignmentSource::Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::tooling::getNamedDeclFor
const NamedDecl * getNamedDeclFor(const ASTContext &Context, const std::string &Name)
Definition: USRFinder.cpp:128
clang::tooling::getNamedDeclAt
const NamedDecl * getNamedDeclAt(const ASTContext &Context, const SourceLocation Point)
Definition: USRFinder.cpp:77
clang::tooling::getUSRForDecl
std::string getUSRForDecl(const Decl *Decl)
Definition: USRFinder.cpp:135
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22