aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Tooling/Refactoring/Rename/USRFinder.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-19 07:02:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-19 07:02:30 +0000
commitde51d671486b6ac9a2ad9ee5fcfdb1a23cc59238 (patch)
tree17ff629bd1f00b82d8dbb66a022e2f59e218c3c2 /include/clang/Tooling/Refactoring/Rename/USRFinder.h
parent8746d127c04f5bbaf6c6e88cef8606ca5a6a54e9 (diff)
Vendor import of clang trunk r308421:vendor/clang/clang-trunk-r308421
Notes
Notes: svn path=/vendor/clang/dist/; revision=321186 svn path=/vendor/clang/clang-trunk-r308421/; revision=321187; tag=vendor/clang/clang-trunk-r308421
Diffstat (limited to 'include/clang/Tooling/Refactoring/Rename/USRFinder.h')
-rw-r--r--include/clang/Tooling/Refactoring/Rename/USRFinder.h34
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