When generating error node, check to see if we already cached out.

llvm-svn: 97115
This commit is contained in:
Ted Kremenek 2010-02-25 05:44:05 +00:00
parent 9ac3092d34
commit 5563dea713
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ static void CheckOpen(CheckerContext &C, const CallExpr *CE, BugType *&BT) {
if (CE->getNumArgs() < 3) {
ExplodedNode *N = C.GenerateSink(trueState);
if (!N)
return;
EnhancedBugReport *report =
new EnhancedBugReport(*BT,
"Call to 'open' requires a third argument when "