diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-22 21:31:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-22 21:31:48 +0000 |
commit | a7dea1671b87c07d2d266f836bfa8b58efc7c134 (patch) | |
tree | ff67344b3b18fc14e0cec322849afb4e3b94ea56 /contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp | |
parent | 5c713029ff7939f90b6f96df914953e758855a7f (diff) | |
parent | 519fc96c475680de2cc49e7811dbbfadb912cbcc (diff) | |
download | src-a7dea1671b87c07d2d266f836bfa8b58efc7c134.tar.gz src-a7dea1671b87c07d2d266f836bfa8b58efc7c134.zip |
Merge ^/vendor/clang/dist up to its last change, and resolve conflicts.
Notes
Notes:
svn path=/projects/clang1000-import/; revision=356998
Diffstat (limited to 'contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp index e3270f1f7be2..b0d101c88517 100644 --- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp +++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp @@ -54,9 +54,9 @@ public: ID.AddPointer(getTag()); } - virtual std::shared_ptr<PathDiagnosticPiece> VisitNode(const ExplodedNode *N, - BugReporterContext &BRC, - BugReport &BR) override; + virtual PathDiagnosticPieceRef + VisitNode(const ExplodedNode *N, BugReporterContext &BRC, + PathSensitiveBugReport &BR) override; // FIXME: Scan the map once in the visitor's constructor and do a direct // lookup by region. @@ -261,7 +261,7 @@ namespace ento { namespace allocation_state { std::unique_ptr<BugReporterVisitor> getInnerPointerBRVisitor(SymbolRef Sym) { - return llvm::make_unique<InnerPointerChecker::InnerPointerBRVisitor>(Sym); + return std::make_unique<InnerPointerChecker::InnerPointerBRVisitor>(Sym); } const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym) { @@ -278,15 +278,13 @@ const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym) { } // end namespace ento } // end namespace clang -std::shared_ptr<PathDiagnosticPiece> -InnerPointerChecker::InnerPointerBRVisitor::VisitNode(const ExplodedNode *N, - BugReporterContext &BRC, - BugReport &) { +PathDiagnosticPieceRef InnerPointerChecker::InnerPointerBRVisitor::VisitNode( + const ExplodedNode *N, BugReporterContext &BRC, PathSensitiveBugReport &) { if (!isSymbolTracked(N->getState(), PtrToBuf) || isSymbolTracked(N->getFirstPred()->getState(), PtrToBuf)) return nullptr; - const Stmt *S = PathDiagnosticLocation::getStmt(N); + const Stmt *S = N->getStmtForDiagnostics(); if (!S) return nullptr; @@ -301,8 +299,7 @@ InnerPointerChecker::InnerPointerBRVisitor::VisitNode(const ExplodedNode *N, << "' obtained here"; PathDiagnosticLocation Pos(S, BRC.getSourceManager(), N->getLocationContext()); - return std::make_shared<PathDiagnosticEventPiece>(Pos, OS.str(), true, - nullptr); + return std::make_shared<PathDiagnosticEventPiece>(Pos, OS.str(), true); } void ento::registerInnerPointerChecker(CheckerManager &Mgr) { |