diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-19 01:46:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-19 01:46:36 +0300 |
commit | 5211ff57cdba2480a9268ef5d190a1530d29e196 (patch) | |
tree | 004fa10cd18a93aaaf4256035491effbe0a0bcd3 /src | |
parent | 1ff1ffb9535ddfb5f2ad9d9455257cd8e0c5779e (diff) | |
download | paranucker-5211ff57cdba2480a9268ef5d190a1530d29e196.tar.gz paranucker-5211ff57cdba2480a9268ef5d190a1530d29e196.tar.bz2 paranucker-5211ff57cdba2480a9268ef5d190a1530d29e196.tar.xz paranucker-5211ff57cdba2480a9268ef5d190a1530d29e196.zip |
Fix ability for detect what variable will be non null after while block.
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/statement.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/analysis/statement.cpp b/src/analysis/statement.cpp index 39c03d2..611ad26 100644 --- a/src/analysis/statement.cpp +++ b/src/analysis/statement.cpp @@ -234,6 +234,8 @@ void analyseWhileStmt(WhileStmtNode *node, const WalkItem &wi, WalkItem &wo) else if (bodyNode) { addNeedCheckNullVars2(wo2, wo); + WalkItem wo2Saved = wo2; + WalkItem wcoSaved = wco; const Command oldCommand = command; disableCommand(DetectUseless); @@ -245,7 +247,7 @@ void analyseWhileStmt(WhileStmtNode *node, const WalkItem &wi, WalkItem &wo) command = oldCommand; Log::dumpWI(node, "wco2 ", wco); - removeNeedCheckNullVars2(wco, wo2, wo); + removeNeedCheckNullVars2(wcoSaved, wo2Saved, wo); } wo.isReturned = false; |