]> granicus.if.org Git - clang/commit
[analyzer] Shitfing a constant value by its bit width is undefined.
authorJordan Rose <jordan_rose@apple.com>
Thu, 16 Jan 2014 18:02:23 +0000 (18:02 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 16 Jan 2014 18:02:23 +0000 (18:02 +0000)
commit5e21db7130f81fdcb219c31bba8a25153ce47ab8
tree546c2a4773766c3987f06d4531ee0896e631d1f5
parentf6e50b28981f58e39ea6996db1d4359107d0b92d
[analyzer] Shitfing a constant value by its bit width is undefined.

Citation: C++11 [expr.shift]p1 (and the equivalent text in C11).

This fixes PR18073, but the right thing to do (as noted in the FIXME) is to
have a real checker for too-large shifts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199405 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BasicValueFactory.cpp
test/Analysis/bitwise-ops.c