[PATCH] D53624: [analyzer] For now model that OSDynamicCast never returns 0
Artem Dergachev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 17:24:01 PDT 2018
NoQ added inline comments.
================
Comment at: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp:813-814
+ // output are non-zero.
+ if (auto L = RetVal.getAs<DefinedOrUnknownSVal>())
+ state = state->assume(*L, /*Assumption=*/true);
+
----------------
If assume fails and yields a null state, you shouldn't transition into that state; it won't generate a sink but will instead transition into the original state (with the original program point but with checker tag).
Repository:
rL LLVM
https://reviews.llvm.org/D53624
More information about the llvm-commits
mailing list