diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-01-27 22:10:04 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-01-27 22:10:04 +0000 |
commit | c669cc0d773aa555e59c4b91728e1288e676094d (patch) | |
tree | 308776e8b8db233af85486d72f75cf00172464fc /clang/lib/Parse/ParseDecl.cpp | |
parent | 340e44074b7b2a65228b5572c23aa937993a27b8 (diff) | |
download | bcm5719-llvm-c669cc0d773aa555e59c4b91728e1288e676094d.tar.gz bcm5719-llvm-c669cc0d773aa555e59c4b91728e1288e676094d.zip |
Add a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.
Replacing the functionality from r199676, which didn't solve the problem as elegantly.
llvm-svn: 200252
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index f6435f9eeaf..c295c766065 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1143,7 +1143,7 @@ void Parser::ParseLexedAttribute(LateParsedAttribute &LA, const AttributeList *AL = Attrs.getList(); if (OnDefinition && AL && !AL->isCXX11Attribute() && - !AL->canAppearOnFunctionDefinition()) + AL->isKnownToGCC()) Diag(Tok, diag::warn_attribute_on_function_definition) << &LA.AttrName; |