]> granicus.if.org Git - clang/commit
[clang-format] insert new #includes into correct blocks when cleaning up Replacement...
authorEric Liu <ioeric@google.com>
Tue, 31 May 2016 13:34:20 +0000 (13:34 +0000)
committerEric Liu <ioeric@google.com>
Tue, 31 May 2016 13:34:20 +0000 (13:34 +0000)
commit9ee9835de5203523d7f3491b3f434f3084892b73
tree55365c53d16fcbaf5c049412871836519156df8a
parent6358954832fb04090e9f2b405685f6930915b61c
[clang-format] insert new #includes into correct blocks when cleaning up Replacement with cleanupAroundReplacements().

Summary:
When a replacement's offset is set to UINT_MAX or -1U, it is treated as
a header insertion replacement by cleanupAroundReplacements(). The new #include
directive is then inserted into the correct block.

Reviewers: klimek, djasper

Subscribers: klimek, cfe-commits, bkramer

Differential Revision: http://reviews.llvm.org/D20734

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271276 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp