bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land.
Only nits below. ================ Comment at: change-namespace/ChangeNamespace.cpp:232 + auto &DeclNsTop = DeclNsSplitted.front(); + for (auto &Ns : NsNameSplitted) + if (Ns == DeclNsTop) ---------------- This could use llvm::is_contained ================ Comment at: change-namespace/ChangeNamespace.cpp:237 + } + // Since there is already an overlap namespace, we know that `DeclName` can be + // shortened. ---------------- I guess you could add here that you're now searching the longest common prefix. ================ Comment at: change-namespace/ChangeNamespace.cpp:243 + auto NsE = NsNameSplitted.end(); + for (; DeclI != DeclE && NsI != NsE && *DeclI == *NsI; ++DeclI, ++NsI) { } ---------------- Not sure if this should be a while loop. It's so ugly right now :( https://reviews.llvm.org/D29176 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits