[clang-tools-extra] r341161 - [clang-move] Explicitly ignore implicit UsingDirectiveDecls instead of depending on them missing source locations

Argyrios Kyrtzidis via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 20:51:33 PDT 2018


Author: akirtzidis
Date: Thu Aug 30 20:51:33 2018
New Revision: 341161

URL: http://llvm.org/viewvc/llvm-project?rev=341161&view=rev
Log:
[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.

Modified:
    clang-tools-extra/trunk/clang-move/ClangMove.cpp

Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-move/ClangMove.cpp?rev=341161&r1=341160&r2=341161&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-move/ClangMove.cpp (original)
+++ clang-tools-extra/trunk/clang-move/ClangMove.cpp Thu Aug 30 20:51:33 2018
@@ -558,7 +558,8 @@ void ClangMoveTool::registerMatchers(ast
   // 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"),




More information about the cfe-commits mailing list