[LLVMbugs] [Bug 13319] New: Possibly mistyped if condition in DivZeroChecker::checkPreStmt
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 10 08:25:27 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13319
Bug #: 13319
Summary: Possibly mistyped if condition in
DivZeroChecker::checkPreStmt
Product: clang
Version: 3.1
Platform: PC
OS/Version: other
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: jmihalicza at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
As I was browsing the source code I found this strange condition:
void DivZeroChecker::checkPreStmt(const BinaryOperator *B,
CheckerContext &C) const {
...
if (!B->getRHS()->getType()->isIntegerType() ||
!B->getRHS()->getType()->isScalarType())
return;
Correct me if I am wrong, but I think it should be && instead of ||.
Or simply check for scalar only as integers are scalars.
--
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