[analyzer] Shitfing a constant value by its bit width is undefined.

Press ? to show keyboard shortcuts.
Committed
jroseJan 16 2014, 10:02 AM
Parents
rL199404: llvm-symbolizer: make mangled name heuristic apply to all symbols
Branches
Unknown
Tags
Unknown
Subscribers
None
Description

[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.

rL199405

cfe/trunk/lib/StaticAnalyzer/Core/BasicValueFactory.cpp

Loading...

cfe/trunk/test/Analysis/bitwise-ops.c

Loading...

Add Comment