blob: 046ffb53c8ff4088cb82c8af9028b24d2cda7c3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -verify %s
void fill_r (int * const &x);
char testPointer () {
int x[8];
int *xp = x;
fill_r(xp);
return x[0]; // no-warning
}
char testArray () {
int x[8];
fill_r(x);
return x[0]; // no-warning
}
char testReferenceCast () {
int x[8];
int *xp = x;
fill_r(reinterpret_cast<int * const &>(xp));
return x[0]; // no-warning
}
void fill (int *x);
char testReferenceCastRValue () {
int x[8];
int *xp = x;
fill(reinterpret_cast<int * const &>(xp));
return x[0]; // no-warning
}
|