[cfe-dev] [analyzer] Looking up previously stored custom state for ParmVarDecls that have gone out of scope

Timothy J. Wood via cfe-dev cfe-dev at lists.llvm.org
Tue May 1 15:20:40 PDT 2018



> On May 1, 2018, at 2:09 PM, Timothy J. Wood via cfe-dev <cfe-dev at lists.llvm.org> wrote:
[…]
> I'm guessing that both the change in the SVal name, and the lack of constraint are due to _outError going out of scope. Making things more odd, though, is that in the exploded graph dot file (attached below too) if you search for the state "0x7ff604800b48" (from the first [C] / checkPreStmt<ReturnStmt> above), you can see that it still has a constraint "reg_$1<NSError ** outError> : { [0, 0] }". In my real checker, I implement the checkDeadSymbols callback and make notes about whether an outError ParmVarDecl value was definitely null when it went out of scope, or whether it was definitely non-null, but had a valid value written to *outError at the time.
[...]

Hmm… looking back at the output from my real checker, it may be worse or something totally different. I don’t get a checkDeadSymbols call from inside the inline static function that could explain the _outError getting renamed/unconstrained.

-tim




More information about the cfe-dev mailing list