hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

LGTM with two nits.



================
Comment at: change-namespace/ChangeNamespace.cpp:475
+  // If there is no outer namespace (i.e. DiffOldNamespace is empty), the new
+  // namespace will be a nested namespace in the old namespace
   const NamespaceDecl *OuterNs = getOuterNamespace(NsDecl, DiffOldNamespace);
----------------
missing a trailing `.`.


================
Comment at: change-namespace/ChangeNamespace.cpp:477
   const NamespaceDecl *OuterNs = getOuterNamespace(NsDecl, DiffOldNamespace);
-  SourceLocation LocAfterNs =
-      getStartOfNextLine(OuterNs->getRBraceLoc(), *Result.SourceManager,
-                         Result.Context->getLangOpts());
-  assert(LocAfterNs.isValid() &&
-         "Failed to get location after DiffOldNamespace");
+  SourceLocation InsertionLoc;
+  if (OuterNs) {
----------------
How about `SourceLocation InsertionLoc = Start;` so that you don't need else 
statement below?


https://reviews.llvm.org/D26456



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

Reply via email to