]> granicus.if.org Git - clang/commit
[ClangFormat] Only insert #include into the #include block in the beginning of the...
authorEric Liu <ioeric@google.com>
Fri, 2 Dec 2016 11:01:43 +0000 (11:01 +0000)
committerEric Liu <ioeric@google.com>
Fri, 2 Dec 2016 11:01:43 +0000 (11:01 +0000)
commitca715740dceadf31185d75d7ca7e91d135d73a22
treeb136c2d3ba6afc0d23f74b323dee5fb727194d30
parent35ec7f07b82c49eeda6c3ca887ebc2d34206b9de
[ClangFormat] Only insert #include into the #include block in the beginning of the file.

Summary:
This avoid inserting #include into:
- raw string literals containing #include.
- #if block.
- Special #include among declarations (e.g. functions).

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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