File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1368,9 +1368,12 @@ struct CounterCoverageMappingBuilder
13681368 for (const Stmt *Child : S->children ())
13691369 if (Child) {
13701370 // If last statement contains terminate statements, add a gap area
1371- // between the two statements. Skipping attributed statements, because
1372- // they don't have valid start location.
1373- if (LastStmt && HasTerminateStmt && !isa<AttributedStmt>(Child)) {
1371+ // between the two statements. Skipping attributed statements and
1372+ // implicit initializations, because they don't have valid source
1373+ // location.
1374+ if (LastStmt && HasTerminateStmt && !isa<AttributedStmt>(Child) &&
1375+ !isa<ImplicitValueInitExpr>(Child) &&
1376+ !isa<ImplicitValueInitExpr>(LastStmt)) {
13741377 auto Gap = findGapAreaBetween (getEnd (LastStmt), getStart (Child));
13751378 if (Gap)
13761379 fillGapAreaWithCount (Gap->getBegin (), Gap->getEnd (),
You can’t perform that action at this time.
0 commit comments