]> granicus.if.org Git - clang/commit
[clang-format] support header deletion in cleanupAroundReplacemnts.
authorEric Liu <ioeric@google.com>
Fri, 23 Sep 2016 15:10:56 +0000 (15:10 +0000)
committerEric Liu <ioeric@google.com>
Fri, 23 Sep 2016 15:10:56 +0000 (15:10 +0000)
commit04f6547d75b397343691045a9c8589d6bdf6434b
tree79b06facc60329fdb6df91169aac62871531bae9
parent7981b20f318488a10e7c0c8e0f0ca502e02e74cd
[clang-format] support header deletion in cleanupAroundReplacemnts.

Summary:
- If a replacement has offset UINT_MAX, length 0, and a replacement text
  that is an #include directive, this will insert the #include into the
  correct block in the \p Code.
- If a replacement has offset UINT_MAX, length 1, and a replacement text
  that is the name of the header to be removed, the header will be removed
  from \p Code if it exists.

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D24829

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