clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

USRFinder.h
Go to the documentation of this file.
1 //===--- tools/extra/clang-rename/USRFinder.h - Clang rename tool ---------===//
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 /// \brief Methods for determining the USR of a symbol at a location in source
12 /// code.
13 ///
14 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H
16 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H
17
18 #include <string>
19
20 namespace clang {
21 class ASTContext;
22 class Decl;
23 class SourceLocation;
24 class NamedDecl;
25
26 namespace rename {
27
28 // Given an AST context and a point, returns a NamedDecl identifying the symbol
29 // at the point. Returns null if nothing is found at the point.
30 const NamedDecl *getNamedDeclAt(const ASTContext &Context,
31 const SourceLocation Point);
32
33 // Converts a Decl into a USR.
34 std::string getUSRForDecl(const Decl *Decl);
35
36 }
37 }
38
39 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H
Point
const SourceLocation Point
Definition: USRFinder.cpp:123
clang::rename::getNamedDeclAt
const NamedDecl * getNamedDeclAt(const ASTContext &Context, const SourceLocation Point)
Definition: USRFinder.cpp:127
clang::rename::getUSRForDecl
std::string getUSRForDecl(const Decl *Decl)
Definition: USRFinder.cpp:151
Context
ClangTidyContext & Context
Definition: ClangTidy.cpp:93