Fix two bugs exposed by array passing assert:
(1) Additional arguments to variadic methods should have default
promotions applied.

(2) Additional arguments to non-variadic methods were allowed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/message.m b/test/SemaObjC/message.m
index 9c9289b..69a6535 100644
--- a/test/SemaObjC/message.m
+++ b/test/SemaObjC/message.m
@@ -61,3 +61,10 @@
 }
 @end
 
+@interface I0
+-(void) nonVararg: (int) x;
+@end
+
+int f0(I0 *ob) {
+  [ ob nonVararg: 0, 1, 2]; // expected-error {{too many arguments to function}}
+}