summaryrefslogtreecommitdiff
path: root/test/sanitizer_common
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-19 12:22:57 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-19 12:22:57 +0000
commitec360889f45b9c5be487aa94b6416b475621c599 (patch)
tree19942ebad348ce877b21922c3cfc473cbdf45081 /test/sanitizer_common
parent0d45d5ee267a176a0ccadb1cc617779717953977 (diff)
downloadcompiler-rt-ec360889f45b9c5be487aa94b6416b475621c599.tar.gz
[sanitizer] Make unrecognized flags not fatal.
Print a warning at verbosity=1 and higher instead of dying immediately. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common')
-rw-r--r--test/sanitizer_common/TestCases/options-invalid.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/sanitizer_common/TestCases/options-invalid.cc b/test/sanitizer_common/TestCases/options-invalid.cc
index 940f1bbbf..3c261405c 100644
--- a/test/sanitizer_common/TestCases/options-invalid.cc
+++ b/test/sanitizer_common/TestCases/options-invalid.cc
@@ -1,7 +1,15 @@
// RUN: %clangxx -O0 %s -o %t
-// RUN: %tool_options=invalid_option_name=10 not %run %t 2>&1 | FileCheck %s
+// RUN: %tool_options=invalid_option_name=10,verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-V1
+// RUN: %tool_options=invalid_option_name=10 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-V0
+
+#include <stdio.h>
int main() {
+ fprintf(stderr, "done\n");
}
-// CHECK: Unknown flag{{.*}}invalid_option_name
+// CHECK-V1: WARNING: found 1 unrecognized
+// CHECK-V1: invalid_option_name
+// CHECK-V0-NOT: WARNING: found 1 unrecognized
+// CHECK-V0-NOT: invalid_option_name
+// CHECK: done