[PATCH] D77586: Allow parameter names to be elided in a function definition in C
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 13:37:57 PDT 2020
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, rjmccall, erik.pilkington.
Herald added a subscriber: dexonsmith.
WG14 has adopted N2480 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf) into C2x at the meetings last week, allowing parameter names of a function definition to be elided. This patch relaxes the error so that C++ and C2x do not diagnose this situation, and modes before C2x will allow it as an extension.
This also adds the same feature to ObjC blocks under the assumption that ObjC wishes to follow the C standard in this regard.
https://reviews.llvm.org/D77586
Files:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaChecking.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/Sema/block-args.c
clang/test/Sema/c89.c
clang/test/Sema/function.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77586.255468.patch
Type: text/x-patch
Size: 5797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200406/6227dab4/attachment-0001.bin>
More information about the cfe-commits
mailing list