Lines Matching refs:SExpr

54 /// SExpr implements a simple expression language that is used to store,
55 /// compare, and pretty-print C++ expressions. Unlike a clang Expr, a SExpr
75 class SExpr {
187 // A SExpr is a list of SExprNodes in prefix order. The Size field allows
267 /// Build an SExpr from the given C++ expression.
269 /// Note: this function merely creates a SExpr; it does not check to
460 /// \brief Construct a SExpr from an expression.
540 explicit SExpr(clang::Decl::EmptyShell e) { NodeVec.clear(); }
547 SExpr(const Expr *MutexExp, const Expr *DeclExp, const NamedDecl *D,
582 bool operator==(const SExpr &other) const {
586 bool operator!=(const SExpr &other) const {
590 bool matches(const SExpr &Other, unsigned i = 0, unsigned j = 0) const {
610 bool partiallyMatches(const SExpr &Other) const {
713 class MutexIDList : public SmallVector<SExpr, 3> {
716 void push_back_nodup(const SExpr& M) {
738 SExpr UnderlyingMutex; // for ScopedLockable objects
746 LockData(SourceLocation AcquireLoc, LockKind LKind, const SExpr &Mu)
774 SExpr MutID;
777 FactEntry(const SExpr& M, const LockData& L)
792 FactID newLock(const SExpr& M, const LockData& L) {
827 FactID addLock(FactManager& FM, const SExpr& M, const LockData& L) {
833 bool removeLock(FactManager& FM, const SExpr& M) {
852 iterator findLockIter(FactManager &FM, const SExpr &M) {
858 LockData *findLock(FactManager &FM, const SExpr &M) const {
866 LockData *findLockUniv(FactManager &FM, const SExpr &M) const {
868 const SExpr &Expr = FM[ID].MutID;
875 FactEntry *findPartialMatch(FactManager &FM, const SExpr &M) const {
884 /// A Lockset maps each SExpr (defined above) to information about how it has
886 typedef llvm::ImmutableMap<SExpr, LockData> Lockset;
1419 void addLock(FactSet &FSet, const SExpr &Mutex, const LockData &LDat,
1421 void removeLock(FactSet &FSet, const SExpr &Mutex, SourceLocation UnlockLoc,
1536 void ThreadSafetyAnalyzer::addLock(FactSet &FSet, const SExpr &Mutex,
1555 void ThreadSafetyAnalyzer::removeLock(FactSet &FSet, const SExpr &Mutex,
1606 SExpr Mu(nullptr, Exp, D, SelfDecl);
1608 SExpr::warnInvalidLock(Handler, nullptr, Exp, D,
1616 SExpr Mu(Arg, Exp, D, SelfDecl);
1618 SExpr::warnInvalidLock(Handler, Arg, Exp, D, ClassifyDiagnostic(Attr));
1848 SExpr Mutex(MutexExp, Exp, D);
1850 SExpr::warnInvalidLock(Analyzer->Handler, MutexExp, Exp, D, DiagKind);
1886 SExpr Mutex(MutexExp, Exp, D);
1888 SExpr::warnInvalidLock(Analyzer->Handler, MutexExp, Exp, D, DiagKind);
2088 SExpr SMutex(&DRE, nullptr, nullptr);
2257 const SExpr &FSet2Mutex = FactMan[Fact].MutID;
2294 const SExpr &FSet1Mutex = FactMan[Fact].MutID;