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&id=108598#toc
Repository:
rL LLVM
https://
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
_
Typz added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:464
+ for (const auto &i : 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: impl
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
I
krasimir added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:464
+ for (const auto &i : PPStack) {
+hash_combine(h, i.Kind);
+hash_combine(h, i.Line);
When I patch this, I get an `UnwrappedLineParser.cpp:457:16 error: implicit
instanti
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: unit
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? I
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 commen