]> granicus.if.org Git - clang/commit
Disable __has_cpp_attribute when not compiling in C++ mode. As this feature test...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 11 May 2015 14:09:50 +0000 (14:09 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 11 May 2015 14:09:50 +0000 (14:09 +0000)
commit7ef43194f52cf6d14dd5511acfbc89a2f160cacf
treed3b7363f343140c1ef0e40130dbf9bf5cfdb6358
parent5cc789b4ce3c441993f81c40d8d78bc50e9d3d0c
Disable __has_cpp_attribute when not compiling in C++ mode. As this feature test macro only supports C++ style attributes, it doesn't apply to code compiled as C code, and can lead to diagnostics when given a scoped attribute.

This addresses PR23435.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/PPMacroExpansion.cpp
test/Preprocessor/has_attribute.c