ioeric added inline comments.

================
Comment at: change-namespace/ChangeNamespace.cpp:200
@@ +199,3 @@
+  while (!NsSplitted.empty()) {
+    // FIXME: consider code style for comments.
+    Code = ("namespace " + NsSplitted.back() + " {\n" + Code +
----------------
hokein wrote:
> Doesn't `formatAndApplyAllReplacements` format the comments for us?
formatter only adds/removes white spaces I think. 
================
Comment at: change-namespace/ChangeNamespace.cpp:400
@@ +399,3 @@
+  assert(Consumed && "Expect OldNS to start with OldNamespace.");
+  (void)Consumed;
+  const std::string NewNs = (NewNamespace + Postfix).str();
----------------
hokein wrote:
> how about `assert(Postfix.consume_front(OldNamespace) && "Expect OldNS to 
> start with OldNamespace.");`?
The problem with this is that `Postfix.consume_front(OldNamespace)` won't be 
executed if assertion is turned off.


https://reviews.llvm.org/D24183



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to