summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPMacroExpansion.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-12-05 15:24:55 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-12-05 15:24:55 +0000
commita6f759e423940dd5357772372524daf469c40ff1 (patch)
treec376ec6d41375275bc7e571c8f32286baf460191 /clang/lib/Lex/PPMacroExpansion.cpp
parent3c0f9b4a7d0b26f23ea2227d6c58cec00d9c3459 (diff)
downloadbcm5719-llvm-a6f759e423940dd5357772372524daf469c40ff1.tar.gz
bcm5719-llvm-a6f759e423940dd5357772372524daf469c40ff1.zip
Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward.
llvm-svn: 223468
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 26cf5439e7a..b402a939c57 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -1425,7 +1425,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) {
// Check for a builtin is trivial.
Value = FeatureII->getBuiltinID() != 0;
} else if (II == Ident__has_attribute)
- Value = hasAttribute(AttrSyntax::Generic, nullptr, FeatureII,
+ Value = hasAttribute(AttrSyntax::GNU, nullptr, FeatureII,
getTargetInfo().getTriple(), getLangOpts());
else if (II == Ident__has_cpp_attribute)
Value = hasAttribute(AttrSyntax::CXX, ScopeII, FeatureII,
OpenPOWER on IntegriCloud