[cfe-commits] r159596 - /cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
Jordan Rose
jordan_rose at apple.com
Mon Jul 2 14:41:56 PDT 2012
Author: jrose
Date: Mon Jul 2 16:41:56 2012
New Revision: 159596
URL: http://llvm.org/viewvc/llvm-project?rev=159596&view=rev
Log:
[analyzer] If 'super' is known to be nil, we can still mark its range.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp?rev=159596&r1=159595&r2=159596&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp Mon Jul 2 16:41:56 2012
@@ -310,9 +310,9 @@
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));
More information about the cfe-commits
mailing list