]> granicus.if.org Git - clang/commit
Don't allow #include (and its friends #import, #include_next and
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Dec 2011 22:50:01 +0000 (22:50 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Dec 2011 22:50:01 +0000 (22:50 +0000)
commita3ca4d655974ad66e432a6c78dd08b277a639edf
treee21110f61d8e1c17f2ee1c640230ffe3b4446725
parent37f953f021c67e3b97f1ef38e1ef3cb08bd9d146
Don't allow #include (and its friends #import, #include_next and
#__include_macros) in the arguments of a function-style macro. Directives in the
arguments of such macros have undefined behaviour, and GCC does not correctly
support these cases. In some situations, this can lead to better diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146765 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
test/Preprocessor/macro_arg_directive.c [new file with mode: 0644]
test/Preprocessor/macro_arg_directive.h [new file with mode: 0644]