]> granicus.if.org Git - clang/commitdiff
sizeof... a parameter pack should be an unevaluated context.
authorFaisal Vali <faisalv@yahoo.com>
Thu, 31 Oct 2013 15:58:51 +0000 (15:58 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Thu, 31 Oct 2013 15:58:51 +0000 (15:58 +0000)
- 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

index 8867b08e4ff252dbac182bc75a0862c613a7e25c..e9cb827bd99dd2e032450cfde13708e622a15e27 100644 (file)
@@ -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,