From bf48281c25110f705b4f15a262dcfd438b17f2f7 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 2 Mar 2012 17:05:03 +0000 Subject: [PATCH] Change diagnostic test for my last patch. // rdar://10961370 llvm-svn: 151923 --- clang/lib/Sema/SemaExpr.cpp | 5 ++--- clang/test/Sema/variadic-incomplete-arg-type.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index ece16e88504f..1bab239ab32a 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -587,11 +587,10 @@ ExprResult Sema::DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, E = Comma.get(); } } - // c++ rules are enfroced elsewhere. + // c++ rules are enforced elsewhere. if (!getLangOptions().CPlusPlus && - !E->getType()->isVoidType() && RequireCompleteType(E->getExprLoc(), E->getType(), - diag::err_incomplete_type)) + diag::err_call_incomplete_argument)) return ExprError(); return Owned(E); diff --git a/clang/test/Sema/variadic-incomplete-arg-type.c b/clang/test/Sema/variadic-incomplete-arg-type.c index 1306173a0ef5..2b5dd1ab9d48 100644 --- a/clang/test/Sema/variadic-incomplete-arg-type.c +++ b/clang/test/Sema/variadic-incomplete-arg-type.c @@ -8,5 +8,6 @@ void junk(int, ...); int main() { CFErrorRef error; - junk(1, *error); // expected-error {{incomplete type 'struct __CFError' where a complete type is required}} + junk(1, *error, (void)0); // expected-error {{argument type 'struct __CFError' is incomplete}} \ + // expected-error {{argument type 'void' is incomplete}} }