- Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index acdeec6..f8b277a 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -151,9 +151,13 @@
// 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;