This avoid inserting #include into:
- raw string literals containing #include.
- #if block.
- Special #include among declarations (e.g. functions).
Paths
| Differential D26909
[ClangFormat] Only insert #include into the #include block in the beginning of the file. ClosedPublic Authored by ioeric on Nov 21 2016, 4:53 AM.
Details Summary This avoid inserting #include into:
Diff Detail
Event TimelineComment Actions @djasper This is not very urgent. Feel free to leave it until you are back from vacation :) ioeric retitled this revision from [ClangFormat] Do not insert #include into code after #include block in the beginning of the file. to [ClangFormat] Only insert #include into the #include block in the beginning of the file..Nov 21 2016, 5:00 AM Comment Actions
djasper edited edge metadata. Comment ActionsLooks good.
This revision is now accepted and ready to land.Dec 2 2016, 2:48 AM ioeric marked an inline comment as done. ioeric edited edge metadata. Comment Actions
Closed by commit rL288493: [ClangFormat] Only insert #include into the #include block in the beginning of… (authored by ioeric). · Explain WhyDec 2 2016, 3:11 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 80045 cfe/trunk/include/clang/Format/Format.h
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/CleanupTest.cpp
|