Permit __VA_OPT__ in all language modes and allow it to be detected with #ifdef.
authorRichard Smith <richard@metafoo.co.uk>
Wed, 27 Jan 2021 20:24:30 +0000 (12:24 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 27 Jan 2021 20:34:43 +0000 (12:34 -0800)
commit0436ec2128c9775ba13b0308937238fc79673fdd
treed40fbaf4c4ec6186191ea46a6bb9e89155289250
parent9f2c7effd7f386e95aff3358500bc30974d35b0d
Permit __VA_OPT__ in all language modes and allow it to be detected with #ifdef.

These changes are intended to give code a path to move away from the GNU
,##__VA_ARGS__ extension, which is non-conforming in some situations and
which we'd like to disable in our conforming mode in those cases.
clang/include/clang/Lex/Preprocessor.h
clang/include/clang/Lex/VariadicMacroSupport.h
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPExpressions.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/Preprocessor.cpp
clang/test/Preprocessor/macro_vaopt_check.cpp
clang/test/Preprocessor/macro_vaopt_expand.cpp