blob: 37b8e3d122b1d53e4bdba087f9626793b6c957a0 [file] [log] [blame]
Ted Kremenekc5302912009-03-05 20:22:13 +00001// RUN: clang -analyze -checker-cfref -analyzer-store=basic --verify %s &&
2// RUN: clang -analyze -checker-cfref -analyzer-store=region --verify %s
3
4// Test function pointer casts. Currently we track function addresses using
5// loc::FunctionVal. Because casts can be arbitrary, do we need to model
6// functions with regions?
7
8typedef void (*MyFuncTest1)(void);
9
10MyFuncTest1 test1_aux(void);
11void test1(void) {
12 void *x;
13 void* (*p)(void);
14 p = ((void*) test1_aux());
15 if (p != ((void*) 0)) x = (*p)();
16}