This is an archive of the discontinued LLVM Phabricator instance.

[change-namespace] fix name qualifiers in UsingShadowDecl and NestedNameSpecifier.
ClosedPublic

Authored by ioeric on Sep 20 2016, 1:49 PM.

Diff Detail

Event Timeline

ioeric updated this revision to Diff 71983.Sep 20 2016, 1:49 PM
ioeric retitled this revision from to [change-namespace] fix name qualifiers in UsingShadowDecl and NestedNameSpecifier..
ioeric updated this object.
ioeric added a reviewer: hokein.
ioeric added a subscriber: cfe-commits.
hokein edited edge metadata.Sep 21 2016, 3:20 AM

Looks almost good. A few comments.

change-namespace/ChangeNamespace.cpp
467

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.

unittests/change-namespace/ChangeNamespaceTests.cpp
243

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.

ioeric updated this revision to Diff 72018.Sep 21 2016, 3:33 AM
ioeric marked 2 inline comments as done.
ioeric edited edge metadata.
  • Addressed review comments.
hokein accepted this revision.Sep 21 2016, 7:27 AM
hokein edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Sep 21 2016, 7:27 AM
This revision was automatically updated to reflect the committed changes.