This revision was automatically updated to reflect the committed changes.
Closed by commit rL310831: clang-format: Fix left pointer alignment after
delctype/typeof (authored by krasimir).
Changed prior to commit:
https://reviews.llvm.org/D35847?vs=110032=110938#toc
Repository:
rL LLVM
euhlmann marked 2 inline comments as done.
euhlmann added a comment.
I resolved the formatting issues. I apologize for not paying closer attention
to formatting earlier.
I don't have commit access, so if this change looks good now, could someone
with access please commit?
euhlmann updated this revision to Diff 110032.
euhlmann added a comment.
Ran clang-format over changes and corrected formatting
https://reviews.llvm.org/D35847
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp
Index: unittests/Format/FormatTest.cpp
krasimir accepted this revision.
krasimir added a comment.
This revision is now accepted and ready to land.
Looks good! Please reformat the newly added code blocks with `clang-format`
before submitting.
Comment at: lib/Format/TokenAnnotator.cpp:1402
+ FormatToken
euhlmann updated this revision to Diff 109805.
euhlmann added a comment.
Fix bad formatting
https://reviews.llvm.org/D35847
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp
Index: unittests/Format/FormatTest.cpp
euhlmann updated this revision to Diff 109785.
euhlmann added a comment.
Pulled out `getPreviousNonComment()` into local variable to avoid calling twice.
https://reviews.llvm.org/D35847
Files:
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp
Index:
krasimir added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:1402
+PrevToken->MatchingParen->getPreviousNonComment() &&
+PrevToken->MatchingParen->getPreviousNonComment()->isOneOf(
+ tok::kw_typeof,
It would be cool if you
euhlmann updated this revision to Diff 109613.
euhlmann added a comment.
This uses `FormatToken::getPreviousNonComment` and adds a test. This also fixes
a bug in token annotation that was breaking the test (by also using
`getPreviousNonComment` instead of `Previous`)
krasimir added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:2206
+return (Left.is(tok::r_paren) && Line.MightBeFunctionDecl &&
+!(Left.MatchingParen && Left.MatchingParen->Previous &&
+
euhlmann created this revision.
euhlmann added a project: clang.
Change 272124* introduced a regression in spaceRequiredBetween for left aligned
pointers to decltype and typeof expressions. This fix adds logic to fix this.
The test added is based on a related test in determineStarAmpUsage. Also
10 matches
Mail list logo