summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-02-23 18:53:24 +0000
committerSteve Naroff <snaroff@apple.com>2009-02-23 18:53:24 +0000
commita94e52c687ec2f982d32c2cebad1555ebbe47b26 (patch)
treeb0beb5924b12471bd274a37759ae7e219e523134 /clang/lib
parent91362dd011072cc910e7374dca8fcf7d90f411b4 (diff)
downloadbcm5719-llvm-a94e52c687ec2f982d32c2cebad1555ebbe47b26.tar.gz
bcm5719-llvm-a94e52c687ec2f982d32c2cebad1555ebbe47b26.zip
- Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types. llvm-svn: 65333
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaType.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index acdeec6ba94..f8b277ae781 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -151,9 +151,13 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) {
// id<protocol-list>
Result = Context.getObjCQualifiedIdType((ObjCProtocolDecl**)PQ,
DS.getNumProtocolQualifiers());
- else
+ else if (Result == Context.getObjCClassType())
+ // Class<protocol-list>
Diag(DS.getSourceRange().getBegin(),
- diag::warn_ignoring_objc_qualifiers) << DS.getSourceRange();
+ diag::err_qualified_class_unsupported) << DS.getSourceRange();
+ else
+ Diag(DS.getSourceRange().getBegin(),
+ diag::err_invalid_protocol_qualifiers) << DS.getSourceRange();
}
// TypeQuals handled by caller.
break;
OpenPOWER on IntegriCloud