Lines Matching refs:Exp
357 const Expr *Exp; // The expression for this variable, OR member
361 bool isReference() { return !Exp; } in isReference()
366 : Dec(D), Exp(E), Ref(0), Ctx(C) in VarDefinition()
371 : Dec(D), Exp(nullptr), Ref(R), Ctx(C) in VarDefinition()
406 if (VarDefinitions[i].Exp) { in lookupExpr()
408 return VarDefinitions[i].Exp; in lookupExpr()
446 const Expr *Exp = VarDefinitions[i].Exp; in dump() local
451 if (Exp) Exp->dump(); in dump()
486 Context addDefinition(const NamedDecl *D, const Expr *Exp, Context Ctx) { in addDefinition() argument
490 VarDefinitions.push_back(VarDefinition(D, Exp, Ctx)); in addDefinition()
504 Context updateDefinition(const NamedDecl *D, Expr *Exp, Context Ctx) { in updateDefinition() argument
509 VarDefinitions.push_back(VarDefinition(D, Exp, Ctx)); in updateDefinition()
935 void getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, Expr *Exp,
939 void getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, Expr *Exp,
1089 static const ValueDecl *getValueDecl(const Expr *Exp) { in getValueDecl() argument
1090 if (const auto *CE = dyn_cast<ImplicitCastExpr>(Exp)) in getValueDecl()
1093 if (const auto *DR = dyn_cast<DeclRefExpr>(Exp)) in getValueDecl()
1096 if (const auto *ME = dyn_cast<MemberExpr>(Exp)) in getValueDecl()
1251 Expr *Exp, const NamedDecl *D, in getMutexIDs() argument
1255 CapabilityExpr Cp = SxBuilder.translateAttrExpr(nullptr, D, Exp, SelfDecl); in getMutexIDs()
1257 warnInvalidLock(Handler, nullptr, D, Exp, ClassifyDiagnostic(Attr)); in getMutexIDs()
1267 CapabilityExpr Cp = SxBuilder.translateAttrExpr(Arg, D, Exp, SelfDecl); in getMutexIDs()
1269 warnInvalidLock(Handler, nullptr, D, Exp, ClassifyDiagnostic(Attr)); in getMutexIDs()
1284 Expr *Exp, const NamedDecl *D, in getMutexIDs() argument
1304 getMutexIDs(Mtxs, Attr, Exp, D); in getMutexIDs()
1405 CallExpr *Exp = in getEdgeLockset() local
1407 if (!Exp) in getEdgeLockset()
1410 NamedDecl *FunDecl = dyn_cast_or_null<NamedDecl>(Exp->getCalleeDecl()); in getEdgeLockset()
1423 getMutexIDs(ExclusiveLocksToAdd, A, Exp, FunDecl, in getEdgeLockset()
1431 getMutexIDs(SharedLocksToAdd, A, Exp, FunDecl, in getEdgeLockset()
1442 SourceLocation Loc = Exp->getExprLoc(); in getEdgeLockset()
1468 void warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp, AccessKind AK,
1471 void warnIfMutexHeld(const NamedDecl *D, const Expr *Exp, Expr *MutexExp,
1474 void checkAccess(const Expr *Exp, AccessKind AK,
1476 void checkPtAccess(const Expr *Exp, AccessKind AK,
1479 void handleCall(Expr *Exp, const NamedDecl *D, VarDecl *VD = nullptr);
1493 void VisitCallExpr(CallExpr *Exp);
1494 void VisitCXXConstructExpr(CXXConstructExpr *Exp);
1501 void BuildLockset::warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp, in warnIfMutexNotHeld() argument
1507 CapabilityExpr Cp = Analyzer->SxBuilder.translateAttrExpr(MutexExp, D, Exp); in warnIfMutexNotHeld()
1509 warnInvalidLock(Analyzer->Handler, MutexExp, D, Exp, DiagKind); in warnIfMutexNotHeld()
1564 void BuildLockset::warnIfMutexHeld(const NamedDecl *D, const Expr *Exp, in warnIfMutexHeld() argument
1566 CapabilityExpr Cp = Analyzer->SxBuilder.translateAttrExpr(MutexExp, D, Exp); in warnIfMutexHeld()
1568 warnInvalidLock(Analyzer->Handler, MutexExp, D, Exp, DiagKind); in warnIfMutexHeld()
1577 DiagKind, D->getNameAsString(), Cp.toString(), Exp->getExprLoc()); in warnIfMutexHeld()
1586 void BuildLockset::checkAccess(const Expr *Exp, AccessKind AK, in checkAccess() argument
1588 Exp = Exp->IgnoreParenCasts(); in checkAccess()
1590 SourceLocation Loc = Exp->getExprLoc(); in checkAccess()
1594 while (const auto *DRE = dyn_cast<DeclRefExpr>(Exp)) { in checkAccess()
1598 Exp = E; in checkAccess()
1605 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(Exp)) { in checkAccess()
1612 if (const ArraySubscriptExpr *AE = dyn_cast<ArraySubscriptExpr>(Exp)) { in checkAccess()
1617 if (const MemberExpr *ME = dyn_cast<MemberExpr>(Exp)) { in checkAccess()
1624 const ValueDecl *D = getValueDecl(Exp); in checkAccess()
1633 warnIfMutexNotHeld(D, Exp, AK, I->getArg(), POK, in checkAccess()
1640 void BuildLockset::checkPtAccess(const Expr *Exp, AccessKind AK, in checkPtAccess() argument
1643 if (const ParenExpr *PE = dyn_cast<ParenExpr>(Exp)) { in checkPtAccess()
1644 Exp = PE->getSubExpr(); in checkPtAccess()
1647 if (const CastExpr *CE = dyn_cast<CastExpr>(Exp)) { in checkPtAccess()
1654 Exp = CE->getSubExpr(); in checkPtAccess()
1664 const ValueDecl *D = getValueDecl(Exp); in checkPtAccess()
1670 Exp->getExprLoc()); in checkPtAccess()
1673 warnIfMutexNotHeld(D, Exp, AK, I->getArg(), PtPOK, in checkPtAccess()
1674 ClassifyDiagnostic(I), Exp->getExprLoc()); in checkPtAccess()
1687 void BuildLockset::handleCall(Expr *Exp, const NamedDecl *D, VarDecl *VD) { in handleCall() argument
1688 SourceLocation Loc = Exp->getExprLoc(); in handleCall()
1713 A, Exp, D, VD); in handleCall()
1726 Analyzer->getMutexIDs(AssertLocks, A, Exp, D, VD); in handleCall()
1738 Analyzer->getMutexIDs(AssertLocks, A, Exp, D, VD); in handleCall()
1751 Analyzer->getMutexIDs(GenericLocksToRemove, A, Exp, D, VD); in handleCall()
1753 Analyzer->getMutexIDs(SharedLocksToRemove, A, Exp, D, VD); in handleCall()
1755 Analyzer->getMutexIDs(ExclusiveLocksToRemove, A, Exp, D, VD); in handleCall()
1764 warnIfMutexNotHeld(D, Exp, A->isShared() ? AK_Read : AK_Written, Arg, in handleCall()
1766 Exp->getExprLoc()); in handleCall()
1771 A, Exp, D, VD); in handleCall()
1780 warnIfMutexHeld(D, Exp, Arg, ClassifyDiagnostic(A)); in handleCall()
1870 void BuildLockset::VisitCallExpr(CallExpr *Exp) { in VisitCallExpr() argument
1874 if (CXXMemberCallExpr *CE = dyn_cast<CXXMemberCallExpr>(Exp)) { in VisitCallExpr()
1893 } else if (CXXOperatorCallExpr *OE = dyn_cast<CXXOperatorCallExpr>(Exp)) { in VisitCallExpr()
1927 if (FunctionDecl *FD = Exp->getDirectCallee()) { in VisitCallExpr()
1937 unsigned Cn = Exp->getNumArgs(); in VisitCallExpr()
1957 Expr* Arg = Exp->getArg(i+Skip); in VisitCallExpr()
1966 NamedDecl *D = dyn_cast_or_null<NamedDecl>(Exp->getCalleeDecl()); in VisitCallExpr()
1969 handleCall(Exp, D); in VisitCallExpr()
1972 void BuildLockset::VisitCXXConstructExpr(CXXConstructExpr *Exp) { in VisitCXXConstructExpr() argument
1973 const CXXConstructorDecl *D = Exp->getConstructor(); in VisitCXXConstructExpr()
1975 const Expr* Source = Exp->getArg(0); in VisitCXXConstructExpr()