From 9cb9fd54846415d0c271cd178d4a9bfe6493ad00 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Fri, 23 Jun 2023 22:05:12 +0100 Subject: Replaced --suppress-external-warnings and --all-external-warnings with --external-call-warnings=none|once-per-function|all. This eliminates the ambiguity when both of the old options were set. Added test for the new option. --- test/Feature/ExtCallWarnings.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/Feature/ExtCallWarnings.c (limited to 'test') diff --git a/test/Feature/ExtCallWarnings.c b/test/Feature/ExtCallWarnings.c new file mode 100644 index 00000000..6ee3f371 --- /dev/null +++ b/test/Feature/ExtCallWarnings.c @@ -0,0 +1,26 @@ +// RUN: %clang %s -emit-llvm %O0opt -g -c -o %t.bc + +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --external-call-warnings=none %t.bc 2>&1 | FileCheck --check-prefix=CHECK-NONE %s + +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --external-call-warnings=once-per-function %t.bc 2>&1 | FileCheck --check-prefix=CHECK-ONCE %s + +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out --external-call-warnings=all %t.bc 2>&1 | FileCheck --check-prefix=CHECK-ALL %s + +#include "klee/klee.h" +#include +#include + +int main() { + return abs(-5) + abs(6); + // CHECK-NONE-NOT: calling external + + // CHECK-ONCE: calling external + // CHECK-ONCE-NOT: calling external + + // CHECK-ALL: calling external + // CHECK-ALL: calling external + // CHECK-ALL-NOT: calling external +} -- cgit 1.4.1