[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 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] D27211: [clang-format] Implement comment reflowing

2016-12-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:1787 +TEST_F(FormatTest, ReflowsComments) { + // Break a long line and reflow with the full next line. I think it is time that me moved a lot of the comment handling logic into a

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:82-94 + /// \brief Adds a replacement that inserts \p Text at \p Loc. If this + /// insertion conflicts with an existing insertion (at the same position), + /// this will be inserted

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:41 + /// \brief Creates an edit list for a key position. + EditList(const SourceManager , SourceLocation KeyPosition); + ioeric wrote: > ioeric wrote: > > klimek wrote: > >

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:41 + /// \brief Creates an edit list for a key position. + EditList(const SourceManager , SourceLocation KeyPosition); + I wonder whether we should always use a

<    1   2   3   4   5