Skip to content

Commit 4544a63

Browse files
Move variable only used in an assert into the assert.
This prevents unused variable warnings when building without asserts.
1 parent 4045ad6 commit 4544a63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,8 @@ struct CounterCoverageMappingBuilder
981981
bool UnnestStart = StartDepth >= EndDepth;
982982
bool UnnestEnd = EndDepth >= StartDepth;
983983
if (UnnestEnd) {
984-
SourceLocation NestedLoc = getStartOfFileOrMacro(BeforeLoc);
985-
assert(SM.isWrittenInSameFile(NestedLoc, BeforeLoc));
984+
assert(SM.isWrittenInSameFile(getStartOfFileOrMacro(BeforeLoc),
985+
BeforeLoc));
986986

987987
BeforeLoc = getIncludeOrExpansionLoc(BeforeLoc);
988988
assert(BeforeLoc.isValid());

0 commit comments

Comments
 (0)