https://bugs.llvm.org/show_bug.cgi?id=42938
Bug ID: 42938
Summary: Duplicate "Assuming pointer value..." piece.
Product: clang
Version: 9.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
$ cat test.c
static int *conjure();
void use(int);
void foo() {
int *p = conjure();
p && 0;
use(*p);
}
void bar() { foo(); }
$ clang --analyze test.c --analyzer-output text
...
repro.c:7:3: note: Assuming 'p' is null
p && 0;
^
repro.c:7:3: note: Assuming pointer value is null
p && 0;
^
repro.c:7:5: note: Left side of '&&' is false
p && 0;
^
...
The second note, "Assuming pointer value is null", is clearly redundant.
Interestingly, bar() is necessary to reproduce the problem.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs