Warn about bogus protocol qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 252cd2d..acdeec6 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -151,6 +151,9 @@
// id<protocol-list>
Result = Context.getObjCQualifiedIdType((ObjCProtocolDecl**)PQ,
DS.getNumProtocolQualifiers());
+ else
+ Diag(DS.getSourceRange().getBegin(),
+ diag::warn_ignoring_objc_qualifiers) << DS.getSourceRange();
}
// TypeQuals handled by caller.
break;