diff options
| author | Eric Liu <ioeric@google.com> | 2018-05-04 17:55:13 +0000 |
|---|---|---|
| committer | Eric Liu <ioeric@google.com> | 2018-05-04 17:55:13 +0000 |
| commit | bf4c41c7e18ddac1328f7873e2ff8d209a96bd50 (patch) | |
| tree | a010a870615c13b429f6f209dd38c2d0f6269b56 /llvm/lib/Target | |
| parent | d7ffbc5c7e5d033ee3812fde2c13f1bb80044e70 (diff) | |
| download | bcm5719-llvm-bf4c41c7e18ddac1328f7873e2ff8d209a96bd50.tar.gz bcm5719-llvm-bf4c41c7e18ddac1328f7873e2ff8d209a96bd50.zip | |
[clang-format] Refactor #include insertion/deletion functionality into a class.
Summary:
The class will be moved into libToolingCore as followup.
The new behaviors in this patch:
- New #include is inserted in the right position in a #include block to
preserver sorted #includes. This is best effort - only works when the
block is already sorted.
- When inserting multiple #includes to the end of a file which doesn't
end with a "\n" character, a "\n" will be prepended to each #include.
This is a special and rare case that was previously handled. This is now
relaxed to avoid complexity as it's rare in practice.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: klimek, cfe-commits, djasper
Differential Revision: https://reviews.llvm.org/D46180
llvm-svn: 331544
Diffstat (limited to 'llvm/lib/Target')
0 files changed, 0 insertions, 0 deletions

