From b585a94ad0cb30570cf4f14e2dc1ebb43f694bb3 Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Tue, 24 Jul 2018 22:04:02 +0200 Subject: add declarations to escapingFunctions --- test/Feature/EscapingFunctions.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test/Feature') diff --git a/test/Feature/EscapingFunctions.c b/test/Feature/EscapingFunctions.c index 8c9612a5..bb9b8a4a 100644 --- a/test/Feature/EscapingFunctions.c +++ b/test/Feature/EscapingFunctions.c @@ -3,6 +3,8 @@ // RUN: %klee -debug-print-escaping-functions --output-dir=%t.klee-out %t.bc 2> %t.log // RUN: FileCheck --input-file=%t.log %s +#include + int functionpointer(void) { return 1; } @@ -33,6 +35,9 @@ two: return 2; } +int function_declaration(void); +uint8_t bitcasted_function_declaration(void); + int main(int argc, char *argv[]) { int (*f1)(void) = functionpointer; f1(); @@ -44,6 +49,12 @@ int main(int argc, char *argv[]) { blockaddress(argc); - // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer), ){3}\]}} + int (*f3)(void) = function_declaration; + f3(); + + uint64_t (*f4)(void) =(uint64_t (*)(void))bitcasted_function_declaration; + f4(); + + // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer|function_declaration|bitcasted_function_declaration), ){5}\]}} return 0; } -- cgit 1.4.1