[LLVMbugs] [Bug 8015] New: False use of undefined value warning due to not handling "array[symbolic value]" correctly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 27 17:22:29 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8015
Summary: False use of undefined value warning due to not
handling "array[symbolic value]" correctly
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: kremenek at apple.com
CC: llvmbugs at cs.uiuc.edu
We are emitting a false positive for the following snippet:
$ cat t.c
int getNumber();
void foo() {
int number = getNumber();
const char *numbers[] = { "zero" };
if (number == 0) {
foo(numbers[number]);
}
}
$ clang --analyze t.c
t.c:6:9: warning: Pass-by-value argument in function call is undefined
foo(numbers[number]);
^ ~~~~~~~~~~~~~~~
1 warning generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list