From 56471fdba879c4de26c93c4a4dfbc731f67d2a18 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 27 Jun 2012 20:23:58 +0000 Subject: Check for non-POD vararg argument type after default argument promotion, not before, so we don't incorrectly think arguments of function type are non-POD. llvm-svn: 159290 --- clang/lib/Sema/SemaExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 2a7a8b9f195..aec941c4c1c 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -679,7 +679,7 @@ ExprResult Sema::DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, // Diagnostics regarding non-POD argument types are // emitted along with format string checking in Sema::CheckFunctionCall(). - if (isValidVarArgType(Ty) == VAK_Invalid) { + if (isValidVarArgType(E->getType()) == VAK_Invalid) { // Turn this into a trap. CXXScopeSpec SS; SourceLocation TemplateKWLoc; -- cgit v1.2.3