summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp12
-rw-r--r--clang/test/CoverageMapping/switch.cpp13
2 files changed, 0 insertions, 25 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 27d98dc60d7..07d16186b66 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -797,18 +797,6 @@ struct CounterCoverageMappingBuilder
terminateRegion(S);
}
- void VisitCallExpr(const CallExpr *E) {
- extendRegion(E);
- for (const Stmt *Child : E->children())
- this->Visit(Child);
-
- // Terminate the region when we hit a noreturn function.
- // (This is helpful dealing with switch statements.)
- QualType CalleeType = E->getCallee()->getType();
- if (getFunctionExtInfo(*CalleeType).getNoReturn())
- terminateRegion(E);
- }
-
void VisitWhileStmt(const WhileStmt *S) {
extendRegion(S);
diff --git a/clang/test/CoverageMapping/switch.cpp b/clang/test/CoverageMapping/switch.cpp
index d347e663d10..8b0cf7c2fb8 100644
--- a/clang/test/CoverageMapping/switch.cpp
+++ b/clang/test/CoverageMapping/switch.cpp
@@ -97,16 +97,3 @@ int fallthrough(int i) { // CHECK-NEXT: File 0, [[@LINE]]:24 -> [[@LINE+12]]:2 =
break;
}
}
-
-void abort(void) __attribute((noreturn));
- // CHECK: noret
-int noret(int x) { // CHECK-NEXT: File 0, [[@LINE]]:18 -> [[@LINE+9]]:2
- switch (x) {
- default: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:12
- abort();
- case 1: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:13
- return 5;
- case 2: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:14
- return 10;
- }
-}
OpenPOWER on IntegriCloud