From 6b0dc6426f0cf1e74627f4fa92729c42c306347b Mon Sep 17 00:00:00 2001 From: Faisal Vali Date: Thu, 31 Oct 2013 15:58:51 +0000 Subject: [PATCH] sizeof... a parameter pack should be an unevaluated context. - can't think of a way to test this without generic lambda captures, but will include a test once that patch is made commit-ready. patch was ok'd by Doug. http://llvm-reviews.chandlerc.com/D2029 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193757 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseExpr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 8867b08e4f..e9cb827bd9 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1711,6 +1711,9 @@ ExprResult Parser::ParseUnaryExprOrTypeTraitExpression() { if (!Name) return ExprError(); + EnterExpressionEvaluationContext Unevaluated(Actions, Sema::Unevaluated, + Sema::ReuseLambdaContextDecl); + return Actions.ActOnSizeofParameterPackExpr(getCurScope(), OpTok.getLocation(), *Name, NameLoc, -- 2.40.0