[docs] Fix build-docs.sh
[llvm-project.git] / compiler-rt / test / dfsan / vararg.c
blobf9e62ac03d8581e87e72962152d0a04ac9570348
1 // RUN: %clang_dfsan %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: %run %t foo
4 //
5 // REQUIRES: x86_64-target-arch
7 #include <stdio.h>
9 int do_nothing(const char *format, ...) {
10 return 0;
13 int main(int argc, char **argv) {
14 int (*fp)(const char *, ...);
16 if (argc > 1)
17 fp = do_nothing;
18 else
19 fp = printf;
21 // CHECK: FATAL: DataFlowSanitizer: unsupported indirect call to vararg function printf
22 fp("hello %s\n", "world");