https://bugs.llvm.org/show_bug.cgi?id=25609
Alexander Kornienko <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |[email protected]
Resolution|--- |WORKSFORME
--- Comment #1 from Alexander Kornienko <[email protected]> ---
I can't reproduce this now (even with assertions-enabled build of clang). This
must have been fixed already.
$ cat /tmp/q.cc
int *p;
void bar();
void foo() {
if (p == 0)
bar();
for (int i = 0; i < 99; i++) {}
int x = p[0];
}
$ clang -cc1 -analyze -analyzer-checker core,alpha,unix,cplusplus
-analyzer-config widen-loops=true /tmp/q.cc
/tmp/q.cc:8:13: warning: Array access (from variable 'p') results in a null
pointer dereference
int x = p[0];
^~~~
1 warning generated.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs