I'm working on a simple checker for objc block calls and faced some strange behaviour of ConstraintsManager.
Even for simple case like this: - (void) callObjcBlock:(void(^)(void)) blockVar { blockVar(); } ConstraintsManager believes that called 'blockVar' is constrained to be non null, not unknown. I have noticed that with disabled 'CallAndMessageChecker' ConstraintsManager begins to work correctly. I believe that managed to localise the problematic code. At the end of 'CallAndMessageChecker::checkPreStmt' method at CallAndMessageChecker.cpp. StNonNull state is added as transition to CheckerContext without prior checking that StNull is nullptr. Isn't it would be more correct to write it this way: if(!StNull) { C.addTransition(StNonNull); } Could someone suggest me should or should not it be fixed ?
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits