casts.m revision c530291ada4085f962cfbab7a1732a45e992688c
1// 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}
17