Move variable only used inside an assert into the assert.

This prevents build failures with -Wunused.
This commit is contained in:
Sterling Augustine 2021-06-10 13:12:46 -07:00
parent b6ee5f2b1d
commit 1d3873d41e
1 changed files with 1 additions and 2 deletions

View File

@ -3206,8 +3206,7 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
}
case STMT_OMP_UNROLL_DIRECTIVE: {
unsigned NumLoops = Record[ASTStmtReader::NumStmtFields];
assert(NumLoops == 1 && "Unroll directive accepts only a single loop");
assert(Record[ASTStmtReader::NumStmtFields] == 1 && "Unroll directive accepts only a single loop");
unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
S = OMPUnrollDirective::CreateEmpty(Context, NumClauses);
break;