Lines Matching defs:FSet
143 handleRemovalFromIntersection(const FactSet &FSet, FactManager &FactMan,
146 virtual void handleLock(FactSet &FSet, FactManager &FactMan,
149 virtual void handleUnlock(FactSet &FSet, FactManager &FactMan,
308 const FactSet& FSet,
868 handleRemovalFromIntersection(const FactSet &FSet, FactManager &FactMan,
877 void handleLock(FactSet &FSet, FactManager &FactMan, const FactEntry &entry,
883 void handleUnlock(FactSet &FSet, FactManager &FactMan,
887 FSet.removeLock(FactMan, Cp);
889 FSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
939 handleRemovalFromIntersection(const FactSet &FSet, FactManager &FactMan,
946 const auto *Entry = FSet.findLock(FactMan, UnderlyingMutex.Cap);
958 void handleLock(FactSet &FSet, FactManager &FactMan, const FactEntry &entry,
962 lock(FSet, FactMan, UnderlyingMutex.Cap, entry.kind(), entry.loc(),
965 unlock(FSet, FactMan, UnderlyingMutex.Cap, entry.loc(), &Handler);
969 void handleUnlock(FactSet &FSet, FactManager &FactMan,
979 unlock(FSet, FactMan, UnderlyingMutex.Cap, UnlockLoc, TSHandler);
984 lock(FSet, FactMan, UnderlyingMutex.Cap, kind, UnlockLoc, TSHandler);
988 FSet.removeLock(FactMan, Cp);
996 void lock(FactSet &FSet, FactManager &FactMan, const CapabilityExpr &Cp,
999 if (const FactEntry *Fact = FSet.findLock(FactMan, Cp)) {
1004 FSet.removeLock(FactMan, !Cp);
1005 FSet.addLock(FactMan,
1010 void unlock(FactSet &FSet, FactManager &FactMan, const CapabilityExpr &Cp,
1012 if (FSet.findLock(FactMan, Cp)) {
1013 FSet.removeLock(FactMan, Cp);
1014 FSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
1018 if (const FactEntry *Neg = FSet.findLock(FactMan, !Cp))
1050 void addLock(FactSet &FSet, std::unique_ptr<FactEntry> Entry,
1052 void removeLock(FactSet &FSet, const CapabilityExpr &CapE,
1085 void warnIfMutexNotHeld(const FactSet &FSet, const NamedDecl *D,
1089 void warnIfMutexHeld(const FactSet &FSet, const NamedDecl *D, const Expr *Exp,
1093 void checkAccess(const FactSet &FSet, const Expr *Exp, AccessKind AK,
1095 void checkPtAccess(const FactSet &FSet, const Expr *Exp, AccessKind AK,
1169 /// Return true if any mutexes in FSet are in the acquired_before set of Vd.
1171 const FactSet& FSet,
1197 if (FSet.containsMutexDecl(Analyzer.FactMan, Vdb)) {
1282 void ThreadSafetyAnalyzer::addLock(FactSet &FSet,
1291 const FactEntry *Nen = FSet.findLock(FactMan, NegC);
1293 FSet.removeLock(FactMan, NegC);
1305 GlobalBeforeSet->checkBeforeAfter(Entry->valueDecl(), FSet, *this,
1310 if (const FactEntry *Cp = FSet.findLock(FactMan, *Entry)) {
1312 Cp->handleLock(FSet, FactMan, *Entry, Handler);
1314 FSet.addLock(FactMan, std::move(Entry));
1320 void ThreadSafetyAnalyzer::removeLock(FactSet &FSet, const CapabilityExpr &Cp,
1326 const FactEntry *LDat = FSet.findLock(FactMan, Cp);
1329 if (const FactEntry *Neg = FSet.findLock(FactMan, !Cp))
1343 LDat->handleUnlock(FSet, FactMan, Cp, UnlockLoc, FullyRemove, Handler);
1568 FactSet FSet;
1578 Analyzer->checkAccess(FSet, Exp, AK, POK);
1582 Analyzer->checkPtAccess(FSet, Exp, AK, POK);
1596 : ConstStmtVisitor<BuildLockset>(), Analyzer(Anlzr), FSet(Info.EntrySet),
1615 const FactSet &FSet, const NamedDecl *D, const Expr *Exp, AccessKind AK,
1629 const FactEntry *LDat = FSet.findLock(FactMan, !Cp);
1642 LDat = FSet.findLock(FactMan, Cp);
1649 const FactEntry *LDat = FSet.findLockUniv(FactMan, Cp);
1653 LDat = FSet.findPartialMatch(FactMan, Cp);
1673 void ThreadSafetyAnalyzer::warnIfMutexHeld(const FactSet &FSet,
1686 const FactEntry *LDat = FSet.findLock(FactMan, Cp);
1698 void ThreadSafetyAnalyzer::checkAccess(const FactSet &FSet, const Expr *Exp,
1724 checkPtAccess(FSet, UO->getSubExpr(), AK, POK);
1731 return checkAccess(FSet, BO->getLHS(), AK, POK);
1733 return checkPtAccess(FSet, BO->getLHS(), AK, POK);
1740 checkPtAccess(FSet, AE->getLHS(), AK, POK);
1746 checkPtAccess(FSet, ME->getBase(), AK, POK);
1748 checkAccess(FSet, ME->getBase(), AK, POK);
1755 if (D->hasAttr<GuardedVarAttr>() && FSet.isEmpty(FactMan)) {
1760 warnIfMutexNotHeld(FSet, D, Exp, AK, I->getArg(), POK, nullptr, Loc);
1765 void ThreadSafetyAnalyzer::checkPtAccess(const FactSet &FSet, const Expr *Exp,
1777 checkAccess(FSet, CE->getSubExpr(), AK, POK);
1796 if (D->hasAttr<PtGuardedVarAttr>() && FSet.isEmpty(FactMan))
1800 warnIfMutexNotHeld(FSet, D, Exp, AK, I->getArg(), PtPOK, nullptr,
1868 FSet, std::make_unique<LockableFactEntry>(
1879 FSet, std::make_unique<LockableFactEntry>(
1889 Analyzer->addLock(FSet, std::make_unique<LockableFactEntry>(
1912 Analyzer->warnIfMutexNotHeld(FSet, D, Exp,
1925 Analyzer->warnIfMutexHeld(FSet, D, Exp, Arg, Self, Loc);
1978 Analyzer->warnIfMutexNotHeld(FSet, D, Exp,
1988 Analyzer->warnIfMutexHeld(FSet, D, Exp, Arg, Self, Loc);
2007 const FactEntry *Fact = FSet.findLock(Analyzer->FactMan, Cp);
2038 Analyzer->removeLock(FSet, M, Loc, Dtor, LK_Exclusive);
2040 Analyzer->removeLock(FSet, M, Loc, Dtor, LK_Shared);
2042 Analyzer->removeLock(FSet, M, Loc, Dtor, LK_Generic);
2048 Analyzer->addLock(FSet, std::make_unique<LockableFactEntry>(M, LK_Exclusive,
2052 FSet, std::make_unique<LockableFactEntry>(M, LK_Shared, Loc, Source));
2068 Analyzer->addLock(FSet, std::move(ScopedEntry));
2664 CurrBlockInfo->ExitSet = LocksetBuilder.FSet;