diff options
Diffstat (limited to 'test/Analysis/casts.m')
| -rw-r--r-- | test/Analysis/casts.m | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/Analysis/casts.m b/test/Analysis/casts.m index 1a78940eee25..895c8119c180 100644 --- a/test/Analysis/casts.m +++ b/test/Analysis/casts.m @@ -1,9 +1,7 @@ // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics -// Test function pointer casts. Currently we track function addresses using -// loc::FunctionVal. Because casts can be arbitrary, do we need to model -// functions with regions? +// Test function pointer casts. typedef void* (*MyFuncTest1)(void); MyFuncTest1 test1_aux(void); @@ -14,8 +12,7 @@ void test1(void) { if (p != ((void*) 0)) x = (*p)(); } -// Test casts from void* to function pointers. Same issue as above: -// should we eventually model function pointers using regions? +// Test casts from void* to function pointers. void* test2(void *p) { MyFuncTest1 fp = (MyFuncTest1) p; return (*fp)(); @@ -41,3 +38,9 @@ adium_media_ready_cb(RDR10087620 *InObj) { InObj.elem |= EEOne; } + + +// PR16690 +_Bool testLocAsIntegerToBool() { + return (long long)&testLocAsIntegerToBool; +} |
