summaryrefslogtreecommitdiff
path: root/src/analysis/ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/ref.cpp')
-rw-r--r--src/analysis/ref.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/analysis/ref.cpp b/src/analysis/ref.cpp
index 4c8a4be..2391fa3 100644
--- a/src/analysis/ref.cpp
+++ b/src/analysis/ref.cpp
@@ -30,6 +30,7 @@
#include "nodes/expr/modify_expr.h"
#include "nodes/expr/pointerplus_expr.h"
+#include "nodes/ref/array_ref.h"
#include "nodes/ref/component_ref.h"
#include "nodes/ref/indirect_ref.h"
@@ -59,4 +60,18 @@ void analyseComponentRef(ComponentRefNode *node,
*/
}
+void analyseArrayRef(ArrayRefNode *node,
+ const WalkItem &wi,
+ WalkItem &wo A_UNUSED)
+{
+ // need atleast one arg for check
+ if (node->args.empty() || checkCommand(FindArgs))
+ return;
+
+ FOR_EACH(it, node->args)
+ {
+ reportParmDeclNullPointer(node, it, wi);
+ }
+}
+
}