[c++20] Implement tweaked __VA_OPT__ rules from P1042R1:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 4 May 2019 06:46:18 +0000 (06:46 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 4 May 2019 06:46:18 +0000 (06:46 +0000)
commitcb1beee76f520857b985db2af6117ad97aa45c4e
tree3dd01f89ff7cd37c28716d6510143561ece28839
parent5ddd564e190f10b0b001c203fbfbfd521a22c0c4
[c++20] Implement tweaked __VA_OPT__ rules from P1042R1:

 * __VA_OPT__ is expanded if the *expanded* __VA_ARGS__ is non-empty,
   not if the original argument contained no tokens.
 * Placemarkers at the start and end of __VA_OPT__ are retained just
   long enough to paste them with adjacent ## operators. We never paste
   "across" a discarded placemarker.

llvm-svn: 359964
clang/include/clang/Lex/MacroArgs.h
clang/include/clang/Lex/VariadicMacroSupport.h
clang/lib/Lex/MacroArgs.cpp
clang/lib/Lex/TokenLexer.cpp
clang/test/Preprocessor/macro_vaopt_expand.cpp
clang/test/Preprocessor/macro_vaopt_p1042r1.cpp [new file with mode: 0644]
clang/www/cxx_status.html