aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-27 20:23:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-27 20:23:58 +0000
commit83ea530f9da1b8ca57773bf53418ce9fc98f46ac (patch)
tree0e914b2c37ee777b1bea473cf0040320a664daa4 /lib/Sema/SemaExpr.cpp
parent12d2cc71bfeb1e7be9ce00fc52feab50941cac24 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 2a7a8b9f19..aec941c4c1 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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;