16 #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPIBUGREPORTER_H 17 #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPIBUGREPORTER_H 29 UnmatchedWaitBugType.reset(
new BugType(&CB,
"Unmatched wait", MPIError));
30 DoubleNonblockingBugType.reset(
31 new BugType(&CB,
"Double nonblocking", MPIError));
32 MissingWaitBugType.reset(
new BugType(&CB,
"Missing wait", MPIError));
72 const std::string MPIError =
"MPI Error";
75 std::unique_ptr<BugType> UnmatchedWaitBugType;
76 std::unique_ptr<BugType> MissingWaitBugType;
77 std::unique_ptr<BugType> DoubleNonblockingBugType;
83 RequestNodeVisitor(
const MemRegion *
const MemoryRegion,
84 const std::string &ErrText)
85 : RequestRegion(MemoryRegion), ErrorText(ErrText) {}
87 void Profile(llvm::FoldingSetNodeID &
ID)
const override {
90 ID.AddPointer(RequestRegion);
93 std::shared_ptr<PathDiagnosticPiece> VisitNode(
const ExplodedNode *N,
100 bool IsNodeFound =
false;
101 std::string ErrorText;
This file provides definitions to model concepts of MPI.
MemRegion - The root abstract class for all memory regions.
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.
This class provides a convenience implementation for clone() using the Curiously-Recurring Template P...
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.
void reportMissingWait(const Request &Req, const MemRegion *const RequestRegion, const ExplodedNode *const ExplNode, BugReporter &BReporter) const
Report a missing wait for a nonblocking call.
BugReporter is a utility class for generating PathDiagnostics for analysis.
MPIBugReporter(const CheckerBase &CB)
Dataflow Directional Tag Classes.
Represents an abstract call to a function or method along a particular path.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
This class provides an interface through which checkers can create individual bug reports...