Previously, a \n might be left in the old namespace and thus not copied to the new namespace, which is bad.
Details
Diff Detail
- Build Status
Buildable 2554 Build 2554: arc lint + arc unit
Event Timeline
change-namespace/ChangeNamespace.cpp | ||
---|---|---|
563 | maybe i am missing smth, to be honest i somehow think this code is "hacky" / looks like a "workaround", so don't like the idea of creating a replacement only for extracting the offset / filepath. |
- Get rid of hacky replacement.
change-namespace/ChangeNamespace.cpp | ||
---|---|---|
563 | You are right; I was being lazy... remove the hack ;-) |
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...
change-namespace/ChangeNamespace.cpp | ||
---|---|---|
570 | Maybe use MoveNs.Offset instead of recalling SM.getFileOffset(Start); |
maybe i am missing smth, to be honest i somehow think this code is "hacky" / looks like a "workaround", so don't like the idea of creating a replacement only for extracting the offset / filepath.
I would prefer to refactor this (+ SourceManager ?) to get rid of these hacks (they create extra "tech debt" plus decrease the readability)