Lines Matching +full:isa +full:- +full:base

1 //===--- ScopeInfo.cpp - Information about a semantic context -------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
65 if (PropE->isExplicitProperty())
66 return PropE->getExplicitProperty();
68 return PropE->getImplicitPropertyGetter();
73 E = E->IgnoreParenCasts();
78 switch (E->getStmtClass()) {
80 D = cast<DeclRefExpr>(E)->getDecl();
81 IsExact = isa<VarDecl>(D);
85 D = ME->getMemberDecl();
86 IsExact = isa<CXXThisExpr>(ME->getBase()->IgnoreParenImpCasts());
91 D = IE->getDecl();
92 IsExact = IE->getBase()->isObjCSelfExpr();
98 dyn_cast<ObjCPropertyRefExpr>(POE->getSyntacticForm());
102 if (BaseProp->isObjectReceiver()) {
103 const Expr *DoubleBase = BaseProp->getBase();
105 DoubleBase = OVE->getSourceExpr();
107 IsExact = DoubleBase->isObjCSelfExpr();
121 : Base(nullptr, true), Property(getBestPropertyDecl(PropE)) {
123 if (PropE->isObjectReceiver()) {
124 const OpaqueValueExpr *OVE = cast<OpaqueValueExpr>(PropE->getBase());
125 const Expr *E = OVE->getSourceExpr();
126 Base = getBaseInfo(E);
127 } else if (PropE->isClassReceiver()) {
128 Base.setPointer(PropE->getClassReceiver());
130 assert(PropE->isSuperReceiver());
136 : Base(nullptr, true), Property(Prop) {
138 Base = getBaseInfo(BaseE);
144 : Base(nullptr, true), Property(DRE->getDecl()) {
145 assert(isa<VarDecl>(Property));
150 : Base(getBaseInfo(IvarE->getBase())), Property(IvarE->getDecl()) {
157 WeakObjectUses[WeakObjectProfileTy(Msg->getInstanceReceiver(), Prop)];
158 Uses.push_back(WeakUseTy(Msg, Msg->getNumArgs() == 0));
162 E = E->IgnoreParenCasts();
165 markSafeWeakUse(POE->getSyntacticForm());
170 markSafeWeakUse(Cond->getTrueExpr());
171 markSafeWeakUse(Cond->getFalseExpr());
177 markSafeWeakUse(Cond->getCommon());
178 markSafeWeakUse(Cond->getFalseExpr());
185 if (!RefExpr->isObjectReceiver())
187 if (isa<OpaqueValueExpr>(RefExpr->getBase()))
190 markSafeWeakUse(RefExpr->getBase());
197 if (isa<VarDecl>(DRE->getDecl()))
200 if (const ObjCMethodDecl *MD = MsgE->getMethodDecl()) {
201 if (const ObjCPropertyDecl *Prop = MD->findPropertyDecl()) {
203 WeakObjectUses.find(WeakObjectProfileTy(MsgE->getInstanceReceiver(),
216 llvm::find(llvm::reverse(Uses->second), WeakUseTy(E, true));
217 if (ThisUse == Uses->second.rend())
220 ThisUse->markSafe();
224 // Note that a nested capture of an init-capture is not itself an
225 // init-capture.
226 return !isNested() && isVariableCapture() && getVariable()->isInitCapture();
240 Callback(cast<ValueDecl>(DRE->getFoundDecl()), E);
242 Callback(cast<ValueDecl>(ME->getMemberDecl()), E);
254 return ExplicitObjectParameter->getType()