From fb3cc8be6941edc44cf2176335fa6090d8ff4425 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 2 Jul 2012 21:41:56 +0000 Subject: [PATCH] [analyzer] If 'super' is known to be nil, we can still mark its range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159596 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp b/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp index 2f95709e03..69b331c16c 100644 --- a/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp @@ -310,9 +310,9 @@ void CallAndMessageChecker::emitNilReceiverBug(CheckerContext &C, os << "' that will be garbage"; BugReport *report = new BugReport(*BT_msg_ret, os.str(), N); + report->addRange(msg.getReceiverSourceRange()); // FIXME: This won't track "self" in messages to super. if (const Expr *receiver = msg.getInstanceReceiverExpr()) { - report->addRange(receiver->getSourceRange()); report->addVisitor(bugreporter::getTrackNullOrUndefValueVisitor(N, receiver, report)); -- 2.40.0