aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/lit_tests/TestCases/default_options.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/lit_tests/TestCases/default_options.cc')
-rw-r--r--lib/asan/lit_tests/TestCases/default_options.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/asan/lit_tests/TestCases/default_options.cc b/lib/asan/lit_tests/TestCases/default_options.cc
new file mode 100644
index 000000000000..84b80557b852
--- /dev/null
+++ b/lib/asan/lit_tests/TestCases/default_options.cc
@@ -0,0 +1,15 @@
+// RUN: %clangxx_asan -O2 %s -o %t
+// RUN: %t 2>&1 | FileCheck %s
+
+const char *kAsanDefaultOptions="verbosity=1 foo=bar";
+
+extern "C"
+__attribute__((no_sanitize_address))
+const char *__asan_default_options() {
+ // CHECK: Using the defaults from __asan_default_options: {{.*}} foo=bar
+ return kAsanDefaultOptions;
+}
+
+int main() {
+ return 0;
+}