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));
74 const std::string MPIError =
"MPI Error";
77 std::unique_ptr<BugType> UnmatchedWaitBugType;
78 std::unique_ptr<BugType> MissingWaitBugType;
79 std::unique_ptr<BugType> DoubleNonblockingBugType;
85 RequestNodeVisitor(
const MemRegion *
const MemoryRegion,
86 const std::string &ErrText)
87 : RequestRegion(MemoryRegion), ErrorText(ErrText) {}
89 void Profile(llvm::FoldingSetNodeID &
ID)
const override {
92 ID.AddPointer(RequestRegion);
95 PathDiagnosticPiece *VisitNode(
const ExplodedNode *N,
96 const ExplodedNode *PrevN,
97 BugReporterContext &BRC,
98 BugReport &BR)
override;
101 const MemRegion *
const RequestRegion;
102 bool IsNodeFound =
false;
103 std::string ErrorText;
This file provides definitions to model concepts of MPI.
MemRegion - The root abstract class for all memory regions.
This class provides a convenience implementation for clone() using the Curiously-Recurring Template P...
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.
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.
BugReporter is a utility class for generating PathDiagnostics for analysis.
MPIBugReporter(const CheckerBase &CB)
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 Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
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 ...