[PATCH] D26493: [clang-move] Make the output code look more pretty.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 14 07:37:50 PST 2016
hokein added inline comments.
================
Comment at: clang-move/ClangMove.cpp:280
assert(It < CurrentNamespaces.rend());
- NewCode += "} // namespace " + *It + "\n";
+ NewCode += "} // namespace " + *It + "\n\n";
}
----------------
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
```
https://reviews.llvm.org/D26493
More information about the cfe-commits
mailing list