diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ValistChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ValistChecker.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ValistChecker.cpp b/lib/StaticAnalyzer/Checkers/ValistChecker.cpp index bd657340fcfb0..748b226b7a1ed 100644 --- a/lib/StaticAnalyzer/Checkers/ValistChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ValistChecker.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "ClangSACheckers.h" +#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" #include "clang/StaticAnalyzer/Core/Checker.h" #include "clang/StaticAnalyzer/Core/CheckerManager.h" @@ -90,7 +90,6 @@ private: return std::make_shared<PathDiagnosticEventPiece>(L, BR.getDescription(), false); } std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override; @@ -376,10 +375,10 @@ void ValistChecker::checkVAListEndCall(const CallEvent &Call, } std::shared_ptr<PathDiagnosticPiece> ValistChecker::ValistBugVisitor::VisitNode( - const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, + const ExplodedNode *N, BugReporterContext &BRC, BugReport &) { ProgramStateRef State = N->getState(); - ProgramStateRef StatePrev = PrevN->getState(); + ProgramStateRef StatePrev = N->getFirstPred()->getState(); const Stmt *S = PathDiagnosticLocation::getStmt(N); if (!S) |