1 // RUN: %clang_analyze_cc1 %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=alpha.unix.cstring.OutOfBounds,alpha.unix.cstring.UninitializedRead \
4 // RUN: -analyzer-config eagerly-assume=false \
7 // expected-no-diagnostics
9 typedef typeof(sizeof(int)) size_t;
10 void *memmove(void *, const void *, size_t);
21 int f
= c
& ~3, g
= f
;
26 // Parent state is already infeasible.
27 // clang_analyzer_printState();
29 // { "symbol": "(derived_$3{conj_$0{int, LC1, S728, #1},c}) & -4", "range": "{ [1, 1] }" },
30 // { "symbol": "derived_$3{conj_$0{int, LC1, S728, #1},c}", "range": "{ [1024, 2147483647] }" }
33 // This sould not crash!
34 // It crashes in baseline, since there both true and false states are nullptr!
35 memmove(a
->a
, &a
->a
[f
], c
- f
);