summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 0719f4156f3..5ed4c6153d3 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -181,12 +181,10 @@ Optional<unsigned> clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(
return FailDistance;
const unsigned IndexOfCaptureReadyLambda = OptionalStackIndex.getValue();
- assert(
- ((IndexOfCaptureReadyLambda != (FunctionScopes.size() - 1)) ||
- (S.getCurGenericLambda() && S.getCurGenericLambda()->ImpCaptureStyle !=
- sema::LambdaScopeInfo::ImpCap_None)) &&
- "The capture ready lambda for a potential capture can only be the "
- "current lambda if it is a generic lambda with an implicit capture");
+ assert(((IndexOfCaptureReadyLambda != (FunctionScopes.size() - 1)) ||
+ S.getCurGenericLambda()) &&
+ "The capture ready lambda for a potential capture can only be the "
+ "current lambda if it is a generic lambda with an implicit capture");
const sema::LambdaScopeInfo *const CaptureReadyLambdaLSI =
cast<sema::LambdaScopeInfo>(FunctionScopes[IndexOfCaptureReadyLambda]);
OpenPOWER on IntegriCloud