diff options
author | Alex Langford <apl@fb.com> | 2019-09-23 22:24:47 +0000 |
---|---|---|
committer | Alex Langford <apl@fb.com> | 2019-09-23 22:24:47 +0000 |
commit | 86c3af90296a893550203fc1a6558a24033c25d3 (patch) | |
tree | 3ce2c7688b30431d48c95674d1a87d4d98eeff9c /clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp | |
parent | 082f895b1a9be3c08822a2f57730179a5c81c996 (diff) | |
download | bcm5719-llvm-86c3af90296a893550203fc1a6558a24033c25d3.tar.gz bcm5719-llvm-86c3af90296a893550203fc1a6558a24033c25d3.zip |
[NFCI] Return PathSensitiveBugReport where appropriate
Some compilers have trouble converting unique_ptr<PathSensitiveBugReport> to
unique_ptr<BugReport> causing some functions to fail to compile.
Changing the return type of the functions that fail to compile does not
appear to have any issues.
I ran into this issue building with clang 3.8 on Ubuntu 16.04.
llvm-svn: 372668
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp index 0734272381b..6ffc8974536 100644 --- a/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp @@ -35,11 +35,11 @@ public: void checkPreCall(const CallEvent &Call, CheckerContext &C) const; - std::unique_ptr<BugReport> + std::unique_ptr<PathSensitiveBugReport> genReportNullAttrNonNull(const ExplodedNode *ErrorN, const Expr *ArgE, unsigned IdxOfArg) const; - std::unique_ptr<BugReport> + std::unique_ptr<PathSensitiveBugReport> genReportReferenceToNullPointer(const ExplodedNode *ErrorN, const Expr *ArgE) const; }; @@ -179,7 +179,7 @@ void NonNullParamChecker::checkPreCall(const CallEvent &Call, C.addTransition(state); } -std::unique_ptr<BugReport> +std::unique_ptr<PathSensitiveBugReport> NonNullParamChecker::genReportNullAttrNonNull(const ExplodedNode *ErrorNode, const Expr *ArgE, unsigned IdxOfArg) const { @@ -204,7 +204,8 @@ NonNullParamChecker::genReportNullAttrNonNull(const ExplodedNode *ErrorNode, return R; } -std::unique_ptr<BugReport> NonNullParamChecker::genReportReferenceToNullPointer( +std::unique_ptr<PathSensitiveBugReport> +NonNullParamChecker::genReportReferenceToNullPointer( const ExplodedNode *ErrorNode, const Expr *ArgE) const { if (!BTNullRefArg) BTNullRefArg.reset(new BuiltinBug(this, "Dereference of null pointer")); |