[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288493: [ClangFormat] Only insert #include into the #include block in the beginning of… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D26909?vs=80044=80045#toc Repository:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80044. ioeric marked an inline comment as done. ioeric added a comment. - Addressed comment. https://reviews.llvm.org/D26909 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Comment at: unittests/Format/CleanupTest.cpp:898 + +TEST_F(CleanUpReplacementsTest, CanInsertAfterComment) { + std::string Code = "#include \"a.h\"\n"

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1521 +// tokens and returns an offset after the sequence. +unsigned getOffsetAfterTokenSequence( +StringRef FileName, StringRef Code, const FormatStyle , djasper wrote: > I am somewhat hesitant

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80042. ioeric marked an inline comment as done. ioeric added a comment. - Updated comments. https://reviews.llvm.org/D26909 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1521 +// tokens and returns an offset after the sequence. +unsigned getOffsetAfterTokenSequence( +StringRef FileName, StringRef Code, const FormatStyle , I am somewhat hesitant to put more and

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80039. ioeric added a comment. - Merge branch 'master' of http://llvm.org/git/clang into insert - Still delete #include's in code. https://reviews.llvm.org/D26909 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: