| Daniel Dunbar | ffd408a | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify && |
| Ted Kremenek | 8871d5a | 2009-05-01 19:22:20 +0000 | [diff] [blame] | 2 | // RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify |
| Ted Kremenek | 66f07b1 | 2008-10-18 03:28:48 +0000 | [diff] [blame] | 3 | |
| 4 | unsigned foo(); | ||||
| 5 | typedef struct bf { unsigned x:2; } bf; | ||||
| 6 | void bar() { | ||||
| 7 | bf y; | ||||
| 8 | *(unsigned*)&y = foo(); | ||||
| 9 | y.x = 1; | ||||
| 10 | } | ||||