http://llvm.org/bugs/show_bug.cgi?id=10238
Summary: False positive with class scope "static const" used
with an object
Product: clang
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Hi,
this little code gives me an "operand is a garbage value" warning:
struct Array {
static const int size = 4;
};
bool fn(Array &a) {
int s = a.size;
return s>0;
}
If I remove the "int s = a.size" line, and change the end to "return a.size>0",
I don't get a warning.
Or, If I change a.size to Array::size, I don't get a warning either.
--
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