summaryrefslogtreecommitdiff
path: root/clang-tools-extra/change-namespace
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2017-10-16 08:20:10 +0000
committerEric Liu <ioeric@google.com>2017-10-16 08:20:10 +0000
commitce9f189201230664b9d0626fe8328884850692cf (patch)
tree3ae27efca99239d6fd29be4604a267fd679ba185 /clang-tools-extra/change-namespace
parent0cfb203f4620543f4c04f9b8ab22c6418ba5fa94 (diff)
[change-namespace] do not change type locs in defaulted functions.
Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38893
Diffstat (limited to 'clang-tools-extra/change-namespace')
-rw-r--r--clang-tools-extra/change-namespace/ChangeNamespace.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/change-namespace/ChangeNamespace.cpp b/clang-tools-extra/change-namespace/ChangeNamespace.cpp
index 0b90de414c5..bb3867c8ed7 100644
--- a/clang-tools-extra/change-namespace/ChangeNamespace.cpp
+++ b/clang-tools-extra/change-namespace/ChangeNamespace.cpp
@@ -427,7 +427,8 @@ void ChangeNamespaceTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
unless(templateSpecializationType())))))),
hasParent(nestedNameSpecifierLoc()),
hasAncestor(isImplicit()),
- hasAncestor(UsingShadowDeclInClass))),
+ hasAncestor(UsingShadowDeclInClass),
+ hasAncestor(functionDecl(isDefaulted())))),
hasAncestor(decl().bind("dc")))
.bind("type"),
this);
@@ -451,6 +452,7 @@ void ChangeNamespaceTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
specifiesType(hasDeclaration(DeclMatcher.bind("from_decl"))))),
unless(anyOf(hasAncestor(isImplicit()),
hasAncestor(UsingShadowDeclInClass),
+ hasAncestor(functionDecl(isDefaulted())),
hasAncestor(typeLoc(loc(qualType(hasDeclaration(
decl(equalsBoundNode("from_decl"))))))))))
.bind("nested_specifier_loc"),