[Coverage] Remove deferred region for trailing return, fixes PR34611
As a special case, throw away deferred regions for trailing returns.
This allows the closing curly brace to have a count, and is less
distracting.
llvm-svn: 313603
diff --git a/clang/test/CoverageMapping/deferred-region.cpp b/clang/test/CoverageMapping/deferred-region.cpp
index 41b5e6b..743b635 100644
--- a/clang/test/CoverageMapping/deferred-region.cpp
+++ b/clang/test/CoverageMapping/deferred-region.cpp
@@ -28,6 +28,14 @@
return; // CHECK-NOT: File
}
+// CHECK-LABEL: _Z3mazv:
+void maz() {
+ if (true)
+ return; // CHECK: Gap,File 0, [[@LINE]]:11 -> 36:3 = (#0 - #1)
+
+ return; // CHECK-NOT: Gap
+}
+
// CHECK-LABEL: _Z3bari:
void bar(int x) {
IF (x)