HazardyKnusperkeks requested changes to this revision.
HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2161
 
-    if (PrevToken->isOneOf(tok::l_paren, tok::l_square, tok::l_brace,
-                           tok::comma, tok::semi, tok::kw_return, tok::colon,
-                           tok::kw_co_return, tok::kw_co_await,
-                           tok::kw_co_yield, tok::equal, tok::kw_delete,
-                           tok::kw_sizeof, tok::kw_throw, TT_BinaryOperator,
-                           TT_ConditionalExpr, TT_UnaryOperator, 
TT_CastRParen))
+    if (determinePlusMinusCaretUsage(Tok) == TT_UnaryOperator)
       return TT_UnaryOperator;
----------------
curdeius wrote:
> As below, before, question, kw_return, kw_case, at were not handled here.
> Please add tests.
This needs a comment or better a new common function. Otherwise it's just 
unnecessary hard to understand why we now check for PlusMinusCaret. (I've never 
heard of this function and I've stepped a lot through clang-format. ;))


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121754/new/

https://reviews.llvm.org/D121754

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to