From 0bee72a563eeecc365b7b3d4fda9f9adff83244b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 20 Jul 2015 00:49:51 +0300 Subject: Allow detect if variable was assigned nullptr. --- src/analysis/expression.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/analysis') diff --git a/src/analysis/expression.cpp b/src/analysis/expression.cpp index 70b1666..2ea26e6 100644 --- a/src/analysis/expression.cpp +++ b/src/analysis/expression.cpp @@ -179,6 +179,11 @@ void analyseModifyExpr(ModifyExprNode *node, const WalkItem &wi, WalkItem &wo) { handled = handleSetVarToFunction(var1, arg1, wo); } + else if (arg1 == INTEGER_CST && arg1->label == "0") + { + addNullVar(wo, var1); + handled = true; + } // have var1 only (var1 = UNKNOWN) if (!handled) removeVar(wo, var1); -- cgit v1.2.3-70-g09d2