[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-28 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309369: clang-format: fix block OpeningLineIndex around preprocessor (authored by Typz). Changed prior to commit: https://reviews.llvm.org/D35483?vs=107843=108598#toc Repository: rL LLVM

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Thanks! Please rebase with master before committing since we've been touching the same lines in `UnwrappedLineParser.cpp`. https://reviews.llvm.org/D35483

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:464 + for (const auto : PPStack) { +hash_combine(h, i.Kind); +hash_combine(h, i.Line); krasimir wrote: > When I patch this, I get an `UnwrappedLineParser.cpp:457:16 error:

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107843. Typz marked 3 inline comments as done. Typz added a comment. Address review commentsx https://reviews.llvm.org/D35483 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/NamespaceEndCommentsFixerTest.cpp

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:464 + for (const auto : PPStack) { +hash_combine(h, i.Kind); +hash_combine(h, i.Line); When I patch this, I get an `UnwrappedLineParser.cpp:457:16 error: implicit

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107030. Typz marked an inline comment as done. Typz added a comment. Add more tests https://reviews.llvm.org/D35483 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/NamespaceEndCommentsFixerTest.cpp Index:

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Nice! Comment at: lib/Format/UnwrappedLineParser.cpp:461 + +size_t UnwrappedLineParser::computePPHash() const { + size_t h = 0; @djasper: do you aware of some baked-in hash-combine functionality in llvm which this can use directly?

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. The current code would return an incorrect value when a preprocessor directive is present immediately after the opening brace: this causes the nanespace end comment fixer to break in some places, for exemple it would not add the