From 2b6ec65696922432c60da5411c8b2ecd3264864b Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 31 Aug 2018 03:51:33 +0000 Subject: [PATCH] [clang-move] Explicitly ignore implicit UsingDirectiveDecls instead of depending on them missing source locations This is adjustment to allow the logic to work even if implicit UsingDirectiveDecls get actual source locations. There should be no functionality change. llvm-svn: 341161 --- clang-tools-extra/clang-move/ClangMove.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-move/ClangMove.cpp b/clang-tools-extra/clang-move/ClangMove.cpp index eac6fcd0ec73..f20cf1ec4ca2 100644 --- a/clang-tools-extra/clang-move/ClangMove.cpp +++ b/clang-tools-extra/clang-move/ClangMove.cpp @@ -558,7 +558,8 @@ void ClangMoveTool::registerMatchers(ast_matchers::MatchFinder *Finder) { // namespace, these decls are always copied to new.h/cc. Those in classes, // functions are covered in other matchers. Finder->addMatcher(namedDecl(anyOf(usingDecl(IsOldCCTopLevelDecl), - usingDirectiveDecl(IsOldCCTopLevelDecl), + usingDirectiveDecl(unless(isImplicit()), + IsOldCCTopLevelDecl), typeAliasDecl(IsOldCCTopLevelDecl)), notInMacro()) .bind("using_decl"),