From e20b388e2f923bfc98f63a13fea9fc19aeaec425 Mon Sep 17 00:00:00 2001 From: Kristof Umann Date: Sun, 16 Jun 2019 15:41:25 +0000 Subject: [analyzer] Push correct version of 'Track indices of arrays' Messed up the commit, oops. llvm-svn: 363512 --- clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core') diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index be6e2334586..c830bfa9802 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -1740,9 +1740,10 @@ bool bugreporter::trackExpressionValue(const ExplodedNode *InputNode, if (const Expr *Receiver = NilReceiverBRVisitor::getNilReceiver(Inner, LVNode)) trackExpressionValue(LVNode, Receiver, report, EnableNullFPSuppression); + // Track the index if this is an array subscript. if (const auto *Arr = dyn_cast(Inner)) trackExpressionValue( - LVNode, Arr->getIdx(), report, EnableNullFPSuppression); + LVNode, Arr->getIdx(), report, /*EnableNullFPSuppression*/ false); // See if the expression we're interested refers to a variable. // If so, we can track both its contents and constraints on its value. -- cgit v1.2.3