aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-08-17 23:19:16 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-08-17 23:19:16 +0000
commit1b72fa7222abb1a53e063f0805c759993d445471 (patch)
tree855f325dc1b5b2a639b8f2e2792a5a6d9c3f5266 /lib/Parse/ParseDecl.cpp
parent5005a6cf2e78be57c053d011ce9f95b40c8a5f5b (diff)
Diagnose if type of iboutletcollection attribute is a builtin type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 7149d4dc30..ce0377020a 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -174,11 +174,13 @@ AttributeList *Parser::ParseGNUAttributes(SourceLocation *EndLoc) {
case tok::kw_double:
case tok::kw_void:
case tok::kw_typeof:
+ CurrAttr = new AttributeList(AttrName, AttrNameLoc, 0, AttrNameLoc,
+ 0, SourceLocation(), 0, 0, CurrAttr);
+ if (CurrAttr->getKind() == AttributeList::AT_IBOutletCollection)
+ Diag(Tok, diag::err_iboutletcollection_builtintype);
// If it's a builtin type name, eat it and expect a rparen
// __attribute__(( vec_type_hint(char) ))
ConsumeToken();
- CurrAttr = new AttributeList(AttrName, AttrNameLoc, 0, AttrNameLoc,
- 0, SourceLocation(), 0, 0, CurrAttr);
if (Tok.is(tok::r_paren))
ConsumeParen();
break;