hokein added inline comments.

================
Comment at: clang-move/ClangMove.cpp:280
       assert(It < CurrentNamespaces.rend());
-      NewCode += "} // namespace " + *It + "\n";
+      NewCode += "} // namespace " + *It + "\n\n";
     }
----------------
hokein wrote:
> ioeric wrote:
> > Wouldn't this create something like:
> > ```
> > namespace x {
> > namespace y {
> > ...
> > } // namespace y
> >   <----------------------------extra \n.
> > } // namespace x
> > ```
> No. This code is for nested namespace. In your case, there should be a 
> declaration after `} // namespace y` like:
> 
> ```
> namespace x {
> namespace y {
> ...
> } // namespace y
> 
> int A::f() {}
> } // namespace x
> ```
Oh, I see your meaning here. This case could be happened if the loop runs 
multiple times. Looking to it.


https://reviews.llvm.org/D26493



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

Reply via email to