Commit d8447497 authored by Paulius's avatar Paulius Committed by yann300

Static analysis: Update module for loop iteration over dynamic array

parent 023e81b6
...@@ -8,11 +8,11 @@ function forLoopIteratesOverDynamicArray () { ...@@ -8,11 +8,11 @@ function forLoopIteratesOverDynamicArray () {
} }
forLoopIteratesOverDynamicArray.prototype.visit = function (node) { forLoopIteratesOverDynamicArray.prototype.visit = function (node) {
if (common.isForLoop(node) && if (common.isForLoop(node) &&
node.children[1].children[1].attributes.member_name === 'length' && node.children[1].children[1].attributes.member_name === 'length' &&
node.children[1].children[1].children[0].attributes.type.indexOf('[]') != -1) { node.children[1].children[1].children[0].attributes.type.indexOf('[]') !== -1) {
this.relevantNodes.push(node) this.relevantNodes.push(node)
} }
} }
forLoopIteratesOverDynamicArray.prototype.report = function (compilationResults) { forLoopIteratesOverDynamicArray.prototype.report = function (compilationResults) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment