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
Introduce ObjCMessageExpr::getReceiverRange() to get the source range of the receiver.
[clang.git]
/
test
/
Analysis
/
new.cpp
blob
f26eecd4b196a9a39946109f946118547371a961
1
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -verify %s
2
3
void
f1
() {
4
int
*
n
=
new
int
;
5
if
(*
n
) {
// expected-warning {{Branch condition evaluates to a garbage value}}
6
}
7
}
8
9
void
f2
() {
10
int
*
n
=
new
int
(
3
);
11
if
(*
n
) {
// no-warning
12
}
13
}
14