15#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPIBUGREPORTER_H
16#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPIBUGREPORTER_H
20#include "llvm/ADT/StringRef.h"
29 : UnmatchedWaitBugType(&CB,
"Unmatched wait", MPIError),
30 MissingWaitBugType(&CB,
"Missing wait", MPIError),
31 DoubleNonblockingBugType(&CB,
"Double nonblocking", MPIError) {}
70 const llvm::StringLiteral MPIError =
"MPI Error";
71 const BugType UnmatchedWaitBugType;
72 const BugType MissingWaitBugType;
73 const BugType DoubleNonblockingBugType;
79 RequestNodeVisitor(
const MemRegion *
const MemoryRegion,
80 const std::string &ErrText)
81 : RequestRegion(MemoryRegion), ErrorText(ErrText) {}
83 void Profile(llvm::FoldingSetNodeID &
ID)
const override {
86 ID.AddPointer(RequestRegion);
90 BugReporterContext &BRC,
91 PathSensitiveBugReport &BR)
override;
94 const MemRegion *
const RequestRegion;
95 bool IsNodeFound =
false;
96 std::string ErrorText;
This file provides definitions to model concepts of MPI.
BugReporterVisitors are used to add custom diagnostics along a path.
BugReporter is a utility class for generating PathDiagnostics for analysis.
Represents an abstract call to a function or method along a particular path.
MemRegion - The root abstract class for all memory regions.
void reportMissingWait(const Request &Req, const MemRegion *const RequestRegion, const ExplodedNode *const ExplNode, BugReporter &BReporter) const
Report a missing wait for a nonblocking call.
void reportDoubleNonblocking(const CallEvent &MPICallEvent, const Request &Req, const MemRegion *const RequestRegion, const ExplodedNode *const ExplNode, BugReporter &BReporter) const
Report duplicate request use by nonblocking calls without intermediate wait.
MPIBugReporter(const CheckerBase &CB)
void reportUnmatchedWait(const CallEvent &CE, const MemRegion *const RequestRegion, const ExplodedNode *const ExplNode, BugReporter &BReporter) const
Report a wait on a request that has not been used at all before.
std::shared_ptr< PathDiagnosticPiece > PathDiagnosticPieceRef
The JSON file list parser is used to communicate input to InstallAPI.