diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-27 20:23:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-27 20:23:58 +0000 |
commit | 56471fdba879c4de26c93c4a4dfbc731f67d2a18 (patch) | |
tree | 05fbf0b9c5ec4635be7d9234b68b7ac05e121bc5 /clang/lib/Sema/SemaExpr.cpp | |
parent | 8567355e8c5cb73f8fe17961a613590d41a74132 (diff) | |
download | bcm5719-llvm-56471fdba879c4de26c93c4a4dfbc731f67d2a18.tar.gz bcm5719-llvm-56471fdba879c4de26c93c4a4dfbc731f67d2a18.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |