This is an archive of the discontinued LLVM Phabricator instance.

[change-namespace] consider typedef/using alias decls in the moved namespace.
ClosedPublic

Authored by ioeric on Nov 13 2016, 10:01 AM.

Details

Summary

If a TypeLoc refers to a type alias defined in the moved namespace, we do not need to update its specifier since the type alias decl will be moved along with the type reference.

Diff Detail

Repository
rL LLVM

Event Timeline

ioeric updated this revision to Diff 77751.Nov 13 2016, 10:01 AM
ioeric retitled this revision from to [change-namespace] consider typedef/using alias decls..
ioeric updated this object.
ioeric updated this revision to Diff 77791.Nov 14 2016, 4:59 AM
  • Added implementation.
ioeric updated this revision to Diff 77792.Nov 14 2016, 5:02 AM
  • Make namespace prefix end with ::
ioeric retitled this revision from [change-namespace] consider typedef/using alias decls. to [change-namespace] consider typedef/using alias decls in the moved namespace..
ioeric updated this object.
ioeric added a subscriber: cfe-commits.
hokein accepted this revision.Nov 14 2016, 7:33 AM
hokein edited edge metadata.

looks good.

unittests/change-namespace/ChangeNamespaceTests.cpp
829 ↗(On Diff #77792)

Any reason to change the existing test case?

This revision is now accepted and ready to land.Nov 14 2016, 7:33 AM
ioeric marked an inline comment as done.Nov 14 2016, 7:36 AM
ioeric added inline comments.
unittests/change-namespace/ChangeNamespaceTests.cpp
829 ↗(On Diff #77792)

This was a typo that I found when manually running unit tests (instead of using check clang-tools-extra). In the old code, using na::CA; does not compile, so I figure I might just fix here as well.

This revision was automatically updated to reflect the committed changes.
ioeric marked an inline comment as done.

Test comment.