diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-11 17:02:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-11 17:49:30 +0300 |
commit | 863ede59a63ea38e98960659ab98da7531046783 (patch) | |
tree | 693ecf2fa3e4bf75d8ead77ebe43a2a8b82829ee /src/analysis/expression.cpp | |
parent | 69537789ddcdc659da19bc560afc23b5b3d8156b (diff) | |
download | paranucker-863ede59a63ea38e98960659ab98da7531046783.tar.gz paranucker-863ede59a63ea38e98960659ab98da7531046783.tar.bz2 paranucker-863ede59a63ea38e98960659ab98da7531046783.tar.xz paranucker-863ede59a63ea38e98960659ab98da7531046783.zip |
Change how node analysers getting information about current tasks.
Now two variables one const for input data, and second for output data.
Diffstat (limited to 'src/analysis/expression.cpp')
-rw-r--r-- | src/analysis/expression.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/analysis/expression.cpp b/src/analysis/expression.cpp index da59cd5..a46023d 100644 --- a/src/analysis/expression.cpp +++ b/src/analysis/expression.cpp @@ -37,11 +37,11 @@ namespace Analysis { -WalkItem analyseModifyExpr(ModifyExprNode *node, WalkItem wi) +void analyseModifyExpr(ModifyExprNode *node, const WalkItem &wi, WalkItem &wo) { // need atleast one arg for check if (node->args.empty() || command == FindArgs) - return wi; + return; Node *arg = node->args[0]; if (arg->nodeType == INDIRECT_REF) @@ -49,7 +49,7 @@ WalkItem analyseModifyExpr(ModifyExprNode *node, WalkItem wi) IndirectRefNode *refNode = static_cast<IndirectRefNode*>(arg); // need atleast one arg for check if (refNode->args.empty()) - return wi; + return; arg = refNode->args[0]; if (arg->nodeType == PARM_DECL) { @@ -60,15 +60,13 @@ WalkItem analyseModifyExpr(ModifyExprNode *node, WalkItem wi) } } } - - return wi; } -WalkItem analysePointerPlusExpr(PointerPlusExprNode *node, WalkItem wi) +void analysePointerPlusExpr(PointerPlusExprNode *node, const WalkItem &wi, WalkItem &wo) { // need atleast one arg for check if (node->args.empty() || command == FindArgs) - return wi; + return; Node *arg = node->args[0]; if (arg->nodeType == PARM_DECL) @@ -79,15 +77,13 @@ WalkItem analysePointerPlusExpr(PointerPlusExprNode *node, WalkItem wi) "Using variable without check for NULL"); } } - - return wi; } -WalkItem analyseAddrExpr(AddrExprNode *node, WalkItem wi) +void analyseAddrExpr(AddrExprNode *node, const WalkItem &wi, WalkItem &wo) { // need atleast one arg for check if (node->args.empty() || command == FindArgs) - return wi; + return; Node *arg = node->args[0]; if (arg->nodeType == PARM_DECL) @@ -98,8 +94,6 @@ WalkItem analyseAddrExpr(AddrExprNode *node, WalkItem wi) "Using variable without check for NULL"); } } - - return wi; } } |