aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h')
-rw-r--r--contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
index 9871da026b04..0222a2120b34 100644
--- a/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
+++ b/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
@@ -17,6 +17,7 @@
#include "MPITypes.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
+#include "llvm/ADT/StringRef.h"
namespace clang {
namespace ento {
@@ -24,12 +25,10 @@ namespace mpi {
class MPIBugReporter {
public:
- MPIBugReporter(const CheckerBase &CB) {
- UnmatchedWaitBugType.reset(new BugType(&CB, "Unmatched wait", MPIError));
- DoubleNonblockingBugType.reset(
- new BugType(&CB, "Double nonblocking", MPIError));
- MissingWaitBugType.reset(new BugType(&CB, "Missing wait", MPIError));
- }
+ MPIBugReporter(const CheckerBase &CB)
+ : UnmatchedWaitBugType(&CB, "Unmatched wait", MPIError),
+ MissingWaitBugType(&CB, "Missing wait", MPIError),
+ DoubleNonblockingBugType(&CB, "Double nonblocking", MPIError) {}
/// Report duplicate request use by nonblocking calls without intermediate
/// wait.
@@ -68,12 +67,10 @@ public:
BugReporter &BReporter) const;
private:
- const std::string MPIError = "MPI Error";
-
- // path-sensitive bug types
- std::unique_ptr<BugType> UnmatchedWaitBugType;
- std::unique_ptr<BugType> MissingWaitBugType;
- std::unique_ptr<BugType> DoubleNonblockingBugType;
+ const llvm::StringLiteral MPIError = "MPI Error";
+ const BugType UnmatchedWaitBugType;
+ const BugType MissingWaitBugType;
+ const BugType DoubleNonblockingBugType;
/// Bug visitor class to find the node where the request region was previously
/// used in order to include it into the BugReport path.