This revision was automatically updated to reflect the committed changes.
Closed by commit rG3bbdf06b2827: [clang-format] Fix annotating when deleting
array of pointers (authored by jackh ).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://review
owenpan accepted this revision.
owenpan added a comment.
Please mark https://reviews.llvm.org/D132911#inline-1279832 as done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132911/new/
https://reviews.llvm.org/D132911
__
jackhong12 marked 7 inline comments as done.
jackhong12 added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2375-2378
+const FormatToken *Prev = PrevToken;
+if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) &&
+Prev->is(tok::
jackhong12 updated this revision to Diff 456836.
jackhong12 retitled this revision from "Fix annotating when deleting array of
pointers" to "[clang-format] Fix annotating when deleting array of pointers".
jackhong12 edited the summary of this revision.
jackhong12 added a comment.
Add left alignme
owenpan added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2375-2378
+const FormatToken *Prev = PrevToken;
+if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) &&
+Prev->is(tok::l_square) && (Prev = Prev->getPreviousNonComment
HazardyKnusperkeks added a comment.
Please mark comments as done, when the discussion has ended.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2376
+const FormatToken *Prev = PrevToken;
+if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) &&
+
MyDeveloperDay accepted this revision.
MyDeveloperDay added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2381-2385
if (PrevToken->Tok.isLiteral() ||
PrevToken->isOneOf(tok::r_paren, tok::r_square,
jackhong12 added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2381-2385
if (PrevToken->Tok.isLiteral() ||
PrevToken->isOneOf(tok::r_paren, tok::r_square, tok::kw_true,
tok::kw_false, tok::r_brace)) {
return TT_B
jackhong12 added a comment.
In this case, I think it's dereferencing a pointer instead of multiplying two
numbers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132911/new/
https://reviews.llvm.org/D132911
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2379
+Prev->is(tok::kw_delete))
+ return TT_UnaryOperator;
+
Why unary here, doesn’t that make it a multiply?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE
jackhong12 updated this revision to Diff 456563.
jackhong12 added a comment.
Annotate `*` as UnaryOperator instead of `PointerOrReference`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132911/new/
https://reviews.llvm.org/D132911
Files:
clang/li
11 matches
Mail list logo