summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/fsanitize-coverage.c
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-02-18 00:49:23 +0000
committerKostya Serebryany <kcc@google.com>2016-02-18 00:49:23 +0000
commit52e86493e38c352c552907178f5953a4fa954631 (patch)
tree3bef302483f36eadb49e0c17452c3d22dd69fb39 /clang/test/Driver/fsanitize-coverage.c
parentc4ac8bd0513b932e4e9e0b3e5bf3eec8c1e5b9a8 (diff)
downloadbcm5719-llvm-52e86493e38c352c552907178f5953a4fa954631.tar.gz
bcm5719-llvm-52e86493e38c352c552907178f5953a4fa954631.zip
[sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and w/o ...=[func,bb,edge]. This makes this syntax a superset of the GCC's syntax
llvm-svn: 261182
Diffstat (limited to 'clang/test/Driver/fsanitize-coverage.c')
-rw-r--r--clang/test/Driver/fsanitize-coverage.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/Driver/fsanitize-coverage.c b/clang/test/Driver/fsanitize-coverage.c
index 7aff3c270d3..2e12ff334f6 100644
--- a/clang/test/Driver/fsanitize-coverage.c
+++ b/clang/test/Driver/fsanitize-coverage.c
@@ -56,6 +56,14 @@
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=8bit-counters %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-TYPE
// CHECK-MISSING-TYPE: error: invalid argument '-fsanitize-coverage=8bit-counters' only allowed with '-fsanitize-coverage=(func|bb|edge)'
+// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=trace-pc %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE_PC_EDGE
+// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=edge,trace-pc %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE_PC_EDGE
+// CHECK-TRACE_PC_EDGE: -fsanitize-coverage-type=3
+// CHECK-TRACE_PC_EDGE: -fsanitize-coverage-trace-pc
+// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=func,trace-pc %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE_PC_FUNC
+// CHECK-TRACE_PC_FUNC: -fsanitize-coverage-type=1
+// CHECK-TRACE_PC_FUNC: -fsanitize-coverage-trace-pc
+
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=trace-cmp,indirect-calls %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TYPE-NECESSARY
// CHECK-NO-TYPE-NECESSARY-NOT: error:
// CHECK-NO-TYPE-NECESSARY: -fsanitize-coverage-indirect-calls
@@ -70,5 +78,5 @@
// CLANG-CL-COVERAGE-NOT: warning:
// CLANG-CL-COVERAGE-NOT: argument unused
// CLANG-CL-COVERAGE-NOT: unknown argument
-// CLANG-CL-COVERAGE: -fsanitize=address
// CLANG-CL-COVERAGE: -fsanitize-coverage-type=1
+// CLANG-CL-COVERAGE: -fsanitize=address
OpenPOWER on IntegriCloud