The header guard generated by clang-move isn't always a perfect
style, just avoid getting the header included multiple times during
compiling period.
Also, we can use llvm-Header-guard clang-tidy check to correct the guard
automatically.
Paths
| Differential D25610
[clang-move] Add header guard for the new header. ClosedPublic Authored by hokein on Oct 14 2016, 5:22 AM.
Details Summary The header guard generated by clang-move isn't always a perfect Also, we can use llvm-Header-guard clang-tidy check to correct the guard
Diff Detail
Event Timelinehokein updated this object. ioeric edited edge metadata. Comment ActionsLg
This revision is now accepted and ready to land.Oct 14 2016, 5:32 AM
Closed by commit rL284233: [clang-move] Add header guard for the new header. (authored by hokein). · Explain WhyOct 14 2016, 6:10 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 74663 clang-move/ClangMove.cpp
test/clang-move/move-class.cpp
test/clang-move/move-multiple-classes.cpp
unittests/clang-move/ClangMoveTests.cpp
|
Might not quite related to this patch:
Considering how tooling::Replacements::add(...) is implemented now, it's quite inefficient to use addOrMergeReplacement in you case since almost all replacements will conflict, which would require expensive conflict-resolving merge. I think it would be cleaner and easier if you just concatenate all Decls and create a single insertion replacement instead of keeping merging replacements at offset 0.