This isn't allowed by the standard grammar but is allowed in C, and clang/GCC
permit it as an extension.
It avoids the need to determine which type of list we have in error-recovery.
Paths
| Differential D128687
[pseudo] Allow mixed designated/undesignated init lists. ClosedPublic Authored by sammccall on Jun 27 2022, 4:13 PM.
Details Summary This isn't allowed by the standard grammar but is allowed in C, and clang/GCC It avoids the need to determine which type of list we have in error-recovery.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jun 28 2022, 6:38 AM Closed by commit rG8cf28585a403: [pseudo] Allow mixed designated/undesignated init lists. (authored by sammccall). · Explain WhyJun 28 2022, 6:46 AM This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done.
Revision Contents
Diff 440426 clang-tools-extra/pseudo/lib/cxx.bnf
clang-tools-extra/pseudo/test/cxx/mixed-designator.cpp
|
I think this is the syntax of gnu extension, can we add a trailing comment for this rule?