aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index ece16e8850..1bab239ab3 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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);