diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:09 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:09 +0000 | 
| commit | 519fc96c475680de2cc49e7811dbbfadb912cbcc (patch) | |
| tree | 310ca684459b7e9ae13c9a3b9abf308b3a634afe /lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp | |
| parent | 2298981669bf3bd63335a4be179bc0f96823a8f4 (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp index 2ccb519891f3..f4e225d836f3 100644 --- a/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp @@ -135,7 +135,7 @@ void UnixAPIMisuseChecker::ReportOpenBug(CheckerContext &C,    LazyInitialize(this, BT_open, "Improper use of 'open'"); -  auto Report = llvm::make_unique<BugReport>(*BT_open, Msg, N); +  auto Report = std::make_unique<PathSensitiveBugReport>(*BT_open, Msg, N);    Report->addRange(SR);    C.emitReport(std::move(Report));  } @@ -304,7 +304,8 @@ void UnixAPIMisuseChecker::CheckPthreadOnce(CheckerContext &C,    LazyInitialize(this, BT_pthreadOnce, "Improper use of 'pthread_once'"); -  auto report = llvm::make_unique<BugReport>(*BT_pthreadOnce, os.str(), N); +  auto report = +      std::make_unique<PathSensitiveBugReport>(*BT_pthreadOnce, os.str(), N);    report->addRange(CE->getArg(0)->getSourceRange());    C.emitReport(std::move(report));  } @@ -347,7 +348,8 @@ bool UnixAPIPortabilityChecker::ReportZeroByteAllocation(    SmallString<256> S;    llvm::raw_svector_ostream os(S);    os << "Call to '" << fn_name << "' has an allocation size of 0 bytes"; -  auto report = llvm::make_unique<BugReport>(*BT_mallocZero, os.str(), N); +  auto report = +      std::make_unique<PathSensitiveBugReport>(*BT_mallocZero, os.str(), N);    report->addRange(arg->getSourceRange());    bugreporter::trackExpressionValue(N, arg, *report);  | 
