forked from OSchip/llvm-project
Change diagnostic test for my last patch.
// rdar://10961370 llvm-svn: 151923
This commit is contained in:
parent
d01281fe0d
commit
bf48281c25
|
@ -587,11 +587,10 @@ ExprResult Sema::DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT,
|
||||||
E = Comma.get();
|
E = Comma.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// c++ rules are enfroced elsewhere.
|
// c++ rules are enforced elsewhere.
|
||||||
if (!getLangOptions().CPlusPlus &&
|
if (!getLangOptions().CPlusPlus &&
|
||||||
!E->getType()->isVoidType() &&
|
|
||||||
RequireCompleteType(E->getExprLoc(), E->getType(),
|
RequireCompleteType(E->getExprLoc(), E->getType(),
|
||||||
diag::err_incomplete_type))
|
diag::err_call_incomplete_argument))
|
||||||
return ExprError();
|
return ExprError();
|
||||||
|
|
||||||
return Owned(E);
|
return Owned(E);
|
||||||
|
|
|
@ -8,5 +8,6 @@ void junk(int, ...);
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
CFErrorRef error;
|
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}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue