aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-09-13 17:39:31 +0000
committerErich Keane <erich.keane@intel.com>2019-09-13 17:39:31 +0000
commit6a24e8068052cd6b48295959ec4c44eb2ef819c5 (patch)
treebca632cf1757a786c64a5623e5fec63d5bb025af /clang/lib/Parse/Parser.cpp
parent7ff9a9353c24c9da28ad7719c34d859c7009fafa (diff)
downloadllvm-6a24e8068052cd6b48295959ec4c44eb2ef819c5.zip
llvm-6a24e8068052cd6b48295959ec4c44eb2ef819c5.tar.gz
llvm-6a24e8068052cd6b48295959ec4c44eb2ef819c5.tar.bz2
[NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.
In order to enable future improvements to our attribute diagnostics, this moves info from ParsedAttr into CommonAttributeInfo, then makes this type the base of the *Attr and ParsedAttr types. Quite a bit of refactoring took place, including removing a bunch of redundant Spelling Index propogation. Differential Revision: https://reviews.llvm.org/D67368 llvm-svn: 371875
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 9a2d398..7cfc317 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -1174,8 +1174,7 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,
if (Tok.isNot(tok::equal)) {
for (const ParsedAttr &AL : D.getAttributes())
if (AL.isKnownToGCC() && !AL.isCXX11Attribute())
- Diag(AL.getLoc(), diag::warn_attribute_on_function_definition)
- << AL.getName();
+ Diag(AL.getLoc(), diag::warn_attribute_on_function_definition) << AL;
}
// In delayed template parsing mode, for function template we consume the