[PATCH] D154184: [clang-format] Correctly annotate */&/&& in operator function calls

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 22:56:13 PDT 2023


owenpan added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3320
 
+  // Annotate */&/&& in `operator` function calls as binary operators.
+  for (const auto *Tok = Line.First; Tok; Tok = Tok->Next) {
----------------
rymiel wrote:
> I assume this extra fixup step means that the context of the call's parens won't be set to `IsExpression = true`? That won't cause any problems?
This doesn't change `IsExpression`, which I believe has already been set by the annotator parser.


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

https://reviews.llvm.org/D154184



More information about the cfe-commits mailing list