]> granicus.if.org Git - clang/commitdiff
Change a warning to an error...
authorSteve Naroff <snaroff@apple.com>
Tue, 3 Mar 2009 23:13:51 +0000 (23:13 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 3 Mar 2009 23:13:51 +0000 (23:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65978 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.def
lib/Sema/SemaStmt.cpp
test/SemaObjC/catch-stmt.m

index 6c635dae583cc83dfdaa85a13b0c849f9c23429f..a691a1f7026325d474160a56a5a243278f0068f0 100644 (file)
@@ -962,8 +962,8 @@ DIAG(err_attribute_multiple_objc_gc, ERROR,
      "multiple garbage collection attributes specified for type")
 DIAG(err_catch_param_not_objc_type, ERROR,
      "@catch parameter is not an Objective-C class type")
-DIAG(warn_ignoring_qualifiers_on_catch_parm, WARNING,
-     "ignoring qualifiers on @catch parameter")
+DIAG(err_illegal_qualifiers_on_catch_parm, ERROR,
+     "illegal qualifiers on @catch parameter")
 
 
 // C++ casts
index 12db4337683009c435687b151b256137023c8d53..ea9ba4c39336192f52cf2a3d3d5706b79337840d 100644 (file)
@@ -974,7 +974,7 @@ Sema::ActOnObjCAtCatchStmt(SourceLocation AtLoc,
                        diag::err_catch_param_not_objc_type));
     if (PVD->getType()->isObjCQualifiedIdType())
       return StmtError(Diag(PVD->getLocation(), 
-                       diag::warn_ignoring_qualifiers_on_catch_parm));
+                       diag::err_illegal_qualifiers_on_catch_parm));
   }
     
   ObjCAtCatchStmt *CS = new (Context) ObjCAtCatchStmt(AtLoc, RParen,
index 33ad9ddc813fb71f8440ace351ae5f0d9996aa26..33894a2c0b788252e2a1a8a0c0d619c1392fb540 100644 (file)
@@ -7,7 +7,7 @@ void f() {
   } @catch (void a) { // expected-error{{@catch parameter is not an Objective-C class type}}
   } @catch (int) { // expected-error{{@catch parameter is not an Objective-C class type}}
   } @catch (int *b) { // expected-error{{@catch parameter is not an Objective-C class type}}
-  } @catch (id <P> c) { // expected-warning{{ignoring qualifiers on @catch parameter}}
+  } @catch (id <P> c) { // expected-error{{illegal qualifiers on @catch parameter}}
   }
 }