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 below, you only use the first element of it. The > QualifiedSymbol should always be a fully-qualified name with at least 1 > namespace qualifier in the code, right? `QualifiedSymbol` can be in the global namespace, so `SymbolSplitted` could be empty after `pop_back`. ================ 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: > Why skipping the first element? And use `is_contained` instead? See newly added comments for reasoning. https://reviews.llvm.org/D30493 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits