Move a second variable only used in an assert into the assert.

This prevents unused variable warnings when building without asserts.
This commit is contained in:
Sterling Augustine
2021-02-18 13:25:37 -08:00
parent 66f2d09ebf
commit fc97a63db0

View File

@@ -989,8 +989,8 @@ struct CounterCoverageMappingBuilder
EndDepth--;
}
if (UnnestStart) {
SourceLocation NestedLoc = getEndOfFileOrMacro(AfterLoc);
assert(SM.isWrittenInSameFile(AfterLoc, NestedLoc));
assert(SM.isWrittenInSameFile(AfterLoc,
getEndOfFileOrMacro(AfterLoc)));
AfterLoc = getIncludeOrExpansionLoc(AfterLoc);
assert(AfterLoc.isValid());