repo.or.cz
/
clang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git]
/
test
/
Analysis
/
base-init.cpp
blob
800763b25b4990c8bcd96a67378526de59d39b05
1
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-initializers -verify %s
2
3
class
A
{
4
int
x
;
5
public
:
6
A
();
7
int
getx
()
const
{
8
return
x
;
9
}
10
};
11
12
A
::
A
() :
x
(
0
) {
13
}
14
15
class
B
:
public
A
{
16
int
y
;
17
public
:
18
B
();
19
};
20
21
B
::
B
() {
22
}
23
24
void
f
() {
25
B b
;
26
if
(
b
.
getx
() !=
0
) {
27
int
*
p
=
0
;
28
*
p
=
0
;
// no-warning
29
}
30
}