The analyzer did not return an UndefVal in case a negative value was left shifted.
I also added altered the UndefResultChecker to emit a clear warning in this case.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D39423
[analyzer] Left shifting a negative value is undefined ClosedPublic Authored by xazax.hun on Oct 30 2017, 9:14 AM.
Details Summary The analyzer did not return an UndefVal in case a negative value was left shifted.
Diff Detail Event TimelineHerald added subscribers: szepet, baloghadamsoftware, whisperity. · View Herald TranscriptOct 30 2017, 9:14 AM This revision is now accepted and ready to land.Oct 30 2017, 10:03 AM Closed by commit rL316924: [analyzer] Left shifting a negative value is undefined (authored by xazax). · Explain WhyOct 30 2017, 10:07 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 120837 lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
lib/StaticAnalyzer/Core/BasicValueFactory.cpp
test/Analysis/bitwise-ops.c
|