[PATCH] sizeof a packexpansion should be in an unevaluated context

Faisal Vali faisalv at yahoo.com
Sat Oct 26 08:38:04 PDT 2013


Hi rsmith, doug.gregor,


    [](auto ... a) {
       return [](auto b) {
          return sizeof...(a); <-- this should be in an unevaluated context
       }
   }


http://llvm-reviews.chandlerc.com/D2029

Files:
  ParseExpr.cpp

Index: ParseExpr.cpp
===================================================================
--- ParseExpr.cpp
+++ ParseExpr.cpp
@@ -1711,6 +1711,9 @@
     if (!Name)
       return ExprError();
     
+    EnterExpressionEvaluationContext Unevaluated(Actions, Sema::Unevaluated,
+                                                 Sema::ReuseLambdaContextDecl);
+
     return Actions.ActOnSizeofParameterPackExpr(getCurScope(),
                                                 OpTok.getLocation(), 
                                                 *Name, NameLoc,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2029.1.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131026/5fecb8ee/attachment.bin>


More information about the cfe-commits mailing list