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)
commit416b127456f4707236448677d8aece70e84b8884
treedcf21840d09577bbed1166f9be9f27c09f627518
parentd9ff035de8ee5d74d1709abaa44b7bfad24b501b
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.

llvm-svn: 236996
clang/lib/Lex/PPMacroExpansion.cpp
clang/test/Preprocessor/has_attribute.c