diff options
| author | Michael Han <Michael.Han@autodesk.com> | 2012-03-07 00:12:16 +0000 |
|---|---|---|
| committer | Michael Han <Michael.Han@autodesk.com> | 2012-03-07 00:12:16 +0000 |
| commit | 4a04517329116d11393b2577a5ec4baa70b1df3b (patch) | |
| tree | 09a8d5bdf21d5b8ac30bb98cac0965af5473420b /clang/lib/Parse | |
| parent | bb8c7dabed2635b1c9d43c1629cfa257694965f7 (diff) | |
| download | bcm5719-llvm-4a04517329116d11393b2577a5ec4baa70b1df3b.tar.gz bcm5719-llvm-4a04517329116d11393b2577a5ec4baa70b1df3b.zip | |
Refactor Clang sema attribute handling.
This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.
A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.
Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.
Reviewed by Delesley Hutchins.
llvm-svn: 152169
Diffstat (limited to 'clang/lib/Parse')
| -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 094d53fe60e..3a261f010dc 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -270,7 +270,7 @@ void Parser::ParseGNUAttributeArgs(IdentifierInfo *AttrName, AttributeList *attr = Attrs.addNew(AttrName, SourceRange(AttrNameLoc, RParen), 0, AttrNameLoc, ParmName, ParmLoc, ArgExprs.take(), ArgExprs.size()); - if (BuiltinType && attr->getKind() == AttributeList::AT_IBOutletCollection) + if (BuiltinType && attr->getKind() == AttributeList::AT_iboutletcollection) Diag(Tok, diag::err_iboutletcollection_builtintype); } } |

