clang API Documentation

Public Types | Public Member Functions
clang::threadSafety::FactSet Class Reference

A FactSet is the set of facts that are known to be true at a particular program point. FactSets must be small, because they are frequently copied, and are thus implemented as a set of indices into a table maintained by a FactManager. A typical FactSet only holds 1 or 2 locks, so we can get away with doing a linear search for lookup. Note that a hashtable or map is inappropriate in this case, because lookups may involve partial pattern matches, rather than exact matches. More...

List of all members.

Public Types

typedef FactVec::iterator iterator
typedef FactVec::const_iterator const_iterator

Public Member Functions

iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
bool isEmpty () const
bool isEmpty (FactManager &FactMan) const
void addLockByID (FactID ID)
FactID addLock (FactManager &FM, std::unique_ptr< FactEntry > Entry)
bool removeLock (FactManager &FM, const CapabilityExpr &CapE)
iterator findLockIter (FactManager &FM, const CapabilityExpr &CapE)
FactEntryfindLock (FactManager &FM, const CapabilityExpr &CapE) const
FactEntryfindLockUniv (FactManager &FM, const CapabilityExpr &CapE) const
FactEntryfindPartialMatch (FactManager &FM, const CapabilityExpr &CapE) const

Detailed Description

A FactSet is the set of facts that are known to be true at a particular program point. FactSets must be small, because they are frequently copied, and are thus implemented as a set of indices into a table maintained by a FactManager. A typical FactSet only holds 1 or 2 locks, so we can get away with doing a linear search for lookup. Note that a hashtable or map is inappropriate in this case, because lookups may involve partial pattern matches, rather than exact matches.

Definition at line 158 of file ThreadSafety.cpp.


Member Typedef Documentation

typedef FactVec::const_iterator clang::threadSafety::FactSet::const_iterator

Definition at line 166 of file ThreadSafety.cpp.

typedef FactVec::iterator clang::threadSafety::FactSet::iterator

Definition at line 165 of file ThreadSafety.cpp.


Member Function Documentation

FactID clang::threadSafety::FactSet::addLock ( FactManager FM,
std::unique_ptr< FactEntry Entry 
) [inline]

Definition at line 185 of file ThreadSafety.cpp.

Definition at line 168 of file ThreadSafety.cpp.

Referenced by findLock(), findLockIter(), findLockUniv(), and findPartialMatch().

Definition at line 169 of file ThreadSafety.cpp.

Definition at line 172 of file ThreadSafety.cpp.

FactEntry* clang::threadSafety::FactSet::findLock ( FactManager FM,
const CapabilityExpr CapE 
) const [inline]

Definition at line 212 of file ThreadSafety.cpp.

References begin(), and end().

Referenced by clang::threadSafety::ThreadSafetyAnalyzer::intersectAndWarn().

Definition at line 225 of file ThreadSafety.cpp.

References begin(), and end().

Definition at line 232 of file ThreadSafety.cpp.

References begin(), and end().

Definition at line 174 of file ThreadSafety.cpp.

Definition at line 177 of file ThreadSafety.cpp.


The documentation for this class was generated from the following file: