[PATCH] D120774: [clang-format] Handle builtins in constraint expression

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 9 01:22:58 PST 2022


owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3163
 
+    case tok::identifier:
     default:
----------------
HazardyKnusperkeks wrote:
> HazardyKnusperkeks wrote:
> > owenpan wrote:
> > > cjdb wrote:
> > > > owenpan wrote:
> > > > > Do we still need this line?
> > > > I'd prefer to get rid of `default` if we can.
> > > We can't. It's the whole point of the fix.
> > > Do we still need this line?
> > 
> > No we don't. But I'd like to make it explicit that we handle identifiers here.
> > 
> > I'd prefer to get rid of `default` if we can.
> 
> 
Can we use a comment instead?


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3188
+        parseBracedList(/*ContinueOnSemicolons=*/false, /*IsEnum=*/false,
+                        /*ClosingBraceKind=*/tok::greater);
+      break;
----------------
HazardyKnusperkeks wrote:
> owenpan wrote:
> > 
> Can do, but this is how it is used anywhere else in the code.
Yeah. Please keep the comment then.


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

https://reviews.llvm.org/D120774



More information about the cfe-commits mailing list