Change diagnostic test for my last patch.

// rdar://10961370

llvm-svn: 151923
This commit is contained in:
Fariborz Jahanian 2012-03-02 17:05:03 +00:00
parent d01281fe0d
commit bf48281c25
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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}}
}