summaryrefslogtreecommitdiff
path: root/test/sanitizer_common
diff options
context:
space:
mode:
Diffstat (limited to 'test/sanitizer_common')
-rw-r--r--test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc b/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
new file mode 100644
index 000000000..f48cce8ea
--- /dev/null
+++ b/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
@@ -0,0 +1,12 @@
+// RUN: %clang -w -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: lsan
+// UNSUPPORTED: msan
+#include <stdio.h>
+int main() {
+ int a;
+ printf("%Q\n", 1);
+ printf("%Q\n", 1);
+ printf("%Q\n", 1);
+}
+// CHECK: unexpected format specifier in printf interceptor: %Q (reported once per process)
+// CHECK-NOT: unexpected format specifier in printf interceptor