r193757 - sizeof... a parameter pack should be an unevaluated context.

Faisal Vali faisalv at yahoo.com
Thu Oct 31 08:58:51 PDT 2013


Author: faisalv
Date: Thu Oct 31 10:58:51 2013
New Revision: 193757

URL: http://llvm.org/viewvc/llvm-project?rev=193757&view=rev
Log:
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 

Modified:
    cfe/trunk/lib/Parse/ParseExpr.cpp

Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=193757&r1=193756&r2=193757&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Thu Oct 31 10:58:51 2013
@@ -1711,6 +1711,9 @@ ExprResult Parser::ParseUnaryExprOrTypeT
     if (!Name)
       return ExprError();
     
+    EnterExpressionEvaluationContext Unevaluated(Actions, Sema::Unevaluated,
+                                                 Sema::ReuseLambdaContextDecl);
+
     return Actions.ActOnSizeofParameterPackExpr(getCurScope(),
                                                 OpTok.getLocation(), 
                                                 *Name, NameLoc,





More information about the cfe-commits mailing list