diff options
author | Steve Naroff <snaroff@apple.com> | 2009-02-21 20:17:11 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-02-21 20:17:11 +0000 |
commit | 15509f4fe73f0e11a8cec602bce4d99d9454b7f6 (patch) | |
tree | 70f1200764bd9bff972b8213bb5abb7c1913338e /lib/Sema/SemaType.cpp | |
parent | d6840002c37ba25effe5eb4bb89c4ae2e1d80945 (diff) |
Add support for GCC ObjC extension "Class<protocol>". Sigh.
Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's.
Will never be seen in user code. Needed to pass dejagnu testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index acdeec6ba9..697524133c 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -151,6 +151,10 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) { // id<protocol-list> Result = Context.getObjCQualifiedIdType((ObjCProtocolDecl**)PQ, DS.getNumProtocolQualifiers()); + else if (Result == Context.getObjCClassType()) + // Support the following GCC extension: Class<protocol-list> + Result = Context.getObjCQualifiedClassType((ObjCProtocolDecl**)PQ, + DS.getNumProtocolQualifiers()); else Diag(DS.getSourceRange().getBegin(), diag::warn_ignoring_objc_qualifiers) << DS.getSourceRange(); |