[PATCH] Implement capturing for generic lambdas

Faisal Vali faisalv at yahoo.com
Wed Nov 6 07:31:54 PST 2013



================
Comment at: lib/Sema/SemaExprCXX.cpp:5783-5784
@@ -5769,1 +5782,4 @@
 
+// If the variable's initializer is dependent, analyze it for any constructs 
+// that we can use to conclude that the initializer can never be a constexpr.
+
----------------
Richard Smith wrote:
> This isn't quite correct: you need to avoid walking into subexpressions that might not be evaluated (operands of `?:`, RHS of `&&` and `||`, ....).
> 
> Please take this out of the patch for now, we can review this diagnostic/QoI improvement separately once we have the main functionality landed. (This seems like useful functionality for other diagnostics too.)
Aah - Yes - will expunge it.
I agree - it would be nice to have this functionality - perhaps we can work on this afterwards!


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



More information about the cfe-commits mailing list