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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 8 11:59:49 PST 2022


HazardyKnusperkeks marked 2 inline comments as done.
HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3163
 
+    case tok::identifier:
     default:
----------------
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.



================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3163
 
+    case tok::identifier:
     default:
----------------
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.




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


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

https://reviews.llvm.org/D120774



More information about the cfe-commits mailing list