hokein added a comment.

Looks almost good. A few comments.

Comment at: change-namespace/ChangeNamespace.cpp:467
@@ +466,3 @@
+  const NamedDecl *TargetDecl =
+      UsingDeclaration->shadow_begin()->getTargetDecl();
+  std::string TargetDeclName = TargetDecl->getQualifiedNameAsString();
It is not always accurate to use the first using-decls. It's fine now since 
don't have better solution for this. Add a `FIXME`.

Comment at: unittests/change-namespace/ChangeNamespaceTests.cpp:243
@@ +242,3 @@
+                     "typedef nc::SAME IDENTICAL;\n"
+                     "void f(nd::SAME Same) {}\n"
+                     "} // namespace nb\n"
How about the case `void f2(SAME Same){}`? Is it changed to `::na::nc::SAME` 
too? Make sense to add it to the test.

BTW, does the patch cover using alias ("using A = x::y::z;") case? If yes, also 
add to the test.


cfe-commits mailing list

Reply via email to