Lines Matching refs:E

61   SymbolRoleSet getRolesForRef(const Expr *E,  in getRolesForRef()  argument
64 assert(!StmtStack.empty() && E == StmtStack.back()); in getRolesForRef()
81 if (BO->getLHS()->IgnoreParenCasts() == E) in getRolesForRef()
84 if (CA->getLHS()->IgnoreParenCasts() == E) { in getRolesForRef()
98 if (CE->getCallee()->IgnoreParenCasts() == E) { in getRolesForRef()
100 if (auto *ME = dyn_cast<MemberExpr>(E)) { in getRolesForRef()
112 if (CXXOp->getNumArgs() > 0 && CXXOp->getArg(0)->IgnoreParenCasts() == E) { in getRolesForRef()
140 bool VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr() argument
142 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitDeclRefExpr()
143 return IndexCtx.handleReference(E->getDecl(), E->getLocation(), in VisitDeclRefExpr()
144 Parent, ParentDC, Roles, Relations, E); in VisitDeclRefExpr()
158 bool VisitMemberExpr(MemberExpr *E) { in VisitMemberExpr() argument
159 SourceLocation Loc = E->getMemberLoc(); in VisitMemberExpr()
161 Loc = E->getBeginLoc(); in VisitMemberExpr()
163 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitMemberExpr()
164 return IndexCtx.handleReference(E->getMemberDecl(), Loc, in VisitMemberExpr()
165 Parent, ParentDC, Roles, Relations, E); in VisitMemberExpr()
169 const Expr *E, const Type *T, const DeclarationNameInfo &NameInfo, in indexDependentReference() argument
193 Loc = E->getBeginLoc(); in indexDependentReference()
195 SymbolRoleSet Roles = getRolesForRef(E, Relations); in indexDependentReference()
197 Relations, E); in indexDependentReference()
200 bool VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E) { in VisitCXXDependentScopeMemberExpr() argument
201 const DeclarationNameInfo &Info = E->getMemberNameInfo(); in VisitCXXDependentScopeMemberExpr()
203 E, E->getBaseType().getTypePtrOrNull(), Info, in VisitCXXDependentScopeMemberExpr()
207 bool VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) { in VisitDependentScopeDeclRefExpr() argument
208 const DeclarationNameInfo &Info = E->getNameInfo(); in VisitDependentScopeDeclRefExpr()
209 const NestedNameSpecifier *NNS = E->getQualifier(); in VisitDependentScopeDeclRefExpr()
211 E, NNS->getAsType(), Info, in VisitDependentScopeDeclRefExpr()
215 bool VisitDesignatedInitExpr(DesignatedInitExpr *E) { in VisitDesignatedInitExpr() argument
216 for (DesignatedInitExpr::Designator &D : llvm::reverse(E->designators())) { in VisitDesignatedInitExpr()
220 ParentDC, SymbolRoleSet(), {}, E); in VisitDesignatedInitExpr()
227 bool VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { in VisitObjCIvarRefExpr() argument
229 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitObjCIvarRefExpr()
230 return IndexCtx.handleReference(E->getDecl(), E->getLocation(), in VisitObjCIvarRefExpr()
231 Parent, ParentDC, Roles, Relations, E); in VisitObjCIvarRefExpr()
234 bool VisitObjCMessageExpr(ObjCMessageExpr *E) { in VisitObjCMessageExpr() argument
246 if (ObjCMethodDecl *MD = E->getMethodDecl()) { in VisitObjCMessageExpr()
253 const auto *E = POE->getSyntacticForm(); in VisitObjCMessageExpr() local
254 if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) in VisitObjCMessageExpr()
255 E = BinOp->getLHS(); in VisitObjCMessageExpr()
256 const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(E); in VisitObjCMessageExpr()
273 if ((E->isImplicit() || IsPropCall) && in VisitObjCMessageExpr()
278 if (isDynamic(E)) { in VisitObjCMessageExpr()
293 QualType recT = E->getReceiverType(); in VisitObjCMessageExpr()
300 return IndexCtx.handleReference(MD, E->getSelectorStartLoc(), in VisitObjCMessageExpr()
301 Parent, ParentDC, Roles, Relations, E); in VisitObjCMessageExpr()
306 bool VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { in VisitObjCPropertyRefExpr() argument
307 if (E->isExplicitProperty()) { in VisitObjCPropertyRefExpr()
309 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitObjCPropertyRefExpr()
310 return IndexCtx.handleReference(E->getExplicitProperty(), E->getLocation(), in VisitObjCPropertyRefExpr()
311 Parent, ParentDC, Roles, Relations, E); in VisitObjCPropertyRefExpr()
312 } else if (const ObjCMethodDecl *Getter = E->getImplicitPropertyGetter()) { in VisitObjCPropertyRefExpr()
319 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitObjCPropertyRefExpr()
320 return IndexCtx.handleReference(PD, E->getLocation(), Parent, in VisitObjCPropertyRefExpr()
321 ParentDC, Roles, Relations, E); in VisitObjCPropertyRefExpr()
331 bool VisitMSPropertyRefExpr(MSPropertyRefExpr *E) { in VisitMSPropertyRefExpr() argument
332 return IndexCtx.handleReference(E->getPropertyDecl(), E->getMemberLoc(), in VisitMSPropertyRefExpr()
333 Parent, ParentDC, SymbolRoleSet(), {}, E); in VisitMSPropertyRefExpr()
336 bool VisitObjCProtocolExpr(ObjCProtocolExpr *E) { in VisitObjCProtocolExpr() argument
337 return IndexCtx.handleReference(E->getProtocol(), E->getProtocolIdLoc(), in VisitObjCProtocolExpr()
338 Parent, ParentDC, SymbolRoleSet(), {}, E); in VisitObjCProtocolExpr()
341 bool passObjCLiteralMethodCall(const ObjCMethodDecl *MD, const Expr *E) { in passObjCLiteralMethodCall() argument
346 return IndexCtx.handleReference(MD, E->getBeginLoc(), Parent, ParentDC, in passObjCLiteralMethodCall()
347 Roles, Relations, E); in passObjCLiteralMethodCall()
350 bool VisitObjCBoxedExpr(ObjCBoxedExpr *E) { in VisitObjCBoxedExpr() argument
351 if (ObjCMethodDecl *MD = E->getBoxingMethod()) { in VisitObjCBoxedExpr()
352 return passObjCLiteralMethodCall(MD, E); in VisitObjCBoxedExpr()
357 bool VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) { in VisitObjCDictionaryLiteral() argument
358 if (ObjCMethodDecl *MD = E->getDictWithObjectsMethod()) { in VisitObjCDictionaryLiteral()
359 return passObjCLiteralMethodCall(MD, E); in VisitObjCDictionaryLiteral()
364 bool VisitObjCArrayLiteral(ObjCArrayLiteral *E) { in VisitObjCArrayLiteral() argument
365 if (ObjCMethodDecl *MD = E->getArrayWithObjectsMethod()) { in VisitObjCArrayLiteral()
366 return passObjCLiteralMethodCall(MD, E); in VisitObjCArrayLiteral()
371 bool VisitCXXConstructExpr(CXXConstructExpr *E) { in VisitCXXConstructExpr() argument
375 return IndexCtx.handleReference(E->getConstructor(), E->getLocation(), in VisitCXXConstructExpr()
376 Parent, ParentDC, Roles, Relations, E); in VisitCXXConstructExpr()
379 bool TraverseCXXOperatorCallExpr(CXXOperatorCallExpr *E, in TraverseCXXOperatorCallExpr() argument
381 if (E->getOperatorLoc().isInvalid()) in TraverseCXXOperatorCallExpr()
383 return base::TraverseCXXOperatorCallExpr(E, Q); in TraverseCXXOperatorCallExpr()
393 for (DeclGroupRef::iterator I = DG.begin(), E = DG.end(); I != E; ++I) { in VisitDeclStmt() local
432 auto visitSyntacticDesignatedInitExpr = [&](DesignatedInitExpr *E) -> bool { in TraverseInitListExpr() argument
433 for (DesignatedInitExpr::Designator &D : llvm::reverse(E->designators())) { in TraverseInitListExpr()
438 /*Relations=*/{}, E); in TraverseInitListExpr()
468 for (unsigned I = 0, E = S->getNumComponents(); I != E; ++I) { in VisitOffsetOfExpr() local
488 bool VisitOverloadExpr(OverloadExpr *E) { in VisitOverloadExpr() argument
490 SymbolRoleSet Roles = getRolesForRef(E, Relations); in VisitOverloadExpr()
491 for (auto *D : E->decls()) in VisitOverloadExpr()
492 IndexCtx.handleReference(D, E->getNameLoc(), Parent, ParentDC, Roles, in VisitOverloadExpr()
493 Relations, E); in VisitOverloadExpr()