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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs