rymiel planned changes to this revision.
rymiel added a comment.
Going to try to make the indentation of the cases following the controlling
expression not continuations, since that results in weird results such as:
#define LIMIT_MAX(T) \
_Generic(
MyDeveloperDay accepted this revision.
MyDeveloperDay added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1691
+(CurrentState.IsCSharpGenericTypeConstraint) || GenericSelection ||
(Style.is
HazardyKnusperkeks added a comment.
Looks good to me.
And adding a token type is absolutely nothing negative. The more tokens get a
type, the better.
Comment at: clang/lib/Format/TokenAnnotator.cpp:1630
TemplateArgument,
+ // C11 _Generic selection
+ C11Generi
rymiel added a comment.
I put WIP in the title right now because firstly, I still need to write more
tests, but also, since I haven't touched the breaking and indenting part of the
code before, I want to make sure what I'm doing is sensible.
Basically, after making the colons their own type so
rymiel created this revision.
rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay.
Herald added a project: All.
rymiel requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch properly recognizes the generic selection expr