Skip to content

Commit 2f37c9e

Browse files
authored
Revert "[Coverage] Fix region termination for GNU statement expressions (#130…"
This reverts commit 0827e3a.
1 parent 0f7bd60 commit 2f37c9e

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,14 +1505,6 @@ struct CounterCoverageMappingBuilder
15051505
handleFileExit(getEnd(S));
15061506
}
15071507

1508-
void VisitStmtExpr(const StmtExpr *E) {
1509-
Visit(E->getSubStmt());
1510-
// Any region termination (such as a noreturn CallExpr) within the statement
1511-
// expression has been handled by visiting the sub-statement. The visitor
1512-
// cannot be at a terminate statement leaving the statement expression.
1513-
HasTerminateStmt = false;
1514-
}
1515-
15161508
void VisitDecl(const Decl *D) {
15171509
Stmt *Body = D->getBody();
15181510

clang/test/CoverageMapping/terminate-statements.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,6 @@ int elsecondnoret(void) {
346346
return 0;
347347
}
348348

349-
// CHECK-LABEL: _Z18statementexprnoretb
350-
int statementexprnoret(bool crash) {
351-
int rc = ({ if (crash) abort(); 0; }); // CHECK: File 0, 351:35 -> 352:12 = (#0 - #1)
352-
return rc; // CHECK-NOT: Gap
353-
}
354-
355349
int main() {
356350
foo(0);
357351
foo(1);
@@ -374,6 +368,5 @@ int main() {
374368
ornoret();
375369
abstractcondnoret();
376370
elsecondnoret();
377-
statementexprnoret(false);
378371
return 0;
379372
}

compiler-rt/test/profile/Linux/coverage-statement-expression.cpp

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)