diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2022-04-20 13:26:38 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2022-04-20 13:28:15 -0400 |
commit | 9955f14aaf9995f6f0f7bf058ac740463003c470 (patch) | |
tree | c596045609299a6625a58bcab9bb108377f7ad22 /clang/lib/Lex/ModuleMap.cpp | |
parent | 9c069374cebe0162bc4f0b9d0397cf2b1c5febf6 (diff) | |
download | llvm-9955f14aaf9995f6f0f7bf058ac740463003c470.zip llvm-9955f14aaf9995f6f0f7bf058ac740463003c470.tar.gz llvm-9955f14aaf9995f6f0f7bf058ac740463003c470.tar.bz2 |
[C2x] Disallow functions without prototypes/functions with identifier lists
WG14 has elected to remove support for K&R C functions in C2x. The
feature was introduced into C89 already deprecated, so after this long
of a deprecation period, the committee has made an empty parameter list
mean the same thing in C as it means in C++: the function accepts no
arguments exactly as if the function were written with (void) as the
parameter list.
This patch implements WG14 N2841 No function declarators without
prototypes (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm)
and WG14 N2432 Remove support for function definitions with identifier
lists (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf).
It also adds The -fno-knr-functions command line option to opt into
this behavior in other language modes.
Differential Revision: https://reviews.llvm.org/D123955
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions