By making sure the returned value from getKnownSVal is consistent with the value used inside expression engine.
PR38427
Paths
| Differential D51252
[analyzer] Resolve the crash in ReturnUndefChecker ClosedPublic Authored by george.karpenkov on Aug 24 2018, 6:47 PM.
Details Summary By making sure the returned value from getKnownSVal is consistent with the value used inside expression engine. PR38427
Diff Detail Event TimelineHerald added subscribers: Szelethus, mikhail.ramalho, a.sidorin and 3 others. · View Herald TranscriptAug 24 2018, 6:47 PM NoQ added inline comments.
This revision is now accepted and ready to land.Aug 29 2018, 12:00 PM Closed by commit rC340965: [analyzer] Resolve the crash in ReturnUndefChecker (authored by george.karpenkov). · Explain WhyAug 29 2018, 1:31 PM Closed by commit rL340965: [analyzer] Resolve the crash in ReturnUndefChecker (authored by george.karpenkov). · Explain Why This revision was automatically updated to reflect the committed changes. This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 162536 clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
clang/test/Analysis/casts.c
|
Yup, this function, by contract, trying to explain why does ExprEngine think that the value is undefined, and it knows that ExprEngine would only decide that if the operands are known.
The assertion is good but i guess it'd be great to document this contract more explicitly.