aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-17 01:07:27 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-17 01:07:27 +0000
commitbc1c877fe28fb6a825f0b226a0a2da99e713ea03 (patch)
tree5f467bd520f112cca8b35a99c78b88824f80a066 /lib/Parse
parentcb73530987a22a6877039b9404b29aba3bf226e0 (diff)
Semantics of @protocol attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse')
-rw-r--r--lib/Parse/AttributeList.cpp1
-rw-r--r--lib/Parse/ParseObjc.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp
index 342c87f1fe..0a418bb9cc 100644
--- a/lib/Parse/AttributeList.cpp
+++ b/lib/Parse/AttributeList.cpp
@@ -94,6 +94,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
case 11:
if (!memcmp(Str, "vector_size", 11)) return AT_vector_size;
if (!memcmp(Str, "constructor", 11)) return AT_constructor;
+ if (!memcmp(Str, "unavailable", 11)) return AT_unavailable;
break;
case 13:
if (!memcmp(Str, "address_space", 13)) return AT_address_space;
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 5f2ebad6db..e70d2024c7 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -936,7 +936,8 @@ Parser::DeclTy *Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc,
if (Tok.is(tok::semi)) { // forward declaration of one protocol.
IdentifierLocPair ProtoInfo(protocolName, nameLoc);
ConsumeToken();
- return Actions.ActOnForwardProtocolDeclaration(AtLoc, &ProtoInfo, 1);
+ return Actions.ActOnForwardProtocolDeclaration(AtLoc, &ProtoInfo, 1,
+ attrList);
}
if (Tok.is(tok::comma)) { // list of forward declarations.
@@ -964,7 +965,8 @@ Parser::DeclTy *Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc,
return Actions.ActOnForwardProtocolDeclaration(AtLoc,
&ProtocolRefs[0],
- ProtocolRefs.size());
+ ProtocolRefs.size(),
+ attrList);
}
// Last, and definitely not least, parse a protocol declaration.