[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
This commit is contained in:
Argyrios Kyrtzidis 2018-08-31 03:51:33 +00:00
parent 53cb061b32
commit 2b6ec65696
1 changed files with 2 additions and 1 deletions

View File

@ -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"),