[PATCH] D28282: [change-namespace] get whitespaces right when moving old namespaces.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 06:53:34 PST 2017


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

LGTM with some nits.

Would be clearer to elaborate more descriptions in the commit message. Looks like the patch actually resolves newline character "\n" rather than whitespace...



================
Comment at: change-namespace/ChangeNamespace.cpp:568
+  MoveNs.Length =
+      SM.getFileOffset(NsDecl->getRBraceLoc()) - SM.getFileOffset(Start);
 
----------------
Maybe use `MoveNs.Offset` instead of recalling `SM.getFileOffset(Start);`


https://reviews.llvm.org/D28282





More information about the cfe-commits mailing list