File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1368,9 +1368,12 @@ struct CounterCoverageMappingBuilder
1368
1368
for (const Stmt *Child : S->children ())
1369
1369
if (Child) {
1370
1370
// 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)) {
1374
1377
auto Gap = findGapAreaBetween (getEnd (LastStmt), getStart (Child));
1375
1378
if (Gap)
1376
1379
fillGapAreaWithCount (Gap->getBegin (), Gap->getEnd (),
You can’t perform that action at this time.
0 commit comments