We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 108a9ac commit 6629cf1Copy full SHA for 6629cf1
clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -374,9 +374,10 @@ class CoverageMappingBuilder {
374
auto NonScratchExpansionLoc = getNonScratchExpansionLoc(Loc);
375
Loc = NonScratchExpansionLoc.first;
376
auto EndLoc = NonScratchExpansionLoc.second;
377
- Region.setStartLoc(Loc);
378
- Region.setEndLoc(EndLoc.has_value() ? EndLoc.value()
379
- : Region.getEndLoc());
+ if (EndLoc.has_value()) {
+ Region.setStartLoc(Loc);
+ Region.setEndLoc(EndLoc.value());
380
+ }
381
382
// Replace Loc with FileLoc if it is expanded with system headers.
383
if (!SystemHeadersCoverage && SM.isInSystemMacro(Loc)) {
0 commit comments