Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after ebcbd5ba39

This commit is contained in:
Fangrui Song 2020-06-05 16:16:49 -07:00
parent 825e3bb580
commit 1c44ace1e5
1 changed files with 1 additions and 0 deletions

View File

@ -1097,6 +1097,7 @@ LambdaExpr::LambdaExpr(QualType T, SourceRange IntroducerRange,
ExplicitParams(ExplicitParams), ExplicitResultType(ExplicitResultType),
ClosingBrace(ClosingBrace) {
CXXRecordDecl *Class = getLambdaClass();
(void)Class;
assert(NumCaptures == Class->capture_size() && "Wrong number of captures");
assert(CaptureDefault == Class->getLambdaCaptureDefault());