Author: Sterling Augustine Date: 2021-02-18T13:26:07-08:00 New Revision: fc97a63db0d3488ce6c422a9545f8b0268760918
URL: https://github.com/llvm/llvm-project/commit/fc97a63db0d3488ce6c422a9545f8b0268760918 DIFF: https://github.com/llvm/llvm-project/commit/fc97a63db0d3488ce6c422a9545f8b0268760918.diff LOG: Move a second variable only used in an assert into the assert. This prevents unused variable warnings when building without asserts. Added: Modified: clang/lib/CodeGen/CoverageMappingGen.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index 519b9ad4bdbd..72ed10d5c360 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -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()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits