HazardyKnusperkeks added inline comments.

================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3052
+    // & 1
+    if (Right.Tok.isLiteral())
+      return true;
----------------
Is this valid code? Or did we just wrongly assign PointerOrReference? I'd say 
after that there can not be a literal in valid code, thus we do not need to 
handle it.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3065
+    // for (auto a = 0, b = 0; const auto& c : {1, 2, 3})
+    if (Left.Previous && Left.Previous->is(tok::kw_auto) &&
+        Right.is(tok::identifier))
----------------
Do we need this just for `auto`? What when `auto` is replaced with `int`?


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3070
+
+    return (
+        !Right.isOneOf(TT_PointerOrReference, TT_ArraySubscriptLSquare,
----------------
Drop the outer paren?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115050

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

Reply via email to