diff options
Diffstat (limited to 'include/clang/Tooling/Refactoring/Rename/USRFinder.h')
-rw-r--r-- | include/clang/Tooling/Refactoring/Rename/USRFinder.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/clang/Tooling/Refactoring/Rename/USRFinder.h b/include/clang/Tooling/Refactoring/Rename/USRFinder.h index 28d541af43c0..b74a5d7f70af 100644 --- a/include/clang/Tooling/Refactoring/Rename/USRFinder.h +++ b/include/clang/Tooling/Refactoring/Rename/USRFinder.h @@ -18,13 +18,9 @@ #include "clang/AST/AST.h" #include "clang/AST/ASTContext.h" -#include "clang/ASTMatchers/ASTMatchFinder.h" #include <string> #include <vector> -using namespace llvm; -using namespace clang::ast_matchers; - namespace clang { class ASTContext; @@ -48,36 +44,6 @@ const NamedDecl *getNamedDeclFor(const ASTContext &Context, // Converts a Decl into a USR. std::string getUSRForDecl(const Decl *Decl); -// FIXME: Implement RecursiveASTVisitor<T>::VisitNestedNameSpecifier instead. -class NestedNameSpecifierLocFinder : public MatchFinder::MatchCallback { -public: - explicit NestedNameSpecifierLocFinder(ASTContext &Context) - : Context(Context) {} - - std::vector<NestedNameSpecifierLoc> getNestedNameSpecifierLocations() { - addMatchers(); - Finder.matchAST(Context); - return Locations; - } - -private: - void addMatchers() { - const auto NestedNameSpecifierLocMatcher = - nestedNameSpecifierLoc().bind("nestedNameSpecifierLoc"); - Finder.addMatcher(NestedNameSpecifierLocMatcher, this); - } - - void run(const MatchFinder::MatchResult &Result) override { - const auto *NNS = Result.Nodes.getNodeAs<NestedNameSpecifierLoc>( - "nestedNameSpecifierLoc"); - Locations.push_back(*NNS); - } - - ASTContext &Context; - std::vector<NestedNameSpecifierLoc> Locations; - MatchFinder Finder; -}; - } // end namespace tooling } // end namespace clang |