Scalar's operator/ has an inverted test for the LHS being zero.
Details
Diff Detail
- Build Status
Buildable 16392 Build 16392: arc lint + arc unit
Event Timeline
I've also noticed that int->float conversion in Scalar seems incorrect. At least, Scalar.h claims that Scalar follows C promotion rules, but int->float conversion is done using bitwise reinterpretation rather than preserving the value. I have a patch for this, but I don't know whether or not it's correct to change.
Bonus points for catching any other conversion errors that don't match the current C/C++ specs. The unit tests should be an easy place to test these kinds of things.
LGTM, thanks. Do you have commit access or you need somebody to commit this on your behalf?
Allright, we got this one.
davide@Davidinos-Mac-Pro ~/w/l/l/lldb> git llvm push
Pushing 1 commit:
55f24c19d1c [Core] Correctly handle float division in Scalar.
Sending lldb/trunk/source/Core/Scalar.cpp
Sending lldb/trunk/unittests/Core/ScalarTest.cpp
Transmitting file data ..done
Committing transaction...
Committed revision 328649.
Committed 55f24c19d1c to svn.