[cfe-commits] r90060 - /cfe/trunk/lib/Analysis/UndefResultChecker.cpp
Ted Kremenek
kremenek at apple.com
Sat Nov 28 22:37:45 PST 2009
Author: kremenek
Date: Sun Nov 29 00:37:44 2009
New Revision: 90060
URL: http://llvm.org/viewvc/llvm-project?rev=90060&view=rev
Log:
Fix null dereference in UndefResultChecker identified by running the analyzer over Postgresql.
Modified:
cfe/trunk/lib/Analysis/UndefResultChecker.cpp
Modified: cfe/trunk/lib/Analysis/UndefResultChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UndefResultChecker.cpp?rev=90060&r1=90059&r2=90060&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UndefResultChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/UndefResultChecker.cpp Sun Nov 29 00:37:44 2009
@@ -76,9 +76,10 @@
}
EnhancedBugReport *report = new EnhancedBugReport(*BT,
OS.str().str().c_str(), N);
- report->addRange(Ex->getSourceRange());
- if (Ex)
+ if (Ex) {
+ report->addRange(Ex->getSourceRange());
report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, Ex);
+ }
else
report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, B);
C.EmitReport(report);
More information about the cfe-commits
mailing list