From 013813dd5d22789a02d19204f8e0abead768f15d Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Tue, 3 Mar 2009 23:13:51 +0000 Subject: [PATCH] Change a warning to an error... llvm-svn: 65978 --- clang/include/clang/Basic/DiagnosticSemaKinds.def | 4 ++-- clang/lib/Sema/SemaStmt.cpp | 2 +- clang/test/SemaObjC/catch-stmt.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.def b/clang/include/clang/Basic/DiagnosticSemaKinds.def index 6c635dae583c..a691a1f70263 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.def +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.def @@ -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 diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 12db43376830..ea9ba4c39336 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -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, diff --git a/clang/test/SemaObjC/catch-stmt.m b/clang/test/SemaObjC/catch-stmt.m index 33ad9ddc813f..33894a2c0b78 100644 --- a/clang/test/SemaObjC/catch-stmt.m +++ b/clang/test/SemaObjC/catch-stmt.m @@ -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

c) { // expected-warning{{ignoring qualifiers on @catch parameter}} + } @catch (id

c) { // expected-error{{illegal qualifiers on @catch parameter}} } }