clang API Documentation
This is a helper class that stores a fact that is known at a particular point in program execution. Currently, a fact is a capability, along with additional information, such as where it was acquired, whether it is exclusive or shared, etc. More...
Public Member Functions | |
FactEntry (const CapabilityExpr &CE, LockKind LK, SourceLocation Loc, bool Asrt) | |
virtual | ~FactEntry () |
LockKind | kind () const |
SourceLocation | loc () const |
bool | asserted () const |
virtual void | handleRemovalFromIntersection (const FactSet &FSet, FactManager &FactMan, SourceLocation JoinLoc, LockErrorKind LEK, ThreadSafetyHandler &Handler) const =0 |
virtual void | handleUnlock (FactSet &FSet, FactManager &FactMan, const CapabilityExpr &Cp, SourceLocation UnlockLoc, bool FullyRemove, ThreadSafetyHandler &Handler, StringRef DiagKind) const =0 |
bool | isAtLeast (LockKind LK) |
This is a helper class that stores a fact that is known at a particular point in program execution. Currently, a fact is a capability, along with additional information, such as where it was acquired, whether it is exclusive or shared, etc.
FIXME: this analysis does not currently support either re-entrant locking or lock "upgrading" and "downgrading" between exclusive and shared.
Definition at line 99 of file ThreadSafety.cpp.
clang::threadSafety::FactEntry::FactEntry | ( | const CapabilityExpr & | CE, |
LockKind | LK, | ||
SourceLocation | Loc, | ||
bool | Asrt | ||
) | [inline] |
Definition at line 106 of file ThreadSafety.cpp.
virtual clang::threadSafety::FactEntry::~FactEntry | ( | ) | [inline, virtual] |
Definition at line 110 of file ThreadSafety.cpp.
bool clang::threadSafety::FactEntry::asserted | ( | ) | const [inline] |
Definition at line 114 of file ThreadSafety.cpp.
Referenced by clang::threadSafety::LockableFactEntry::handleRemovalFromIntersection(), and clang::threadSafety::ThreadSafetyAnalyzer::intersectAndWarn().
virtual void clang::threadSafety::FactEntry::handleRemovalFromIntersection | ( | const FactSet & | FSet, |
FactManager & | FactMan, | ||
SourceLocation | JoinLoc, | ||
LockErrorKind | LEK, | ||
ThreadSafetyHandler & | Handler | ||
) | const [pure virtual] |
Implemented in clang::threadSafety::ScopedLockableFactEntry, and clang::threadSafety::LockableFactEntry.
Referenced by clang::threadSafety::ThreadSafetyAnalyzer::intersectAndWarn().
virtual void clang::threadSafety::FactEntry::handleUnlock | ( | FactSet & | FSet, |
FactManager & | FactMan, | ||
const CapabilityExpr & | Cp, | ||
SourceLocation | UnlockLoc, | ||
bool | FullyRemove, | ||
ThreadSafetyHandler & | Handler, | ||
StringRef | DiagKind | ||
) | const [pure virtual] |
Implemented in clang::threadSafety::ScopedLockableFactEntry, and clang::threadSafety::LockableFactEntry.
Referenced by clang::threadSafety::ThreadSafetyAnalyzer::removeLock().
bool clang::threadSafety::FactEntry::isAtLeast | ( | LockKind | LK | ) | [inline] |
Definition at line 126 of file ThreadSafety.cpp.
References clang::threadSafety::LK_Exclusive, and clang::threadSafety::LK_Shared.
LockKind clang::threadSafety::FactEntry::kind | ( | ) | const [inline] |
Definition at line 112 of file ThreadSafety.cpp.
Referenced by clang::threadSafety::ThreadSafetyAnalyzer::intersectAndWarn(), and clang::threadSafety::ThreadSafetyAnalyzer::removeLock().
SourceLocation clang::threadSafety::FactEntry::loc | ( | ) | const [inline] |