Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/objc-try-catch-1.m b/test/Parser/objc-try-catch-1.m
index 0e8a919..2554531 100644
--- a/test/Parser/objc-try-catch-1.m
+++ b/test/Parser/objc-try-catch-1.m
@@ -27,7 +27,7 @@
       return proc();
     }
     @catch (Frob* ex) {
-      @throw 1,2; // expected-warning {{invalid 'int' argument (expected an ObjC object type)}}
+      @throw 1,2; // expected-error {{invalid 'int' argument (expected an ObjC object type)}}
     }
     @catch(...) {
       @throw (4,3,proc());
diff --git a/test/SemaObjC/try-catch.m b/test/SemaObjC/try-catch.m
index d3be70c..16e119d 100644
--- a/test/SemaObjC/try-catch.m
+++ b/test/SemaObjC/try-catch.m
@@ -38,6 +38,10 @@
 @end
 
 int foo() {
-  @throw 42; // expected-warning {{invalid 'int' argument (expected an ObjC object type)}}
+  struct s { int a, b; } agg, *pagg;
+
+  @throw 42; // expected-error {{invalid 'int' argument (expected an ObjC object type)}}
+  @throw agg; // expected-error {{invalid 'struct s' argument (expected an ObjC object type)}}
+  @throw pagg; // expected-error {{invalid 'struct s *' argument (expected an ObjC object type)}}
   @throw; // expected-error {{@throw (rethrow) used outside of a @catch block}}
 }