http://llvm.org/bugs/show_bug.cgi?id=10163
Summary: false positive on partially initialized array of
floating point values.
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
When using implicit array initialization on array of non integral values
(either float or double), clang properly generate a memset(0) to initialize the
array, but the static analyzer does not consider the array as initialized.
----- foo.c
extern void CGAffineTransformMake(double a, double b, double c, double d,
double tx, double ty);
void test2() {
float matrix[6] = { 0 };
return CGAffineTransformMake(matrix[0], matrix[1], matrix[2], matrix[3],
matrix[4], matrix[5]);
}
------
$ clang --analyze foo.c
foo.c:7:10: warning: Function call argument is an uninitialized value
return CGAffineTransformMake(matrix[0], matrix[1], matrix[2], matrix[3],
matrix[4], matrix[5]);
^ ~~~~~~~~~
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