diff options
Diffstat (limited to 'include/clang/Tooling/Refactoring/Rename/USRFindingAction.h')
-rw-r--r-- | include/clang/Tooling/Refactoring/Rename/USRFindingAction.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h b/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h index 8aafee95bc09..f1c5ae60f875 100644 --- a/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h +++ b/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h @@ -23,11 +23,25 @@ namespace clang { class ASTConsumer; +class ASTContext; class CompilerInstance; class NamedDecl; namespace tooling { +/// Returns the canonical declaration that best represents a symbol that can be +/// renamed. +/// +/// The following canonicalization rules are currently used: +/// +/// - A constructor is canonicalized to its class. +/// - A destructor is canonicalized to its class. +const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl); + +/// Returns the set of USRs that correspond to the given declaration. +std::vector<std::string> getUSRsForDeclaration(const NamedDecl *ND, + ASTContext &Context); + struct USRFindingAction { USRFindingAction(ArrayRef<unsigned> SymbolOffsets, ArrayRef<std::string> QualifiedNames, bool Force) |