[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298363: [change-namespace] avoid adding leading '::' when possible. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D30493?vs=92475&id=92476#toc Repository: rL LLVM https://r

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 92475. ioeric added a comment. - fixed newly added tests. https://reviews.llvm.org/D30493 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:296 +assert(!NsSplitted.empty()); +for (auto I = NsSplitted.begin() + 1, E = NsSplitted.end(); I != E; ++I) { + if (*I == SymbolSplitted.front()) hokein wrote: > ioeric wr

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Sorry, I missed this patch. LGTM with one nit. Comment at: change-namespace/ChangeNamespace.cpp:296 +assert(!NsSplitted.empty()); +for (auto I = NsSplitted.begin() +

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping ;) https://reviews.llvm.org/D30493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 92138. ioeric marked 3 inline comments as done. ioeric added a comment. - Merged with origin/master - Addressed comments. Merged with origin/master. https://reviews.llvm.org/D30493 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/Ch

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:291 + assert(!SymbolSplitted.empty()); + SymbolSplitted.pop_back(); + hokein wrote: > Is this needed? Looks like you are removing the name of the symbol here, but > from the code be

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I like removing the leading "::" when possible. :) Comment at: change-namespace/ChangeNamespace.cpp:291 + assert(!SymbolSplitted.empty()); + SymbolSplitted.pop_back(); + Is this needed? Looks like you are removing the name of the symbo

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. When changing namespaces, the tool adds leading "::" to references that need to be fully-qualified, which would affect readability. We avoid adding "::" when the symbol name does not conflict with the new namespace name. For example, a symbol name "na::nb::X" conflic