Skip to content

Commit 6a00626

Browse files
committed
Revert "[clang][CoverageMapping] do not emit gap when either end is an ImplicitValueInitExpr"
This reverts commit abbdb31.
1 parent f2931ef commit 6a00626

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,12 +1368,9 @@ 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 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)) {
1371+
// between the two statements. Skipping attributed statements, because
1372+
// they don't have valid start location.
1373+
if (LastStmt && HasTerminateStmt && !isa<AttributedStmt>(Child)) {
13771374
auto Gap = findGapAreaBetween(getEnd(LastStmt), getStart(Child));
13781375
if (Gap)
13791376
fillGapAreaWithCount(Gap->getBegin(), Gap->getEnd(),

0 commit comments

Comments
 (0)