|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
gen/lib/Target/AArch64/AArch64GenDAGISel.inc114924 if (auto *G = dyn_cast<GlobalAddressSDNode>(N)) {
114929 if (auto *C = dyn_cast<ConstantPoolSDNode>(N))
gen/lib/Target/Hexagon/HexagonGenDAGISel.inc72587 return isAlignedMemNode(dyn_cast<MemSDNode>(N));
72596 return !isAlignedMemNode(dyn_cast<MemSDNode>(N));
gen/tools/clang/include/clang/AST/StmtDataCollectors.inc 98 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
gen/tools/clang/include/clang/Sema/AttrParsedAttrImpl.inc 101 if (const auto *S = dyn_cast<RecordDecl>(D))
156 if (const auto *S = dyn_cast<VarDecl>(D))
180 if (const auto *S = dyn_cast<VarDecl>(D))
236 if (const auto *S = dyn_cast<Decl>(D))
319 if (const auto *S = dyn_cast<Decl>(D))
402 if (const auto *S = dyn_cast<FunctionDecl>(D))
769 if (const auto *S = dyn_cast<VarDecl>(D))
1225 if (const auto *S = dyn_cast<ObjCMethodDecl>(D))
1312 if (const auto *S = dyn_cast<FunctionDecl>(D))
1654 if (const auto *S = dyn_cast<VarDecl>(D))
1862 if (const auto *S = dyn_cast<FieldDecl>(D))
1917 if (const auto *S = dyn_cast<CXXMethodDecl>(D))
2550 if (const auto *S = dyn_cast<CXXMethodDecl>(D))
2868 if (const auto *S = dyn_cast<VarDecl>(D))
3011 if (const auto *S = dyn_cast<VarDecl>(D))
include/llvm/Analysis/AliasAnalysis.h 723 if (const auto *Call = dyn_cast<CallBase>(I)) {
include/llvm/Analysis/CFGPrinter.h 130 if (const BranchInst *BI = dyn_cast<BranchInst>(Node->getTerminator()))
135 if (const SwitchInst *SI = dyn_cast<SwitchInst>(Node->getTerminator())) {
include/llvm/Analysis/CFLAliasAnalysisUtils.h 45 if (auto *Inst = dyn_cast<Instruction>(Val)) {
50 if (auto *Arg = dyn_cast<Argument>(Val))
include/llvm/Analysis/LazyCallGraph.h 1081 if (Function *F = dyn_cast<Function>(C)) {
1089 if (BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
1098 if (Instruction *I = dyn_cast<Instruction>(U))
include/llvm/Analysis/LoopInfo.h 1073 Instruction *I = dyn_cast<Instruction>(To);
1146 auto *DefI = dyn_cast<Instruction>(U.get());
include/llvm/Analysis/MemorySSA.h 430 if (auto *MU = dyn_cast<MemoryUse>(MUD))
436 if (auto *MU = dyn_cast<MemoryUse>(MUD))
442 if (const auto *MU = dyn_cast<MemoryUse>(MUD))
667 if (const auto *MD = dyn_cast<MemoryDef>(this))
673 if (const auto *MD = dyn_cast<MemoryDef>(this))
679 if (const auto *MD = dyn_cast<MemoryDef>(this))
685 if (auto *MD = dyn_cast<MemoryDef>(this))
692 if (auto *MD = dyn_cast<MemoryDef>(this))
1102 MemoryPhi *MP = dyn_cast<MemoryPhi>(Access);
1111 if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access))
1119 if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access)) {
1279 if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA)) {
include/llvm/Analysis/ObjCARCAnalysisUtils.h 158 if (const Argument *Arg = dyn_cast<Argument>(Op))
169 PointerType *Ty = dyn_cast<PointerType>(Op->getType());
188 if (const LoadInst *LI = dyn_cast<LoadInst>(Op))
221 if (const LoadInst *LI = dyn_cast<LoadInst>(V)) {
224 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Pointer)) {
include/llvm/Analysis/ObjCARCInstKind.h 107 if (const CallInst *CI = dyn_cast<CallInst>(V)) {
include/llvm/Analysis/PHITransAddr.h 55 if (Instruction *I = dyn_cast<Instruction>(Addr))
118 if (Instruction *VI = dyn_cast<Instruction>(V))
include/llvm/Analysis/SparsePropagation.h 293 if (BranchInst *BI = dyn_cast<BranchInst>(&TI)) {
452 if (PHINode *PN = dyn_cast<PHINode>(&I))
481 if (Instruction *Inst = dyn_cast<Instruction>(U))
include/llvm/Analysis/TargetTransformInfoImpl.h 624 dyn_cast<ConstantInt>(VectorValue->getAggregateElement(i))) {
642 if (const auto* CI = dyn_cast<ConstantInt>(Val)) {
647 if (const auto* Cast = dyn_cast<SExtInst>(Val)) {
652 if (const auto* Cast = dyn_cast<ZExtInst>(Val)) {
670 return dyn_cast<SCEVConstant>(AddRec->getStepRecurrence(*SE));
738 auto *BaseGV = dyn_cast<GlobalValue>(Ptr->stripPointerCasts());
757 const ConstantInt *ConstIdx = dyn_cast<ConstantInt>(*I);
760 ConstIdx = dyn_cast<ConstantInt>(Splat);
799 return static_cast<T *>(this)->getMemcpyCost(dyn_cast<Instruction>(U));
853 if (auto *A = dyn_cast<AllocaInst>(U))
857 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(U)) {
900 if (auto *CI = dyn_cast<CallInst>(I)) {
906 if (StructType* StructTy = dyn_cast<StructType>(DstTy))
911 if (VectorType *VectorTy = dyn_cast<VectorType>(DstTy))
include/llvm/Analysis/Utils/Local.h 48 if (Constant *OpC = dyn_cast<Constant>(Op)) {
include/llvm/Analysis/ValueLattice.h 186 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
202 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
include/llvm/CodeGen/BasicTTIImpl.h 299 if (const LoadInst *LI = dyn_cast<LoadInst>(Src))
910 VectorType *VT = dyn_cast<VectorType>(VecTy);
include/llvm/CodeGen/CommandFlags.inc 399 if (auto *Call = dyn_cast<CallInst>(&I))
include/llvm/CodeGen/SelectionDAGNodes.h 2592 const LoadSDNode *Ld = dyn_cast<LoadSDNode>(N);
2630 const StoreSDNode *St = dyn_cast<StoreSDNode>(N);
include/llvm/CodeGen/TargetLowering.h 1240 if (auto *PTy = dyn_cast<PointerType>(Ty))
1243 if (auto *VTy = dyn_cast<VectorType>(Ty)) {
1246 if (auto *PTy = dyn_cast<PointerType>(EltTy)) {
1260 if (PointerType *PTy = dyn_cast<PointerType>(Ty))
1262 else if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
1264 if (PointerType *PT = dyn_cast<PointerType>(Elm)) {
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h 472 if (auto *F = dyn_cast<Function>(V)) {
646 if (auto *GV = dyn_cast<GlobalVariable>(V))
649 if (auto *F = dyn_cast<Function>(V)) {
665 if (auto *A = dyn_cast<GlobalAlias>(V)) {
include/llvm/FuzzMutate/OpDescriptor.h 148 if (const auto *PtrT = dyn_cast<PointerType>(V->getType()))
include/llvm/IR/CFG.h 52 if (auto *Inst = dyn_cast<Instruction>(*It))
include/llvm/IR/CallSite.h 74 if (InstrTy *II = dyn_cast<InstrTy>(V)) {
112 return dyn_cast<FunTy>(getCalledValue());
122 if (const CallBase *CB = dyn_cast<CallBase>(getInstruction()))
877 return V ? dyn_cast<Function>(V->stripPointerCasts()) : nullptr;
include/llvm/IR/DataLayout.h 385 auto *PTy = dyn_cast<PointerType>(Ty);
include/llvm/IR/DebugInfoMetadata.h 329 if (auto *MD = dyn_cast<ConstantAsMetadata>(getRawCountNode()))
332 if (auto *DV = dyn_cast<DIVariable>(getRawCountNode()))
1962 if (auto *F = dyn_cast<DILexicalBlockFile>(getScope()))
1974 for (auto *LBF = dyn_cast<DILexicalBlockFile>(Scope);
1976 LBF = dyn_cast<DILexicalBlockFile>(Scope))
2257 if (auto *BT = dyn_cast<DIBasicType>(getType()))
include/llvm/IR/DerivedTypes.h 619 if (auto *VTy = dyn_cast<VectorType>(this))
include/llvm/IR/GetElementPtrTypeIterator.h 78 if (auto *STy = dyn_cast<SequentialType>(Ty)) {
82 CurTy = dyn_cast<StructType>(Ty);
include/llvm/IR/GlobalIndirectSymbol.h 68 return dyn_cast<GlobalObject>(
include/llvm/IR/IRBuilder.h 1095 auto *LC = dyn_cast<Constant>(L);
1096 auto *RC = dyn_cast<Constant>(R);
1135 if (auto *LC = dyn_cast<Constant>(LHS))
1136 if (auto *RC = dyn_cast<Constant>(RHS))
1152 if (auto *LC = dyn_cast<Constant>(LHS))
1153 if (auto *RC = dyn_cast<Constant>(RHS))
1169 if (auto *LC = dyn_cast<Constant>(LHS))
1170 if (auto *RC = dyn_cast<Constant>(RHS))
1186 if (auto *LC = dyn_cast<Constant>(LHS))
1187 if (auto *RC = dyn_cast<Constant>(RHS))
1200 if (auto *LC = dyn_cast<Constant>(LHS))
1201 if (auto *RC = dyn_cast<Constant>(RHS))
1224 if (auto *LC = dyn_cast<Constant>(LHS))
1225 if (auto *RC = dyn_cast<Constant>(RHS))
1245 if (auto *LC = dyn_cast<Constant>(LHS))
1246 if (auto *RC = dyn_cast<Constant>(RHS))
1265 if (auto *LC = dyn_cast<Constant>(LHS))
1266 if (auto *RC = dyn_cast<Constant>(RHS))
1284 if (auto *RC = dyn_cast<Constant>(RHS)) {
1287 if (auto *LC = dyn_cast<Constant>(LHS))
1310 if (auto *RC = dyn_cast<Constant>(RHS)) {
1313 if (auto *LC = dyn_cast<Constant>(LHS))
1504 if (auto *VC = dyn_cast<Constant>(V))
1522 if (auto *VC = dyn_cast<Constant>(V))
1532 if (auto *VC = dyn_cast<Constant>(V))
1540 if (auto *VC = dyn_cast<Constant>(V))
1548 if (auto *VC = dyn_cast<Constant>(V))
1699 if (auto *PC = dyn_cast<Constant>(Ptr)) {
1718 if (auto *PC = dyn_cast<Constant>(Ptr)) {
1736 if (auto *PC = dyn_cast<Constant>(Ptr))
1737 if (auto *IC = dyn_cast<Constant>(Idx))
1744 if (auto *PC = dyn_cast<Constant>(Ptr))
1745 if (auto *IC = dyn_cast<Constant>(Idx))
1758 if (auto *PC = dyn_cast<Constant>(Ptr))
1768 if (auto *PC = dyn_cast<Constant>(Ptr))
1781 if (auto *PC = dyn_cast<Constant>(Ptr))
1794 if (auto *PC = dyn_cast<Constant>(Ptr))
1804 if (auto *PC = dyn_cast<Constant>(Ptr))
1818 if (auto *PC = dyn_cast<Constant>(Ptr))
1836 if (auto *PC = dyn_cast<Constant>(Ptr))
1854 if (auto *PC = dyn_cast<Constant>(Ptr))
1993 if (auto *VC = dyn_cast<Constant>(V))
2002 if (auto *VC = dyn_cast<Constant>(V))
2011 if (auto *VC = dyn_cast<Constant>(V))
2020 if (auto *VC = dyn_cast<Constant>(V))
2029 if (auto *VC = dyn_cast<Constant>(V))
2039 if (auto *VC = dyn_cast<Constant>(V)) {
2052 if (auto *VC = dyn_cast<Constant>(V))
2072 if (auto *VC = dyn_cast<Constant>(V))
2231 if (auto *LC = dyn_cast<Constant>(LHS))
2232 if (auto *RC = dyn_cast<Constant>(RHS))
2239 if (auto *LC = dyn_cast<Constant>(LHS))
2240 if (auto *RC = dyn_cast<Constant>(RHS))
2311 if (auto *CC = dyn_cast<Constant>(C))
2312 if (auto *TC = dyn_cast<Constant>(True))
2313 if (auto *FC = dyn_cast<Constant>(False))
2333 if (auto *VC = dyn_cast<Constant>(Vec))
2334 if (auto *IC = dyn_cast<Constant>(Idx))
2346 if (auto *VC = dyn_cast<Constant>(Vec))
2347 if (auto *NC = dyn_cast<Constant>(NewElt))
2348 if (auto *IC = dyn_cast<Constant>(Idx))
2360 if (auto *V1C = dyn_cast<Constant>(V1))
2361 if (auto *V2C = dyn_cast<Constant>(V2))
2362 if (auto *MC = dyn_cast<Constant>(Mask))
2376 if (auto *AggC = dyn_cast<Constant>(Agg))
2384 if (auto *AggC = dyn_cast<Constant>(Agg))
2385 if (auto *ValC = dyn_cast<Constant>(Val))
2609 if (const auto *CI = dyn_cast<ConstantInt>(OffsetValue))
include/llvm/IR/InstrTypes.h 976 if (VectorType* vt = dyn_cast<VectorType>(opnd_type)) {
include/llvm/IR/Instructions.h 5259 if (auto *Load = dyn_cast<LoadInst>(V))
5261 if (auto *Store = dyn_cast<StoreInst>(V))
5275 if (auto *Gep = dyn_cast<GetElementPtrInst>(V))
5287 if (auto *LI = dyn_cast<LoadInst>(I))
5297 if (auto *LI = dyn_cast<LoadInst>(I))
include/llvm/IR/IntrinsicInst.h 677 if (auto *MI = dyn_cast<MemIntrinsic>(this))
include/llvm/IR/Metadata.h 532 if (auto *V = dyn_cast<ConstantAsMetadata>(MD))
578 if (auto *V = dyn_cast<ConstantAsMetadata>(MD))
579 return dyn_cast<X>(V->getValue());
592 return dyn_cast<X>(V->getValue());
include/llvm/IR/ModuleSummaryIndex.h 477 if (auto *AS = dyn_cast<AliasSummary>(this))
483 if (auto *AS = dyn_cast<AliasSummary>(this))
1013 dyn_cast<FunctionSummary>(V.getSummaryList().front().get());
include/llvm/IR/ModuleSummaryIndexYAML.h 239 if (auto *FSum = dyn_cast<FunctionSummary>(Sum.get())) {
include/llvm/IR/Operator.h 41 if (const Instruction *I = dyn_cast<Instruction>(this))
49 if (const Instruction *I = dyn_cast<Instruction>(V))
51 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
374 if (auto *I = dyn_cast<Instruction>(V))
376 else if (auto *CE = dyn_cast<ConstantExpr>(V))
518 if (ConstantInt *C = dyn_cast<ConstantInt>(I))
include/llvm/IR/PatternMatch.h 158 if (auto *CI = dyn_cast<ConstantInt>(V)) {
163 if (const auto *C = dyn_cast<Constant>(V))
178 if (auto *CI = dyn_cast<ConstantFP>(V)) {
183 if (const auto *C = dyn_cast<Constant>(V))
202 if (const auto *CI = dyn_cast<ConstantInt>(V)) {
225 if (const auto *CI = dyn_cast<ConstantInt>(V))
228 if (const auto *C = dyn_cast<Constant>(V)) {
242 auto *CI = dyn_cast<ConstantInt>(Elt);
262 if (const auto *CI = dyn_cast<ConstantInt>(V))
268 if (const auto *C = dyn_cast<Constant>(V))
284 if (const auto *CF = dyn_cast<ConstantFP>(V))
287 if (const auto *C = dyn_cast<Constant>(V)) {
301 auto *CF = dyn_cast<ConstantFP>(Elt);
397 auto *C = dyn_cast<Constant>(V);
545 if (auto *CV = dyn_cast<Class>(V)) {
613 if (const auto *CFP = dyn_cast<ConstantFP>(V))
616 if (const auto *C = dyn_cast<Constant>(V))
636 if (const auto *CV = dyn_cast<ConstantInt>(V))
653 const auto *CI = dyn_cast<ConstantInt>(V);
655 if (const auto *C = dyn_cast<Constant>(V))
683 const auto *BB = dyn_cast<BasicBlock>(V);
715 if (auto *I = dyn_cast<BinaryOperator>(V))
749 if (auto *CE = dyn_cast<ConstantExpr>(V))
787 auto *FPMO = dyn_cast<FPMathOperator>(V);
919 if (auto *Op = dyn_cast<OverflowingBinaryOperator>(V)) {
1011 if (auto *I = dyn_cast<Instruction>(V))
1014 if (auto *CE = dyn_cast<ConstantExpr>(V))
1106 if (auto *PEO = dyn_cast<PossiblyExactOperator>(V))
1133 if (auto *I = dyn_cast<Class>(V))
1280 if (auto *O = dyn_cast<Operator>(V))
1384 if (auto *BI = dyn_cast<BranchInst>(V))
1405 if (auto *BI = dyn_cast<BranchInst>(V))
1441 auto *SI = dyn_cast<SelectInst>(V);
1444 auto *Cmp = dyn_cast<CmpInst_t>(SI->getCondition());
1675 if (const auto *CI = dyn_cast<CallInst>(V))
1694 if (const auto *CI = dyn_cast<CallInst>(V))
include/llvm/IR/Statepoint.h 264 if (auto *GRI = dyn_cast<GCResultInst>(U))
415 if (auto *Relocate = dyn_cast<GCRelocateInst>(U))
418 auto *StatepointInvoke = dyn_cast<InvokeInst>(StatepointCall);
427 if (auto *Relocate = dyn_cast<GCRelocateInst>(LandingPadUser))
include/llvm/ObjectYAML/WasmYAML.h 201 auto C = dyn_cast<CustomSection>(S);
216 auto C = dyn_cast<CustomSection>(S);
227 auto C = dyn_cast<CustomSection>(S);
242 auto C = dyn_cast<CustomSection>(S);
255 auto C = dyn_cast<CustomSection>(S);
include/llvm/TableGen/Record.h 1572 if (const auto *SI = dyn_cast<StringInit>(SCPair.first->getNameInit())) {
include/llvm/Transforms/IPO/Attributor.h 166 if (auto *Arg = dyn_cast<Argument>(&V))
168 if (auto *CB = dyn_cast<CallBase>(&V))
271 if (auto *CB = dyn_cast<CallBase>(AnchorVal))
293 if (auto *Arg = dyn_cast<Argument>(&getAnchorValue()))
344 if (auto *I = dyn_cast<Instruction>(&V))
346 if (auto *Arg = dyn_cast<Argument>(&V))
349 if (auto *F = dyn_cast<Function>(&V))
include/llvm/Transforms/InstCombine/InstCombineWorklist.h 48 if (Instruction *I = dyn_cast<Instruction>(V))
include/llvm/Transforms/Utils/Evaluator.h 66 if (Constant *CV = dyn_cast<Constant>(V)) return CV;
lib/Analysis/AliasAnalysis.cpp 157 if (const auto *Call1 = dyn_cast<CallBase>(I)) {
652 const auto *Call = dyn_cast<CallBase>(I);
869 if (const auto *Call = dyn_cast<CallBase>(V))
875 if (const Argument *A = dyn_cast<Argument>(V))
887 if (const Argument *A = dyn_cast<Argument>(V))
lib/Analysis/AliasAnalysisEvaluator.cpp 115 if (auto *Call = dyn_cast<CallBase>(&Inst)) {
lib/Analysis/AliasAnalysisSummary.cpp 55 if (auto *Arg = dyn_cast<Argument>(&Val))
lib/Analysis/AliasSetTracker.cpp 247 const auto *C1 = dyn_cast<CallBase>(UnknownInst);
248 const auto *C2 = dyn_cast<CallBase>(Inst);
437 if (auto *II = dyn_cast<IntrinsicInst>(Inst)) {
462 if (LoadInst *LI = dyn_cast<LoadInst>(I))
464 if (StoreInst *SI = dyn_cast<StoreInst>(I))
466 if (VAArgInst *VAAI = dyn_cast<VAArgInst>(I))
468 if (AnyMemSetInst *MSI = dyn_cast<AnyMemSetInst>(I))
470 if (AnyMemTransferInst *MTI = dyn_cast<AnyMemTransferInst>(I))
474 if (auto *Call = dyn_cast<CallBase>(I))
549 if (auto *MUD = dyn_cast<MemoryUseOrDef>(&Access))
lib/Analysis/AssumptionCache.cpp 64 } else if (auto *I = dyn_cast<Instruction>(V)) {
lib/Analysis/BasicAliasAnalysis.cpp 147 if (const Argument *A = dyn_cast<Argument>(V))
290 if (const ConstantInt *Const = dyn_cast<ConstantInt>(V)) {
301 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(V)) {
302 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(BOp->getOperand(1))) {
473 const Operator *Op = dyn_cast<Operator>(V);
476 if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
492 const GEPOperator *GEPOp = dyn_cast<GEPOperator>(Op);
494 if (const auto *Call = dyn_cast<CallBase>(V)) {
512 if (const Instruction *I = dyn_cast<Instruction>(V))
555 if (const ConstantInt *CIdx = dyn_cast<ConstantInt>(Index)) {
672 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) {
684 if (const SelectInst *SI = dyn_cast<SelectInst>(V)) {
692 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
812 const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Call);
818 if (const Instruction *inst = dyn_cast<Instruction>(V)) {
824 if (const Argument *arg = dyn_cast<Argument>(V))
883 if (const CallInst *CI = dyn_cast<CallInst>(Call))
890 if (auto *AI = dyn_cast<AllocaInst>(Object))
979 if (auto *Inst = dyn_cast<AnyMemCpyInst>(Call)) {
1110 dyn_cast<ConstantInt>(GEP1->getOperand(GEP1->getNumOperands() - 1));
1112 dyn_cast<ConstantInt>(GEP2->getOperand(GEP2->getNumOperands() - 1));
1145 StructType *LastIndexedStruct = dyn_cast<StructType>(Ty);
1340 if (const GEPOperator *GEP2 = dyn_cast<GEPOperator>(V2)) {
1554 if (const SelectInst *SI2 = dyn_cast<SelectInst>(V2))
1593 if (const PHINode *PN2 = dyn_cast<PHINode>(V2))
1651 if (GEPOperator *PV1GEP = dyn_cast<GEPOperator>(PV1)) {
1678 if (GEPOperator *PV1GEP = dyn_cast<GEPOperator>(PV1)) {
1772 if (const ConstantPointerNull *CPN = dyn_cast<ConstantPointerNull>(O1))
1775 if (const ConstantPointerNull *CPN = dyn_cast<ConstantPointerNull>(O2))
1842 if (const GEPOperator *GV1 = dyn_cast<GEPOperator>(V1)) {
1859 if (const PHINode *PN = dyn_cast<PHINode>(V1)) {
1875 if (const SelectInst *S1 = dyn_cast<SelectInst>(V1)) {
1917 const Instruction *Inst = dyn_cast<Instruction>(V);
lib/Analysis/BranchProbabilityInfo.cpp 158 if (auto *II = dyn_cast<InvokeInst>(TI)) {
190 if (auto *II = dyn_cast<InvokeInst>(TI))
199 if (const CallInst *CI = dyn_cast<CallInst>(&I))
401 const BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
406 ICmpInst *CI = dyn_cast<ICmpInst>(Cond);
492 const BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
497 CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition());
505 Instruction *CmpLHS = dyn_cast<Instruction>(CI->getOperand(0));
506 PHINode *CmpPHI = dyn_cast<PHINode>(CmpLHS);
507 Constant *CmpConst = dyn_cast<Constant>(CI->getOperand(1));
516 CmpLHS = dyn_cast<Instruction>(CmpLHS->getOperand(0));
518 CmpPHI = dyn_cast<PHINode>(CmpLHS);
538 if (PHINode *PN = dyn_cast<PHINode>(V)) {
546 Constant *CmpLHSConst = dyn_cast<Constant>(V);
661 const BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
666 ICmpInst *CI = dyn_cast<ICmpInst>(Cond);
671 if (auto *I = dyn_cast<BitCastInst>(V))
672 return dyn_cast<ConstantInt>(I->getOperand(0));
673 return dyn_cast<ConstantInt>(V);
683 if (Instruction *LHS = dyn_cast<Instruction>(CI->getOperand(0)))
685 if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(LHS->getOperand(1)))
692 if (CallInst *Call = dyn_cast<CallInst>(CI->getOperand(0)))
779 const BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
784 FCmpInst *FCmp = dyn_cast<FCmpInst>(Cond);
821 const InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator());
lib/Analysis/CFLAndersAliasAnalysis.cpp 359 if (auto Arg = dyn_cast<Argument>(Val))
lib/Analysis/CFLGraph.h 206 if (auto GVal = dyn_cast<GlobalValue>(Val)) {
210 } else if (auto CExpr = dyn_cast<ConstantExpr>(Val)) {
lib/Analysis/CGSCCPassManager.cpp 474 if (auto *C = dyn_cast<Constant>(Op))
lib/Analysis/CallGraph.cpp 75 if (auto *Call = dyn_cast<CallBase>(&I)) {
lib/Analysis/CallGraphSCCPass.cpp 288 auto *Call = dyn_cast<CallBase>(&I);
lib/Analysis/CaptureTracking.cpp 45 if (auto *GEP = dyn_cast<GetElementPtrInst>(O))
278 if (auto *MI = dyn_cast<MemIntrinsic>(Call))
352 if (auto *CPN = dyn_cast<ConstantPointerNull>(I->getOperand(OtherIdx))) {
371 auto *LI = dyn_cast<LoadInst>(I->getOperand(OtherIdx));
lib/Analysis/CodeMetrics.cpp 31 const User *U = dyn_cast<User>(V);
127 if (const auto *Call = dyn_cast<CallBase>(&I)) {
152 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
163 if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
170 if (const InvokeInst *InvI = dyn_cast<InvokeInst>(&I))
lib/Analysis/ConstantFolding.cpp 106 if (auto *VTy = dyn_cast<VectorType>(C->getType())) {
136 auto *DestVTy = dyn_cast<VectorType>(DestTy);
255 auto *Src = dyn_cast<ConstantInt>(Element);
291 if ((GV = dyn_cast<GlobalValue>(C))) {
298 auto *CE = dyn_cast<ConstantExpr>(C);
307 auto *GEP = dyn_cast<GEPOperator>(CE);
388 if (auto *CI = dyn_cast<ConstantInt>(C)) {
406 if (auto *CFP = dyn_cast<ConstantFP>(C)) {
422 if (auto *CS = dyn_cast<ConstantStruct>(C)) {
466 if (auto *AT = dyn_cast<ArrayType>(C->getType()))
488 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
503 auto *IntType = dyn_cast<IntegerType>(LoadTy);
556 auto *GV = dyn_cast<GlobalVariable>(GVal);
607 auto *SrcPtrTy = dyn_cast<PointerType>(SrcPtr->getType());
624 if (auto *GV = dyn_cast<GlobalVariable>(C))
628 if (auto *GA = dyn_cast<GlobalAlias>(C))
633 auto *CE = dyn_cast<ConstantExpr>(C);
638 if (auto *GV = dyn_cast<GlobalVariable>(CE->getOperand(0))) {
687 if (auto *GV = dyn_cast<GlobalVariable>(GetUnderlyingObject(CE, DL))) {
705 if (auto *C = dyn_cast<Constant>(LI->getOperand(0)))
850 auto *CE = dyn_cast<ConstantExpr>(Ops[1]);
875 while (auto *GEP = dyn_cast<GEPOperator>(Ptr)) {
900 if (auto *CE = dyn_cast<ConstantExpr>(Ptr)) {
902 if (auto *Base = dyn_cast<ConstantInt>(CE->getOperand(0)))
933 } else if (auto *ATy = dyn_cast<SequentialType>(Ty)) {
1030 if (auto *GEP = dyn_cast<GEPOperator>(InstOrCE)) {
1039 if (auto *CE = dyn_cast<ConstantExpr>(InstOrCE))
1047 if (auto *F = dyn_cast<Function>(Ops.back())) {
1104 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1121 if (auto *PN = dyn_cast<PHINode>(I)) {
1133 auto *C = dyn_cast<Constant>(Incoming);
1166 if (const auto *CI = dyn_cast<CmpInst>(I))
1170 if (const auto *LI = dyn_cast<LoadInst>(I))
1173 if (auto *IVI = dyn_cast<InsertValueInst>(I)) {
1180 if (auto *EVI = dyn_cast<ExtractValueInst>(I)) {
1216 if (auto *CE0 = dyn_cast<ConstantExpr>(Ops0)) {
1240 if (auto *CE1 = dyn_cast<ConstantExpr>(Ops1)) {
1316 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1337 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1673 if (auto *CI = dyn_cast<ConstantInt>(Op)) {
1731 if (auto *Op = dyn_cast<ConstantFP>(Operands[0])) {
1964 if (auto *Op = dyn_cast<ConstantInt>(Operands[0])) {
2031 if (auto *Op1 = dyn_cast<ConstantFP>(Operands[0])) {
2036 if (auto *Op2 = dyn_cast<ConstantFP>(Operands[1])) {
2106 } else if (auto *Op2C = dyn_cast<ConstantInt>(Operands[1])) {
2284 if (const auto *Op1 = dyn_cast<ConstantFP>(Operands[0])) {
2285 if (const auto *Op2 = dyn_cast<ConstantFP>(Operands[1])) {
2286 if (const auto *Op3 = dyn_cast<ConstantFP>(Operands[2])) {
2301 if (const auto *Op1 = dyn_cast<ConstantInt>(Operands[0])) {
2302 if (const auto *Op2 = dyn_cast<ConstantInt>(Operands[1])) {
2303 if (const auto *Op3 = dyn_cast<ConstantInt>(Operands[2])) {
2479 if (auto *VTy = dyn_cast<VectorType>(Ty))
2502 if (ConstantFP *OpC = dyn_cast<ConstantFP>(Call->getArgOperand(0))) {
2601 ConstantFP *Op0C = dyn_cast<ConstantFP>(Call->getArgOperand(0));
2602 ConstantFP *Op1C = dyn_cast<ConstantFP>(Call->getArgOperand(1));
lib/Analysis/Delinearization.cpp 88 dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFn));
lib/Analysis/DemandedBits.cpp 117 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(UserI))
lib/Analysis/DependenceAnalysis.cpp 504 dyn_cast<SCEVConstant>(SE->getMinusSCEV(C1A2, C2A1));
506 dyn_cast<SCEVConstant>(SE->getMinusSCEV(C1B2, C2B1));
508 dyn_cast<SCEVConstant>(SE->getMinusSCEV(A1B2, A2B1));
510 dyn_cast<SCEVConstant>(SE->getMinusSCEV(A2B1, A1B2));
678 if (const LoadInst *LI = dyn_cast<LoadInst>(I))
680 else if (const StoreInst *SI = dyn_cast<StoreInst>(I))
816 IntegerType *SrcTy = dyn_cast<IntegerType>(Src->getType());
817 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType());
841 IntegerType *SrcTy = dyn_cast<IntegerType>(Src->getType());
842 IntegerType *DstTy = dyn_cast<IntegerType>(Dst->getType());
884 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Src);
909 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Dst);
1016 auto *SType = dyn_cast<IntegerType>(S->getType());
1017 auto *SizeType = dyn_cast<IntegerType>(Size->getType());
1027 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Bound)) {
1046 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(Ptr))
1049 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
1084 return dyn_cast<SCEVConstant>(UB);
1308 const SCEVConstant *ConstCoeff = dyn_cast<SCEVConstant>(Coeff);
1314 ConstCoeff = dyn_cast<SCEVConstant>(SE->getNegativeSCEV(ConstCoeff));
1327 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1511 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1512 const SCEVConstant *ConstSrcCoeff = dyn_cast<SCEVConstant>(SrcCoeff);
1513 const SCEVConstant *ConstDstCoeff = dyn_cast<SCEVConstant>(DstCoeff);
1731 const SCEVConstant *ConstCoeff = dyn_cast<SCEVConstant>(DstCoeff);
1840 const SCEVConstant *ConstCoeff = dyn_cast<SCEVConstant>(SrcCoeff);
1910 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1911 const SCEVConstant *ConstSrcCoeff = dyn_cast<SCEVConstant>(SrcCoeff);
1912 const SCEVConstant *ConstDstCoeff = dyn_cast<SCEVConstant>(DstCoeff);
2158 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src);
2159 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst);
2235 const SCEVAddRecExpr *SrcAddRec = dyn_cast<SCEVAddRecExpr>(Src);
2236 const SCEVAddRecExpr *DstAddRec = dyn_cast<SCEVAddRecExpr>(Dst);
2247 dyn_cast<SCEVAddRecExpr>(SrcAddRec->getStart())) {
2260 dyn_cast<SCEVAddRecExpr>(DstAddRec->getStart())) {
2302 if (const auto *Constant = dyn_cast<SCEVConstant>(Expr))
2304 else if (const auto *Product = dyn_cast<SCEVMulExpr>(Expr))
2305 if (const auto *Constant = dyn_cast<SCEVConstant>(Product->getOperand(0)))
2342 dyn_cast<SCEVAddRecExpr>(Coefficients)) {
2361 dyn_cast<SCEVAddRecExpr>(Coefficients)) {
2377 const SCEVConstant *Constant = dyn_cast<SCEVConstant>(Delta);
2378 if (const SCEVAddExpr *Sum = dyn_cast<SCEVAddExpr>(Delta)) {
2386 else if (const SCEVMulExpr *Product = dyn_cast<SCEVMulExpr>(Operand)) {
2431 dyn_cast<SCEVAddRecExpr>(Coefficients)) {
2923 while (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Subscript)) {
2997 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3013 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3033 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3129 const SCEVConstant *Bconst = dyn_cast<SCEVConstant>(B);
3130 const SCEVConstant *Cconst = dyn_cast<SCEVConstant>(C);
3144 const SCEVConstant *Aconst = dyn_cast<SCEVConstant>(A);
3145 const SCEVConstant *Cconst = dyn_cast<SCEVConstant>(C);
3158 const SCEVConstant *Aconst = dyn_cast<SCEVConstant>(A);
3159 const SCEVConstant *Cconst = dyn_cast<SCEVConstant>(C);
3281 dyn_cast<SCEVUnknown>(SE->getPointerBase(SrcAccessFn));
3283 dyn_cast<SCEVUnknown>(SE->getPointerBase(DstAccessFn));
3295 const SCEVAddRecExpr *SrcAR = dyn_cast<SCEVAddRecExpr>(SrcSCEV);
3296 const SCEVAddRecExpr *DstAR = dyn_cast<SCEVAddRecExpr>(DstSCEV);
lib/Analysis/DependenceGraphBuilder.cpp 89 Instruction *UI = dyn_cast<Instruction>(U);
lib/Analysis/DivergenceAnalysis.cpp 113 if (auto *BranchTerm = dyn_cast<BranchInst>(&Term)) {
117 if (auto *SwitchTerm = dyn_cast<SwitchInst>(&Term)) {
138 const auto *Inst = dyn_cast<const Instruction>(&Val);
232 auto *OpInst = dyn_cast<Instruction>(&Op);
263 const auto *UserInst = dyn_cast<const Instruction>(User);
392 const auto *Phi = dyn_cast<const PHINode>(&I);
lib/Analysis/EHPersonalities.cpp 23 Pers ? dyn_cast<Function>(Pers->stripPointerCasts()) : nullptr;
123 if (auto *CatchRet = dyn_cast<CatchReturnInst>(Terminator)) {
lib/Analysis/GlobalsModRef.cpp 211 if (auto *F = dyn_cast<Function>(V))
214 if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
352 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
355 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
368 } else if (auto *Call = dyn_cast<CallBase>(I)) {
381 } else if (ICmpInst *ICI = dyn_cast<ICmpInst>(I)) {
384 } else if (Constant *C = dyn_cast<Constant>(I)) {
416 if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
423 } else if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
579 if (auto *Call = dyn_cast<CallBase>(&I)) {
655 if (auto *LI = dyn_cast<LoadInst>(Input)) {
659 if (auto *SI = dyn_cast<SelectInst>(Input)) {
668 if (auto *PN = dyn_cast<PHINode>(Input)) {
725 if (auto *InputGV = dyn_cast<GlobalValue>(Input)) {
733 auto *GVar = dyn_cast<GlobalVariable>(GV);
734 auto *InputGVar = dyn_cast<GlobalVariable>(InputGV);
766 if (auto *LI = dyn_cast<LoadInst>(Input)) {
776 if (auto *SI = dyn_cast<SelectInst>(Input)) {
785 if (auto *PN = dyn_cast<PHINode>(Input)) {
819 const GlobalValue *GV1 = dyn_cast<GlobalValue>(UV1);
820 const GlobalValue *GV2 = dyn_cast<GlobalValue>(UV2);
858 if (const LoadInst *LI = dyn_cast<LoadInst>(UV1))
859 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(LI->getOperand(0)))
862 if (const LoadInst *LI = dyn_cast<LoadInst>(UV2))
863 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(LI->getOperand(0)))
929 dyn_cast<GlobalValue>(GetUnderlyingObject(Loc.Ptr, DL)))
lib/Analysis/IVDescriptors.cpp 172 if (auto *Cast = dyn_cast<CastInst>(Val))
184 if (auto *I = dyn_cast<Instruction>(O))
293 !VisitedInsts.count(dyn_cast<Instruction>(Cur->getOperand(0))))
470 if ((Cmp = dyn_cast<ICmpInst>(I)) || (Cmp = dyn_cast<FCmpInst>(I))) {
470 if ((Cmp = dyn_cast<ICmpInst>(I)) || (Cmp = dyn_cast<FCmpInst>(I))) {
471 if (!Cmp->hasOneUse() || !(Select = dyn_cast<SelectInst>(*I->user_begin())))
477 if (!(Select = dyn_cast<SelectInst>(I)))
479 if (!(Cmp = dyn_cast<ICmpInst>(I->getOperand(0))) &&
480 !(Cmp = dyn_cast<FCmpInst>(I->getOperand(0))))
521 SelectInst *SI = dyn_cast<SelectInst>(I);
525 CmpInst *CI = dyn_cast<CmpInst>(SI->getCondition());
539 isa<PHINode>(*TrueVal) ? dyn_cast<Instruction>(FalseVal)
540 : dyn_cast<Instruction>(TrueVal);
694 auto *Previous = dyn_cast<Instruction>(Phi->getIncomingValueForBlock(Latch));
715 if (auto *I = dyn_cast<Instruction>(U)) {
823 return dyn_cast<ConstantInt>(cast<SCEVConstant>(Step)->getValue());
852 BinaryOperator *BOp = dyn_cast<BinaryOperator>(BEValue);
870 if (auto *I = dyn_cast<Instruction>(Addend))
931 const BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Val);
958 auto *Inst = dyn_cast<Instruction>(Val);
965 auto *AddRec = dyn_cast<SCEVAddRecExpr>(PSE.getSCEV(Val));
979 Inst = dyn_cast<Instruction>(Val);
1002 const auto *AR = dyn_cast<SCEVAddRecExpr>(PhiScev);
1014 const auto *SymbolicPhi = dyn_cast<SCEVUnknown>(PhiScev);
1040 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(PhiScev);
1062 dyn_cast<BinaryOperator>(Phi->getIncomingValueForBlock(Latch));
1067 const SCEVConstant *ConstStep = dyn_cast<SCEVConstant>(Step);
lib/Analysis/IVUsers.cpp 62 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
77 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
147 PHINode *PN = dyn_cast<PHINode>(User);
219 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
395 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
401 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
lib/Analysis/InlineCost.cpp 394 ConstantInt *OpC = dyn_cast<ConstantInt>(GTI.getOperand());
397 OpC = dyn_cast<ConstantInt>(SimpleOp);
499 Constant *C = dyn_cast<Constant>(V);
617 Constant *COp = dyn_cast<Constant>(Op);
767 if (Argument *A = dyn_cast<Argument>(V))
799 if (InvokeInst *II = dyn_cast<InvokeInst>(&Call)) {
1066 Constant *CLHS = dyn_cast<Constant>(LHS);
1069 Constant *CRHS = dyn_cast<Constant>(RHS);
1074 if (auto FI = dyn_cast<FPMathOperator>(&I))
1105 Constant *COp = dyn_cast<Constant>(Op);
1215 Constant *C = dyn_cast<Constant>(I);
1248 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(&Call)) {
1358 Constant *TrueC = dyn_cast<Constant>(TrueVal);
1361 Constant *FalseC = dyn_cast<Constant>(FalseVal);
1412 if (Constant *SelectedC = dyn_cast<Constant>(SelectedV)) {
1663 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
1669 } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
1778 CallBase *Call = dyn_cast<CallBase>(U);
1791 if (Constant *C = dyn_cast<Constant>(CAI))
1862 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
1874 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
2106 CallBase *Call = dyn_cast<CallBase>(&II);
lib/Analysis/InstructionSimplify.cpp 75 if (auto *BO = dyn_cast<BinaryOperator>(Cond))
129 CmpInst *Cmp = dyn_cast<CmpInst>(V);
142 Instruction *I = dyn_cast<Instruction>(V);
179 if (BinaryOperator *Op0 = dyn_cast<BinaryOperator>(LHS))
202 if (BinaryOperator *Op1 = dyn_cast<BinaryOperator>(RHS))
239 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(LHS);
240 BinaryOperator *Op1 = dyn_cast<BinaryOperator>(RHS);
377 Instruction *Simplified = dyn_cast<Instruction>(FV ? FV : TV);
563 if (auto *CLHS = dyn_cast<Constant>(Op0)) {
564 if (auto *CRHS = dyn_cast<Constant>(Op1))
907 auto *Op1C = dyn_cast<Constant>(Op1);
1168 Constant *C = dyn_cast<Constant>(Amount);
1177 if (ConstantInt *CI = dyn_cast<ConstantInt>(C))
1797 auto *Cast0 = dyn_cast<CastInst>(Op0);
1798 auto *Cast1 = dyn_cast<CastInst>(Op1);
1806 auto *ICmp0 = dyn_cast<ICmpInst>(Op0);
1807 auto *ICmp1 = dyn_cast<ICmpInst>(Op1);
1812 auto *FCmp0 = dyn_cast<FCmpInst>(Op0);
1813 auto *FCmp1 = dyn_cast<FCmpInst>(Op1);
1824 if (auto *C = dyn_cast<Constant>(V))
1835 auto *Extract = dyn_cast<ExtractValueInst>(Op1);
2256 SelectInst *SI = dyn_cast<SelectInst>(V);
2259 CmpInst *Cmp = dyn_cast<CmpInst>(SI->getCondition());
2385 ConstantInt *LHSOffsetCI = dyn_cast<ConstantInt>(LHSOffset);
2386 ConstantInt *RHSOffsetCI = dyn_cast<ConstantInt>(RHSOffset);
2448 if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
2450 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
2454 if (const Argument *A = dyn_cast<Argument>(V))
2669 BinaryOperator *LBO = dyn_cast<BinaryOperator>(LHS);
2670 BinaryOperator *RBO = dyn_cast<BinaryOperator>(RHS);
2792 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS)) {
2899 if (auto *CI = dyn_cast<ConstantInt>(RHS)) {
3187 if (Constant *CLHS = dyn_cast<Constant>(LHS)) {
3188 if (Constant *CRHS = dyn_cast<Constant>(RHS))
3254 if (Constant *RHSC = dyn_cast<Constant>(RHS)) {
3260 } else if (PtrToIntInst *RI = dyn_cast<PtrToIntInst>(RHS)) {
3272 if (ZExtInst *RI = dyn_cast<ZExtInst>(RHS)) {
3282 else if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
3332 if (SExtInst *RI = dyn_cast<SExtInst>(RHS)) {
3341 else if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
3420 if (auto *CLHS = dyn_cast<PtrToIntOperator>(LHS))
3421 if (auto *CRHS = dyn_cast<PtrToIntOperator>(RHS))
3431 if (GetElementPtrInst *GLHS = dyn_cast<GetElementPtrInst>(LHS)) {
3432 if (GEPOperator *GRHS = dyn_cast<GEPOperator>(RHS)) {
3482 if (Constant *CLHS = dyn_cast<Constant>(LHS)) {
3483 if (Constant *CRHS = dyn_cast<Constant>(RHS))
3675 auto *I = dyn_cast<Instruction>(V);
3680 if (auto *B = dyn_cast<BinaryOperator>(I)) {
3707 if (CmpInst *C = dyn_cast<CmpInst>(I)) {
3719 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
3733 if (Constant *CRepOp = dyn_cast<Constant>(RepOp)) {
3739 else if (Constant *COp = dyn_cast<Constant>(I->getOperand(i)))
3747 if (CmpInst *C = dyn_cast<CmpInst>(I))
3751 if (LoadInst *LI = dyn_cast<LoadInst>(I))
3936 if (auto *CondC = dyn_cast<Constant>(Cond)) {
3937 if (auto *TrueC = dyn_cast<Constant>(TrueVal))
3938 if (auto *FalseC = dyn_cast<Constant>(FalseVal))
4001 if (VectorType *VT = dyn_cast<VectorType>(Ops[0]->getType()))
4003 else if (VectorType *VT = dyn_cast<VectorType>(Ops[1]->getType()))
4110 if (Constant *CAgg = dyn_cast<Constant>(Agg))
4111 if (Constant *CVal = dyn_cast<Constant>(Val))
4119 if (ExtractValueInst *EV = dyn_cast<ExtractValueInst>(Val))
4143 auto *VecC = dyn_cast<Constant>(Vec);
4144 auto *ValC = dyn_cast<Constant>(Val);
4145 auto *IdxC = dyn_cast<Constant>(Idx);
4150 if (auto *CI = dyn_cast<ConstantInt>(Idx)) {
4178 if (auto *CAgg = dyn_cast<Constant>(Agg))
4183 for (auto *IVI = dyn_cast<InsertValueInst>(Agg); IVI != nullptr;
4184 IVI = dyn_cast<InsertValueInst>(IVI->getAggregateOperand())) {
4208 if (auto *CVec = dyn_cast<Constant>(Vec)) {
4209 if (auto *CIdx = dyn_cast<Constant>(Idx))
4222 if (auto *IdxC = dyn_cast<ConstantInt>(Idx)) {
4278 if (auto *C = dyn_cast<Constant>(Op))
4281 if (auto *CI = dyn_cast<CastInst>(Op)) {
4340 if (auto *SourceShuf = dyn_cast<ShuffleVectorInst>(SourceOp)) {
4397 auto *Op0Const = dyn_cast<Constant>(Op0);
4398 auto *Op1Const = dyn_cast<Constant>(Op1);
4413 if (auto *OpShuf = dyn_cast<ShuffleVectorInst>(Op0))
4450 if (auto *C = dyn_cast<Constant>(Op))
4885 auto *OffsetConstInt = dyn_cast<ConstantInt>(Offset);
4900 auto *LoadedCE = dyn_cast<ConstantExpr>(Loaded);
4905 LoadedCE = dyn_cast<ConstantExpr>(LoadedCE->getOperand(0));
4913 auto *LoadedLHS = dyn_cast<ConstantExpr>(LoadedCE->getOperand(0));
4934 if (auto *II = dyn_cast<IntrinsicInst>(Op0))
5072 if (auto *C0 = dyn_cast<Constant>(Op0))
5073 if (auto *C1 = dyn_cast<Constant>(Op1))
5077 if (auto *Power = dyn_cast<ConstantInt>(Op1)) {
5108 if (auto *M0 = dyn_cast<IntrinsicInst>(Op0))
5112 if (auto *M1 = dyn_cast<IntrinsicInst>(Op1))
5211 Function *F = dyn_cast<Function>(Callee);
5226 Constant *C = dyn_cast<Constant>(&Arg);
lib/Analysis/LazyCallGraph.cpp 112 if (Constant *C = dyn_cast<Constant>(Op))
181 if (Function* F = dyn_cast<Function>(A.getAliasee())) {
lib/Analysis/LazyValueInfo.cpp 571 if (Constant *VC = dyn_cast<Constant>(Val))
623 Instruction *BBI = dyn_cast<Instruction>(Val);
627 if (PHINode *PN = dyn_cast<PHINode>(BBI))
630 if (auto *SI = dyn_cast<SelectInst>(BBI))
642 PointerType *PT = dyn_cast<PointerType>(BBI->getType());
648 if (auto *CI = dyn_cast<CastInst>(BBI))
651 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(BBI))
654 if (auto *EVI = dyn_cast<ExtractValueInst>(BBI))
657 if (auto *II = dyn_cast<IntrinsicInst>(BBI))
668 if (LoadInst *L = dyn_cast<LoadInst>(I)) {
673 if (StoreInst *S = dyn_cast<StoreInst>(I)) {
678 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) {
682 ConstantInt *Len = dyn_cast<ConstantInt>(MI->getLength());
689 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI))
726 PointerType *PTy = dyn_cast<PointerType>(Val->getType());
763 PointerType *PTy = dyn_cast<PointerType>(Val->getType());
824 BBI = BBI ? BBI : dyn_cast<Instruction>(Val);
955 if (auto *ICI = dyn_cast<ICmpInst>(Cond)) {
958 if (ConstantInt *CIBase = dyn_cast<ConstantInt>(ICI->getOperand(1))) {
1095 if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(BO)) {
1154 if (auto *SI = dyn_cast<SaturatingInst>(II))
1165 if (auto *WO = dyn_cast<WithOverflowInst>(EVI->getAggregateOperand()))
1232 if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS))
1234 else if (Instruction *I = dyn_cast<Instruction>(RHS))
1282 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Cond))
1285 if (auto *EVI = dyn_cast<ExtractValueInst>(Cond))
1286 if (auto *WO = dyn_cast<WithOverflowInst>(EVI->getAggregateOperand()))
1294 BinaryOperator *BO = dyn_cast<BinaryOperator>(Cond);
1354 if (auto *CI = dyn_cast<CastInst>(Usr)) {
1361 } else if (auto *BO = dyn_cast<BinaryOperator>(Usr)) {
1383 if (BranchInst *BI = dyn_cast<BranchInst>(BBFrom->getTerminator())) {
1407 if (User *Usr = dyn_cast<User>(Val)) {
1451 if (SwitchInst *SI = dyn_cast<SwitchInst>(BBFrom->getTerminator())) {
1458 if (User *Usr = dyn_cast<User>(Val))
1508 if (Constant *VC = dyn_cast<Constant>(Val)) {
1572 if (auto *C = dyn_cast<Constant>(V))
1576 if (auto *I = dyn_cast<Instruction>(V))
1778 if (ConstantInt *ResCI = dyn_cast<ConstantInt>(Res))
1784 ConstantInt *CI = dyn_cast<ConstantInt>(C);
1904 if (auto *PHI = dyn_cast<PHINode>(V))
2029 if (auto *UseI = dyn_cast<Instruction>(U))
lib/Analysis/LegacyDivergenceAnalysis.cpp 270 if (Instruction *I = dyn_cast<Instruction>(V)) {
375 if (const Argument *Arg = dyn_cast<Argument>(FirstDivergentValue)) {
378 dyn_cast<Instruction>(FirstDivergentValue)) {
lib/Analysis/Lint.cpp 231 if (Function *F = dyn_cast<Function>(findValue(Callee,
319 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(&I))
338 dyn_cast<ConstantInt>(findValue(MCI->getLength(),
435 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(UnderlyingObject))
469 if (AllocaInst *AI = dyn_cast<AllocaInst>(Base)) {
476 } else if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Base)) {
529 if (ConstantInt *CI = dyn_cast<ConstantInt>(findValue(I.getOperand(1),
537 dyn_cast<ConstantInt>(findValue(I.getOperand(1), /*OffsetOk=*/false)))
544 dyn_cast<ConstantInt>(findValue(I.getOperand(1), /*OffsetOk=*/false)))
555 VectorType *VecTy = dyn_cast<VectorType>(V->getType());
557 KnownBits Known = computeKnownBits(V, DL, 0, AC, dyn_cast<Instruction>(V), DT);
562 Constant *C = dyn_cast<Constant>(V);
627 if (ConstantInt *CI = dyn_cast<ConstantInt>(findValue(I.getIndexOperand(),
634 if (ConstantInt *CI = dyn_cast<ConstantInt>(findValue(I.getOperand(2),
674 if (LoadInst *L = dyn_cast<LoadInst>(V)) {
689 } else if (PHINode *PN = dyn_cast<PHINode>(V)) {
693 } else if (CastInst *CI = dyn_cast<CastInst>(V)) {
696 } else if (ExtractValueInst *Ex = dyn_cast<ExtractValueInst>(V)) {
701 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
717 if (Instruction *Inst = dyn_cast<Instruction>(V)) {
720 } else if (auto *C = dyn_cast<Constant>(V)) {
lib/Analysis/Loads.cpp 64 if (const BitCastOperator *BC = dyn_cast<BitCastOperator>(V))
83 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
106 if (const GCRelocateInst *RelocateInst = dyn_cast<GCRelocateInst>(V))
110 if (const AddrSpaceCastInst *ASC = dyn_cast<AddrSpaceCastInst>(V))
114 if (const auto *Call = dyn_cast<CallBase>(V))
189 if (const Instruction *BI = dyn_cast<Instruction>(B))
218 auto *AddRec = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(Ptr));
221 auto* Step = dyn_cast<SCEVConstant>(AddRec->getStepRecurrence(SE));
236 auto *StartS = dyn_cast<SCEVUnknown>(AddRec->getStart());
413 if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
428 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
lib/Analysis/LoopAccessAnalysis.cpp 138 if (auto *CI = dyn_cast<CastInst>(V))
203 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Sc);
213 if (const auto *CStep = dyn_cast<SCEVConstant>(Step)) {
270 const SCEVConstant *C = dyn_cast<const SCEVConstant>(Diff);
628 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(PtrScev);
936 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr))
957 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr);
975 if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(NonConstIndex))
982 if (auto *OpAR = dyn_cast<SCEVAddRecExpr>(OpScev))
1006 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(PtrScev);
1056 const SCEVConstant *C = dyn_cast<SCEVConstant>(Step);
1129 const auto *Diff = dyn_cast<SCEVConstant>(SE.getMinusSCEV(Scev, Scev0));
1163 if (LoadInst *L = dyn_cast<LoadInst>(I))
1165 if (StoreInst *S = dyn_cast<StoreInst>(I))
1497 const SCEVConstant *C = dyn_cast<SCEVConstant>(Dist);
1817 if (auto *Call = dyn_cast<CallBase>(&I)) {
1840 auto *Call = dyn_cast<CallInst>(&I);
1850 auto *Ld = dyn_cast<LoadInst>(&I);
1874 auto *St = dyn_cast<StoreInst>(&I);
2124 if (Instruction *I = dyn_cast<Instruction>(V))
2162 Instruction *Inst = dyn_cast<Instruction>(Ptr);
2283 if (LoadInst *LI = dyn_cast<LoadInst>(MemAccess))
2285 else if (StoreInst *SI = dyn_cast<StoreInst>(MemAccess))
lib/Analysis/LoopCacheAnalysis.cpp 76 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(&AccessFn);
172 const SCEVConstant *Diff = dyn_cast<SCEVConstant>(
297 if (auto ConstantCost = dyn_cast<SCEVConstant>(RefCost))
320 BasePointer = dyn_cast<SCEVUnknown>(SE.getPointerBase(AccessFn));
402 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LastSubscript);
408 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(&Subscript);
lib/Analysis/LoopInfo.cpp 62 if (const Instruction *I = dyn_cast<Instruction>(V))
73 if (Instruction *I = dyn_cast<Instruction>(V))
157 dyn_cast<ConstantInt>(PN->getIncomingValueForBlock(Incoming)))
160 dyn_cast<Instruction>(PN->getIncomingValueForBlock(Backedge)))
162 if (ConstantInt *CI = dyn_cast<ConstantInt>(Inc->getOperand(1)))
174 return dyn_cast<ICmpInst>(BI->getCondition());
235 ICmpInst *LatchCmpInst = dyn_cast<ICmpInst>(BI->getCondition());
272 dyn_cast<SCEVAddRecExpr>(SE.getSCEV(&getStepInst())))
300 Instruction *LatchCmpOp0 = dyn_cast<Instruction>(CmpInst->getOperand(0));
301 Instruction *LatchCmpOp1 = dyn_cast<Instruction>(CmpInst->getOperand(1));
345 if (const Instruction *I = dyn_cast<Instruction>(U))
391 BranchInst *GuardBI = dyn_cast<BranchInst>(GuardBB->getTerminator());
433 if (const PHINode *P = dyn_cast<PHINode>(UI))
1027 if (MDNode *MD = dyn_cast<MDNode>(Op)) {
lib/Analysis/LoopPass.cpp 107 if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
lib/Analysis/LoopUnrollAnalyzer.cpp 32 if (auto *SC = dyn_cast<SCEVConstant>(S)) {
37 auto *AR = dyn_cast<SCEVAddRecExpr>(S);
43 if (auto *SC = dyn_cast<SCEVConstant>(ValueAtIteration)) {
49 auto *Base = dyn_cast<SCEVUnknown>(SE.getPointerBase(S));
53 dyn_cast<SCEVConstant>(SE.getMinusSCEV(ValueAtIteration, Base));
79 if (auto FI = dyn_cast<FPMathOperator>(&I))
102 auto *GV = dyn_cast<GlobalVariable>(AddressIt->second.Base);
109 dyn_cast<ConstantDataSequential>(GV->getInitializer());
145 Constant *COp = dyn_cast<Constant>(I.getOperand(0));
192 if (Constant *CLHS = dyn_cast<Constant>(LHS)) {
193 if (Constant *CRHS = dyn_cast<Constant>(RHS)) {
lib/Analysis/MemDepPrinter.cpp 107 } else if (auto *Call = dyn_cast<CallBase>(Inst)) {
lib/Analysis/MemDerefPrinter.cpp 54 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
lib/Analysis/MemoryBuiltins.cpp 323 return isMallocLikeFn(I, GetTLI) ? dyn_cast<CallInst>(I) : nullptr;
338 if (StructType *ST = dyn_cast<StructType>(T))
366 if (const BitCastInst *BCI = dyn_cast<BitCastInst>(*UI++)) {
474 return isLibFreeFunction(Callee, TLIFn) ? dyn_cast<CallInst>(I) : nullptr;
583 if (Instruction *I = dyn_cast<Instruction>(V)) {
589 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
593 if (Argument *A = dyn_cast<Argument>(V))
595 if (ConstantPointerNull *P = dyn_cast<ConstantPointerNull>(V))
597 if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V))
599 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
601 if (UndefValue *UV = dyn_cast<UndefValue>(V))
603 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
640 if (const ConstantInt *C = dyn_cast<ConstantInt>(ArraySize)) {
678 dyn_cast<ConstantInt>(CS.getArgument(FnData->FstParam));
689 ConstantInt *Arg = dyn_cast<ConstantInt>(CS.getArgument(FnData->FstParam));
701 Arg = dyn_cast<ConstantInt>(CS.getArgument(FnData->SndParam));
882 if (Instruction *I = dyn_cast<Instruction>(V))
893 } else if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
895 } else if (Instruction *I = dyn_cast<Instruction>(V)) {
lib/Analysis/MemoryDependenceAnalysis.cpp 118 if (const LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
131 if (const StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
144 if (const VAArgInst *V = dyn_cast<VAArgInst>(Inst)) {
155 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
211 if (auto *CallB = dyn_cast<CallBase>(Inst)) {
318 if (auto *LI = dyn_cast<LoadInst>(Inst))
320 if (auto *SI = dyn_cast<StoreInst>(Inst))
322 if (auto *AI = dyn_cast<AtomicCmpXchgInst>(Inst))
333 if (auto *LI = dyn_cast<LoadInst>(QueryInst)) {
395 auto *U = dyn_cast<Instruction>(Us.getUser());
410 if (auto *GEP = dyn_cast<GetElementPtrInst>(U))
483 LoadInst *LI = dyn_cast<LoadInst>(QueryInst);
502 if (auto *LI = dyn_cast<LoadInst>(I))
504 if (auto *SI = dyn_cast<StoreInst>(I))
519 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
530 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
549 if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
616 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
680 if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
750 if (auto *II = dyn_cast<IntrinsicInst>(QueryInst))
756 } else if (auto *QueryCall = dyn_cast<CallBase>(QueryInst)) {
944 if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
946 } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
1493 if (auto *I = dyn_cast<Instruction>(P.getPointer())) {
lib/Analysis/MemoryLocation.cpp 95 if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
116 if (ConstantInt *C = dyn_cast<ConstantInt>(MI->getLength()))
135 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Call)) {
146 if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2)))
203 dyn_cast<ConstantInt>(Call->getArgOperand(2)))
lib/Analysis/MemorySSA.cpp 138 if (auto *C = dyn_cast<CallBase>(Inst)) {
266 const auto *UseCall = dyn_cast<CallBase>(UseInst);
269 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(DefInst)) {
304 if (auto *DefLoad = dyn_cast<LoadInst>(DefInst))
305 if (auto *UseLoad = dyn_cast<LoadInst>(UseInst))
362 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
426 if (const auto *MD = dyn_cast<MemoryDef>(MA)) {
448 if (const auto *MD = dyn_cast<MemoryDef>(MA)) {
459 if (const auto *MU = dyn_cast<MemoryUse>(MA)) {
573 if (auto *MD = dyn_cast<MemoryDef>(Current)) {
942 if (auto *MU = dyn_cast<MemoryUse>(Start))
1043 if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
1079 if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
1120 if (MemoryUseOrDef *MUD = dyn_cast<MemoryUseOrDef>(&L)) {
1349 auto *MU = dyn_cast<MemoryUse>(&MA);
1660 if (auto *MD = dyn_cast<MemoryDef>(What))
1718 if (auto *SI = dyn_cast<StoreInst>(I)) {
1721 } else if (auto *LI = dyn_cast<LoadInst>(I)) {
1739 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
1811 if (auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
1818 if (const auto *MUD = dyn_cast<MemoryUseOrDef>(MA))
2154 if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Dominatee.getUser())) {
2377 auto *StartingAccess = dyn_cast<MemoryUseOrDef>(MA);
2453 if (auto *Use = dyn_cast<MemoryUseOrDef>(MA))
2460 if (auto *Use = dyn_cast<MemoryUseOrDef>(StartingAccess))
lib/Analysis/MemorySSAUpdater.cpp 197 if (MemoryPhi *UsePhi = dyn_cast<MemoryPhi>(&*U))
275 if (auto *MD = dyn_cast<MemoryDef>(FirstDef))
438 if (auto *MD = dyn_cast<MemoryDef>(FirstDef))
464 if (MemoryPhi *Phi = dyn_cast<MemoryPhi>(NewDef))
551 if (MemoryDef *DefMUD = dyn_cast<MemoryDef>(InsnDefining)) {
590 if (const MemoryUseOrDef *MUD = dyn_cast<MemoryUseOrDef>(&MA)) {
681 if (MemoryUseOrDef *IncMUD = dyn_cast<MemoryUseOrDef>(IncomingAccess)) {
1100 if (MemoryPhi *UsrPhi = dyn_cast<MemoryPhi>(Usr)) {
1130 if (MemoryPhi *PhiUser = dyn_cast<MemoryPhi>(U))
1140 if (auto *MD = dyn_cast<MemoryDef>(What))
1197 if (auto *Phi = dyn_cast<MemoryPhi>(&*Defs->begin()))
1279 if (MemoryPhi *MP = dyn_cast<MemoryPhi>(MA)) {
1311 if (auto *MUD = dyn_cast<MemoryUseOrDef>(U.getUser()))
1314 if (MemoryPhi *MP = dyn_cast<MemoryPhi>(U.getUser()))
lib/Analysis/ModuleDebugInfoPrinter.cpp 106 if (auto *BT = dyn_cast<DIBasicType>(T)) {
121 if (auto *CT = dyn_cast<DICompositeType>(T)) {
lib/Analysis/ModuleSummaryAnalysis.cpp 111 if (auto *GV = dyn_cast<GlobalValue>(Operand)) {
170 auto *TypeId = dyn_cast<MDString>(TypeMDVal->getMetadata());
180 auto *AssumeCI = dyn_cast<CallInst>(CIU.getUser());
201 auto *TypeId = dyn_cast<MDString>(TypeMDVal->getMetadata());
228 if (const auto *LI = dyn_cast<LoadInst>(I))
235 if (const auto *SI = dyn_cast<StoreInst>(I))
296 if (auto *GV = dyn_cast<GlobalValue>(Stored))
300 else if (auto *U = dyn_cast<User>(Stored))
310 const auto *CI = dyn_cast<CallInst>(&I);
324 CalledFunction = dyn_cast<Function>(CalledValue);
328 if (auto *GA = dyn_cast<GlobalAlias>(CalledValue)) {
330 CalledFunction = dyn_cast<Function>(GA->getBaseObject());
491 auto Fn = dyn_cast<Function>(I->stripPointerCasts());
502 if (auto *C = dyn_cast<ConstantStruct>(I)) {
503 StructType *STy = dyn_cast<StructType>(C->getType());
515 } else if (auto *C = dyn_cast<ConstantArray>(I)) {
562 if (auto *TypeId = dyn_cast<MDString>(TypeID))
697 if (Function *F = dyn_cast<Function>(GV)) {
804 if (auto *FuncSummary = dyn_cast<FunctionSummary>(Summary.get())) {
lib/Analysis/MustExecute.cpp 122 auto *BI = dyn_cast<BranchInst>(CondExitBlock->getTerminator());
127 if (auto *Cond = dyn_cast<ConstantInt>(BI->getCondition()))
129 auto *Cond = dyn_cast<CmpInst>(BI->getCondition());
135 auto *LHS = dyn_cast<PHINode>(Cond->getOperand(0));
lib/Analysis/ObjCARCInstKind.cpp 214 if (const Instruction *I = dyn_cast<Instruction>(V)) {
lib/Analysis/PHITransAddr.cpp 60 Instruction *I = dyn_cast<Instruction>(Expr);
117 Instruction *Inst = dyn_cast<Instruction>(Addr);
124 Instruction *I = dyn_cast<Instruction>(V);
138 if (Instruction *Op = dyn_cast<Instruction>(I->getOperand(i)))
147 Instruction *Inst = dyn_cast<Instruction>(V);
168 if (PHINode *PN = dyn_cast<PHINode>(Inst))
179 if (Instruction *Op = dyn_cast<Instruction>(Inst->getOperand(i)))
187 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) {
197 if (Constant *C = dyn_cast<Constant>(PHIIn))
204 if (CastInst *CastI = dyn_cast<CastInst>(U))
214 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
240 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U))
264 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS))
266 if (ConstantInt *CI = dyn_cast<ConstantInt>(BOp->getOperand(1))) {
292 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U))
375 auto *Inst = dyn_cast<Instruction>(InVal);
380 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) {
396 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
lib/Analysis/PhiValues.cpp 60 if (PHINode *PhiPhiOp = dyn_cast<PHINode>(PhiOp)) {
89 if (PHINode *PhiOp = dyn_cast<PHINode>(Op)) {
132 if (const PHINode *PN = dyn_cast<PHINode>(V))
168 if (Instruction *I = dyn_cast<Instruction>(V))
lib/Analysis/ScalarEvolution.cpp 384 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this))
390 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this))
396 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this))
402 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(this);
406 const SCEVConstant *SC = dyn_cast<SCEVConstant>(Mul->getOperand(0));
488 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
490 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
494 if (ConstantInt *CI = dyn_cast<ConstantInt>(CE->getOperand(1)))
505 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
507 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
512 if (StructType *STy = dyn_cast<StructType>(Ty))
516 if (ConstantInt *CI = dyn_cast<ConstantInt>(CE->getOperand(2)))
530 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
532 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
593 if (const auto *LA = dyn_cast<Argument>(LV)) {
599 if (const auto *LGV = dyn_cast<GlobalValue>(LV)) {
616 if (const auto *LInst = dyn_cast<Instruction>(LV)) {
914 if (const SCEVMulExpr *T = dyn_cast<SCEVMulExpr>(Denominator)) {
952 if (const SCEVConstant *D = dyn_cast<SCEVConstant>(Denominator)) {
1270 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op))
1275 if (const SCEVTruncateExpr *ST = dyn_cast<SCEVTruncateExpr>(Op))
1279 if (const SCEVSignExtendExpr *SS = dyn_cast<SCEVSignExtendExpr>(Op))
1283 if (const SCEVZeroExtendExpr *SZ = dyn_cast<SCEVZeroExtendExpr>(Op))
1325 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Op)) {
1447 const SCEVAddExpr *SA = dyn_cast<SCEVAddExpr>(Start);
1469 const SCEVAddRecExpr *PreAR = dyn_cast<SCEVAddRecExpr>(
1567 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(Start);
1646 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op))
1651 if (const SCEVZeroExtendExpr *SZ = dyn_cast<SCEVZeroExtendExpr>(Op))
1671 if (const SCEVTruncateExpr *ST = dyn_cast<SCEVTruncateExpr>(Op)) {
1687 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op))
1826 if (const auto *SC = dyn_cast<SCEVConstant>(Start)) {
1858 if (auto *Div = dyn_cast<SCEVUDivExpr>(Op))
1862 if (auto *SA = dyn_cast<SCEVAddExpr>(Op)) {
1881 if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) {
1895 if (auto *SM = dyn_cast<SCEVMulExpr>(Op)) {
1919 if (auto *MulLHS = dyn_cast<SCEVConstant>(SM->getOperand(0)))
1921 if (auto *TruncRHS = dyn_cast<SCEVTruncateExpr>(SM->getOperand(1))) {
1952 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op))
1957 if (const SCEVSignExtendExpr *SS = dyn_cast<SCEVSignExtendExpr>(Op))
1961 if (const SCEVZeroExtendExpr *SZ = dyn_cast<SCEVZeroExtendExpr>(Op))
1982 if (const SCEVTruncateExpr *ST = dyn_cast<SCEVTruncateExpr>(Op)) {
1994 if (auto *SA = dyn_cast<SCEVAddExpr>(Op)) {
2014 if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) {
2031 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op))
2158 if (const auto *SC = dyn_cast<SCEVConstant>(Start)) {
2206 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op))
2211 if (const SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(Op)) {
2229 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) {
2278 while (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[i])) {
2289 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[i]);
2427 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) {
2430 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) {
2484 if (auto *T = dyn_cast<SCEVTruncateExpr>(Ops[Idx]))
2486 if (const auto *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) {
2488 if (const auto *T = dyn_cast<SCEVTruncateExpr>(LastOp))
2499 if (const SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(Ops[i])) {
2505 } else if (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[i])) {
2507 } else if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(Ops[i])) {
2511 dyn_cast<SCEVTruncateExpr>(M->getOperand(j))) {
2517 } else if (const auto *C = dyn_cast<SCEVConstant>(M->getOperand(j))) {
2547 while (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[Idx])) {
2932 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) {
2936 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[1]))
2951 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) {
2972 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[1])) {
2983 } else if (const auto *AddRec = dyn_cast<SCEVAddRecExpr>(Ops[1])) {
3007 while (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(Ops[Idx])) {
3093 dyn_cast<SCEVAddRecExpr>(Ops[OtherIdx]);
3140 AddRec = dyn_cast<SCEVAddRecExpr>(NewAddRec);
3165 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) {
3193 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) {
3212 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS))
3214 dyn_cast<SCEVConstant>(AR->getStepRecurrence(*this))) {
3231 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(AR->getStart());
3245 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(LHS)) {
3264 if (const SCEVUDivExpr *OtherDiv = dyn_cast<SCEVUDivExpr>(LHS)) {
3266 dyn_cast<SCEVConstant>(OtherDiv->getRHS())) {
3278 if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(LHS)) {
3297 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) {
3343 const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(LHS);
3347 if (const SCEVConstant *RHSCst = dyn_cast<SCEVConstant>(RHS)) {
3350 if (const auto *LHSCst = dyn_cast<SCEVConstant>(Mul->getOperand(0))) {
3371 Mul = dyn_cast<SCEVMulExpr>(LHS);
3397 if (const SCEVAddRecExpr *StepChrec = dyn_cast<SCEVAddRecExpr>(Step))
3437 if (const SCEVAddRecExpr *NestedAR = dyn_cast<SCEVAddRecExpr>(Operands[0])) {
3506 if (StructType *STy = dyn_cast<StructType>(CurTy)) {
3573 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) {
3588 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) {
3804 auto *SU = dyn_cast<SCEVUnknown>(S);
3825 const auto *Add = dyn_cast<SCEVAddExpr>(S);
3832 auto *ConstOp = dyn_cast<SCEVConstant>(Add->getOperand(0));
3883 if (auto *I = dyn_cast<Instruction>(V)) {
3885 if (auto *NS = dyn_cast<SCEVNAryExpr>(S)) {
3948 if (const SCEVConstant *VC = dyn_cast<SCEVConstant>(V))
3960 const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Expr);
3965 const SCEVMulExpr *AddRHS = dyn_cast<SCEVMulExpr>(Add->getOperand(1));
3975 if (const SCEVConstant *VC = dyn_cast<SCEVConstant>(V))
3980 if (const SCEVMinMaxExpr *MME = dyn_cast<SCEVMinMaxExpr>(V)) {
4163 if (const SCEVCastExpr *Cast = dyn_cast<SCEVCastExpr>(V)) {
4165 } else if (const SCEVNAryExpr *NAry = dyn_cast<SCEVNAryExpr>(V)) {
4329 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator());
4484 if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(Op)) {
4499 auto *Op = dyn_cast<Operator>(V);
4520 if (auto *RHSC = dyn_cast<ConstantInt>(Op->getOperand(1)))
4529 if (ConstantInt *SA = dyn_cast<ConstantInt>(Op->getOperand(1))) {
4550 auto *WO = dyn_cast<WithOverflowInst>(EVI->getAggregateOperand());
4605 const SCEVSignExtendExpr *SExt = dyn_cast<SCEVSignExtendExpr>(Op);
4606 const SCEVZeroExtendExpr *ZExt = dyn_cast<SCEVZeroExtendExpr>(Op);
4610 SExt ? dyn_cast<SCEVTruncateExpr>(SExt->getOperand())
4611 : dyn_cast<SCEVTruncateExpr>(ZExt->getOperand());
4722 const auto *Add = dyn_cast<SCEVAddExpr>(BEValue);
4816 if (const auto *AR = dyn_cast<SCEVAddRecExpr>(PHISCEV)) {
4996 if (auto *BEInst = dyn_cast<Instruction>(BEValueV))
5052 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(BEValue)) {
5086 } else if (GEPOperator *GEP = dyn_cast<GEPOperator>(BEValueV)) {
5118 if (auto *BEInst = dyn_cast<Instruction>(BEValueV))
5294 auto *BI = dyn_cast<BranchInst>(IDom->getTerminator());
5332 if (auto *CI = dyn_cast<ConstantInt>(Cond))
5336 auto *ICI = dyn_cast<ICmpInst>(Cond);
5439 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S))
5442 if (const SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(S))
5446 if (const SCEVZeroExtendExpr *E = dyn_cast<SCEVZeroExtendExpr>(S)) {
5453 if (const SCEVSignExtendExpr *E = dyn_cast<SCEVSignExtendExpr>(S)) {
5460 if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(S)) {
5468 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(S)) {
5479 if (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(S)) {
5487 if (const SCEVSMaxExpr *M = dyn_cast<SCEVSMaxExpr>(S)) {
5495 if (const SCEVUMaxExpr *M = dyn_cast<SCEVUMaxExpr>(S)) {
5503 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
5526 if (Instruction *I = dyn_cast<Instruction>(V))
5551 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S))
5571 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
5579 if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(S)) {
5587 if (const SCEVSMaxExpr *SMax = dyn_cast<SCEVSMaxExpr>(S)) {
5595 if (const SCEVUMaxExpr *UMax = dyn_cast<SCEVUMaxExpr>(S)) {
5603 if (const SCEVSMinExpr *SMin = dyn_cast<SCEVSMinExpr>(S)) {
5611 if (const SCEVUMinExpr *UMin = dyn_cast<SCEVUMinExpr>(S)) {
5619 if (const SCEVUDivExpr *UDiv = dyn_cast<SCEVUDivExpr>(S)) {
5626 if (const SCEVZeroExtendExpr *ZExt = dyn_cast<SCEVZeroExtendExpr>(S)) {
5633 if (const SCEVSignExtendExpr *SExt = dyn_cast<SCEVSignExtendExpr>(S)) {
5640 if (const SCEVTruncateExpr *Trunc = dyn_cast<SCEVTruncateExpr>(S)) {
5647 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
5651 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(AddRec->getStart()))
5699 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
5729 if (const PHINode *Phi = dyn_cast<PHINode>(U->getValue())) {
5872 if (auto *SA = dyn_cast<SCEVAddExpr>(S)) {
5883 if (auto *SCast = dyn_cast<SCEVCastExpr>(S)) {
5890 auto *SU = dyn_cast<SCEVUnknown>(S);
6018 if (auto *AddRec = dyn_cast<SCEVAddRecExpr>(Op)) {
6087 } else if (auto *BI = dyn_cast<BranchInst>(PoisonUser)) {
6107 if (auto *SI = dyn_cast<StoreInst>(I))
6138 if (Instruction *I = dyn_cast<Instruction>(V)) {
6145 } else if (ConstantInt *CI = dyn_cast<ConstantInt>(V))
6149 else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V))
6249 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->RHS)) {
6273 if (auto *LHSMul = dyn_cast<SCEVMulExpr>(LHS)) {
6274 if (auto *OpC = dyn_cast<SCEVConstant>(LHSMul->getOperand(0))) {
6305 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->RHS)) {
6314 if (const SCEVAddRecExpr *NewAR = dyn_cast<SCEVAddRecExpr>(S)) {
6325 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->RHS)) {
6334 if (auto *LBO = dyn_cast<BinaryOperator>(BO->LHS))
6335 if (ConstantInt *LCI = dyn_cast<ConstantInt>(LBO->getOperand(1)))
6339 dyn_cast<SCEVZeroExtendExpr>(getSCEV(BO->LHS))) {
6365 if (ConstantInt *SA = dyn_cast<ConstantInt>(BO->RHS)) {
6393 ConstantInt *CI = dyn_cast<ConstantInt>(BO->RHS);
6412 Operator *L = dyn_cast<Operator>(BO->LHS);
6425 ConstantInt *ShlAmtCI = dyn_cast<ConstantInt>(L->getOperand(1));
6540 dyn_cast<SCEVConstant>(getExitCount(L, ExitingBlock));
6546 dyn_cast<SCEVConstant>(getConstantMaxBackedgeTakenCount(L));
6583 const SCEVConstant *TC = dyn_cast<SCEVConstant>(TCExpr);
6725 if (PHINode *PN = dyn_cast<PHINode>(I))
6748 if (auto *I = dyn_cast<Instruction>(U)) {
6839 if (PHINode *PN = dyn_cast<PHINode>(I))
6860 Instruction *I = dyn_cast<Instruction>(V);
6878 if (PHINode *PN = dyn_cast<PHINode>(I))
7141 if (BranchInst *BI = dyn_cast<BranchInst>(Term)) {
7152 if (SwitchInst *SI = dyn_cast<SwitchInst>(Term)) {
7227 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(ExitCond)) {
7327 if (ICmpInst *ExitCondICmp = dyn_cast<ICmpInst>(ExitCond)) {
7342 if (ConstantInt *CI = dyn_cast<ConstantInt>(ExitCond)) {
7370 if (LoadInst *LI = dyn_cast<LoadInst>(ExitCond->getOperand(0)))
7371 if (Constant *RHS = dyn_cast<Constant>(ExitCond->getOperand(1))) {
7398 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS))
7399 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(LHS))
7500 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0));
7505 GlobalVariable *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0));
7516 if (ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(i))) {
7536 const SCEVAddRecExpr *IdxExpr = dyn_cast<SCEVAddRecExpr>(Idx);
7568 ConstantInt *RHS = dyn_cast<ConstantInt>(RHSV);
7631 PNOut = dyn_cast<PHINode>(LHS);
7717 if (const CallInst *CI = dyn_cast<CallInst>(I))
7755 Instruction *OpInst = dyn_cast<Instruction>(Op);
7758 PHINode *P = dyn_cast<PHINode>(OpInst);
7786 Instruction *I = dyn_cast<Instruction>(V);
7789 if (PHINode *PN = dyn_cast<PHINode>(I))
7806 if (Constant *C = dyn_cast<Constant>(V)) return C;
7807 Instruction *I = dyn_cast<Instruction>(V);
7824 Instruction *Operand = dyn_cast<Instruction>(I->getOperand(i));
7826 Operands[i] = dyn_cast<Constant>(I->getOperand(i));
7836 if (CmpInst *CI = dyn_cast<CmpInst>(I))
7839 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
7856 auto *CurrentVal = dyn_cast<Constant>(PN->getIncomingValue(i));
7931 PHINode *PHI = dyn_cast<PHINode>(I.first);
8006 PHINode *PHI = dyn_cast<PHINode>(I.first);
8056 return dyn_cast<Constant>(cast<SCEVUnknown>(V)->getValue());
8078 if (PointerType *PTy = dyn_cast<PointerType>(C->getType())) {
8102 if (PointerType *PTy = dyn_cast<PointerType>(C->getType())) {
8150 if (const SCEVUnknown *SU = dyn_cast<SCEVUnknown>(V)) {
8151 if (Instruction *I = dyn_cast<Instruction>(SU->getValue())) {
8152 if (PHINode *PN = dyn_cast<PHINode>(I)) {
8190 if (auto *BTCC = dyn_cast<SCEVConstant>(BackedgeTakenCount)) {
8219 if (Constant *C = dyn_cast<Constant>(Op)) {
8248 if (const CmpInst *CI = dyn_cast<CmpInst>(I))
8251 else if (const LoadInst *LI = dyn_cast<LoadInst>(I)) {
8266 if (const SCEVCommutativeExpr *Comm = dyn_cast<SCEVCommutativeExpr>(V)) {
8295 if (const SCEVUDivExpr *Div = dyn_cast<SCEVUDivExpr>(V)) {
8305 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(V)) {
8325 AddRec = dyn_cast<SCEVAddRecExpr>(FoldedRec);
8349 if (const SCEVZeroExtendExpr *Cast = dyn_cast<SCEVZeroExtendExpr>(V)) {
8356 if (const SCEVSignExtendExpr *Cast = dyn_cast<SCEVSignExtendExpr>(V)) {
8363 if (const SCEVTruncateExpr *Cast = dyn_cast<SCEVTruncateExpr>(V)) {
8378 if (const SCEVZeroExtendExpr *ZExt = dyn_cast<SCEVZeroExtendExpr>(S))
8380 if (const SCEVSignExtendExpr *SExt = dyn_cast<SCEVSignExtendExpr>(S))
8444 const SCEVConstant *LC = dyn_cast<SCEVConstant>(AddRec->getOperand(0));
8445 const SCEVConstant *MC = dyn_cast<SCEVConstant>(AddRec->getOperand(1));
8446 const SCEVConstant *NC = dyn_cast<SCEVConstant>(AddRec->getOperand(2));
8712 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) {
8719 dyn_cast<SCEVAddRecExpr>(stripInjectiveFunctions(V));
8768 const SCEVConstant *StepC = dyn_cast<SCEVConstant>(Step);
8838 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) {
8883 if (const SCEVUnknown *AU = dyn_cast<SCEVUnknown>(A))
8884 if (const SCEVUnknown *BU = dyn_cast<SCEVUnknown>(B))
8885 if (const Instruction *AI = dyn_cast<Instruction>(AU->getValue()))
8886 if (const Instruction *BI = dyn_cast<Instruction>(BU->getValue()))
8910 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) {
8912 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) {
8929 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(RHS)) {
8940 if (const SCEVConstant *RC = dyn_cast<SCEVConstant>(RHS)) {
8971 if (const SCEVAddExpr *AE = dyn_cast<SCEVAddExpr>(LHS))
8973 dyn_cast<SCEVMulExpr>(AE->getOperand(0)))
9285 const SCEVAddRecExpr *ArLHS = dyn_cast<SCEVAddRecExpr>(LHS);
9472 dyn_cast<BranchInst>(Latch->getTerminator());
9535 BranchInst *ContinuePredicate = dyn_cast<BranchInst>(PBB->getTerminator());
9647 dyn_cast<BranchInst>(Pair.first->getTerminator());
9683 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(FoundCondValue)) {
9695 ICmpInst *ICI = dyn_cast<ICmpInst>(FoundCondValue);
9858 const auto *AE = dyn_cast<SCEVAddExpr>(Expr);
9910 if ((C1 = dyn_cast<SCEVConstant>(LLess)))
9916 if ((C2 = dyn_cast<SCEVConstant>(LMore)))
9933 const auto *AddRecLHS = dyn_cast<SCEVAddRecExpr>(LHS);
9937 const auto *AddRecFoundLHS = dyn_cast<SCEVAddRecExpr>(FoundLHS);
10024 if (const SCEVUnknown *LU = dyn_cast<SCEVUnknown>(LHS))
10025 if (auto *Phi = dyn_cast<PHINode>(LU->getValue())) {
10030 if (const SCEVUnknown *RU = dyn_cast<SCEVUnknown>(RHS))
10031 if (auto *Phi = dyn_cast<PHINode>(RU->getValue())) {
10059 const SCEVAddRecExpr *RAR = dyn_cast<SCEVAddRecExpr>(RHS);
10136 const MinMaxExprType *MinMaxExpr = dyn_cast<MinMaxExprType>(MaybeMinMaxExpr);
10153 const SCEVAddRecExpr *LAR = dyn_cast<SCEVAddRecExpr>(LHS);
10156 const SCEVAddRecExpr *RAR = dyn_cast<SCEVAddRecExpr>(RHS);
10233 if (auto *Ext = dyn_cast<SCEVSignExtendExpr>(S))
10253 if (auto *LHSAddExpr = dyn_cast<SCEVAddExpr>(LHS)) {
10279 } else if (auto *LHSUnknownExpr = dyn_cast<SCEVUnknown>(LHS)) {
10367 const SCEVSignExtendExpr *SExt = dyn_cast<SCEVSignExtendExpr>(LHS);
10368 const SCEVZeroExtendExpr *ZExt = dyn_cast<SCEVZeroExtendExpr>(RHS);
10378 const SCEVZeroExtendExpr *ZExt = dyn_cast<SCEVZeroExtendExpr>(LHS);
10379 const SCEVSignExtendExpr *SExt = dyn_cast<SCEVSignExtendExpr>(RHS);
10587 const SCEVAddRecExpr *IV = dyn_cast<SCEVAddRecExpr>(LHS);
10731 const SCEVAddRecExpr *IV = dyn_cast<SCEVAddRecExpr>(LHS);
10802 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(getStart()))
10808 if (const auto *ShiftedAddRec = dyn_cast<SCEVAddRecExpr>(Shifted))
10895 if (const auto *SU = dyn_cast<SCEVUnknown>(S))
10912 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S))
10986 if (auto *Mul = dyn_cast<SCEVMulExpr>(S)) {
10990 const SCEVUnknown *Unknown = dyn_cast<SCEVUnknown>(Op);
11061 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(Step)) {
11109 if (const SCEVMulExpr *Expr = dyn_cast<SCEVMulExpr>(S))
11121 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(T)) {
11136 if (StoreInst *Store = dyn_cast<StoreInst>(Inst))
11138 else if (LoadInst *Load = dyn_cast<LoadInst>(Inst))
11217 if (auto *AR = dyn_cast<SCEVAddRecExpr>(Expr))
11358 if (PHINode *PN = dyn_cast<PHINode>(getValPtr()))
11381 if (PHINode *PN = dyn_cast<PHINode>(U))
11387 if (PHINode *PN = dyn_cast<PHINode>(Old))
11733 if (auto *I = dyn_cast<Instruction>(cast<SCEVUnknown>(S)->getValue()))
11821 dyn_cast<Instruction>(cast<SCEVUnknown>(S)->getValue())) {
11899 if (auto *AR = dyn_cast<SCEVAddRecExpr>(S))
12123 if (const auto *IPred = dyn_cast<SCEVEqualPredicate>(Pred))
12132 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Operand);
12148 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Operand);
12198 if (auto *WP = dyn_cast<const SCEVWrapPredicate>(P)) {
12226 auto *AddRec = dyn_cast<SCEVAddRecExpr>(S);
12252 const auto *Op = dyn_cast<SCEVEqualPredicate>(N);
12276 const auto *Op = dyn_cast<SCEVWrapPredicate>(N);
12313 if (const auto *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE)))
12339 if (const auto *Set = dyn_cast<SCEVUnionPredicate>(N))
12360 if (const auto *Set = dyn_cast<SCEVUnionPredicate>(N)) {
12515 const auto *Add = dyn_cast<SCEVAddExpr>(Expr);
12520 const auto *Mul = dyn_cast<SCEVMulExpr>(Add->getOperand(0));
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp 100 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
104 } else if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(S)) {
109 } else if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
lib/Analysis/ScalarEvolutionExpander.cpp 56 if (CastInst *CI = dyn_cast<CastInst>(U))
89 if (auto *II = dyn_cast<InvokeInst>(I))
122 if (CastInst *CI = dyn_cast<CastInst>(V)) {
130 if (CastInst *CI = dyn_cast<CastInst>(V))
136 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
145 if (Constant *C = dyn_cast<Constant>(V))
150 if (Argument *A = dyn_cast<Argument>(V)) {
173 if (Constant *CLHS = dyn_cast<Constant>(LHS))
174 if (Constant *CRHS = dyn_cast<Constant>(RHS))
257 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S)) {
262 if (const SCEVConstant *FC = dyn_cast<SCEVConstant>(Factor)) {
280 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(S)) {
284 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(M->getOperand(0)))
294 if (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(S)) {
332 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum))
351 while (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(Ops[i])) {
359 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Start)) {
464 while (StructType *STy = dyn_cast<StructType>(ElTy)) {
472 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[0]))
497 if (ArrayType *ATy = dyn_cast<ArrayType>(ElTy))
518 if (Constant *CLHS = dyn_cast<Constant>(V))
519 if (Constant *CRHS = dyn_cast<Constant>(Idx))
627 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
628 if (const Instruction *I = dyn_cast<Instruction>(U->getValue()))
633 if (const SCEVNAryExpr *N = dyn_cast<SCEVNAryExpr>(S)) {
635 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S))
641 if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(S)) {
645 if (const SCEVUDivExpr *D = dyn_cast<SCEVUDivExpr>(S)) {
714 } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
722 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(X))
728 } else if (PointerType *PTy = dyn_cast<PointerType>(Op->getType())) {
859 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(S->getRHS())) {
877 while (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(Base)) {
885 if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(Base)) {
907 if (Instruction *OInst = dyn_cast<Instruction>(OI))
912 IncV = dyn_cast<Instruction>(IncV->getOperand(0));
946 Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1));
948 return dyn_cast<Instruction>(IncV->getOperand(0));
952 return dyn_cast<Instruction>(IncV->getOperand(0));
977 return dyn_cast<Instruction>(IncV->getOperand(0));
1107 Phi = dyn_cast<SCEVAddRecExpr>(SE.getTruncateOrNoop(Phi, RequestedTy));
1185 const SCEVAddRecExpr *PhiSCEV = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(&PN));
1198 dyn_cast<Instruction>(PN.getIncomingValueForBlock(LatchBlock));
1467 if (PointerType *PTy = dyn_cast<PointerType>(ExpandTy)) {
1539 if (PointerType *PTy = dyn_cast<PointerType>(Base->getType())) {
1822 if (const auto *D = dyn_cast<SCEVUDivExpr>(S)) {
1823 if (const auto *SC = dyn_cast<SCEVConstant>(D->getRHS()))
1882 if (PointerType *Vty = dyn_cast<PointerType>(V->getType())) {
1976 auto *Const = dyn_cast<SCEVConstant>(SE.getSCEV(PN));
2018 Instruction *OrigInc = dyn_cast<Instruction>(
2021 dyn_cast<Instruction>(Phi->getIncomingValueForBlock(LatchBlock));
2054 if (PHINode *PN = dyn_cast<PHINode>(OrigInc))
2159 if (auto *UDivExpr = dyn_cast<SCEVUDivExpr>(S)) {
2164 if (auto *SC = dyn_cast<SCEVConstant>(UDivExpr->getRHS()))
2201 if (const SCEVNAryExpr *NAry = dyn_cast<SCEVNAryExpr>(S)) {
2295 if (PointerType *ARPtrTy = dyn_cast<PointerType>(ARExpandTy)) {
2403 if (const SCEVUDivExpr *D = dyn_cast<SCEVUDivExpr>(S)) {
2404 const SCEVConstant *SC = dyn_cast<SCEVConstant>(D->getRHS());
2410 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
2445 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S))
lib/Analysis/StackSafetyAnalysis.cpp 134 auto C = dyn_cast<ConstantInt>(AI->getArraySize());
264 if (auto MTI = dyn_cast<MemTransferInst>(MI)) {
271 const auto *Len = dyn_cast<ConstantInt>(MI->getLength());
328 if (const MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) {
337 dyn_cast<GlobalValue>(CS.getCalledValue()->stripPointerCasts());
374 if (auto AI = dyn_cast<AllocaInst>(&I)) {
lib/Analysis/TargetTransformInfo.cpp 74 if (const SCEVConstant *ConstEC = dyn_cast<SCEVConstant>(EC)) {
115 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
540 if (auto *CI = dyn_cast<ConstantInt>(V)) {
549 if (auto *ShuffleInst = dyn_cast<ShuffleVectorInst>(V))
561 if (auto *CI = dyn_cast<ConstantInt>(Splat))
564 } else if (auto *CDS = dyn_cast<ConstantDataSequential>(V)) {
567 if (auto *CI = dyn_cast<ConstantInt>(CDS->getElementAsConstant(I)))
898 if (auto *SI = dyn_cast<SelectInst>(I)) {
935 ShuffleVectorInst *LS = dyn_cast<ShuffleVectorInst>(RD->LHS);
938 ShuffleVectorInst *RS = dyn_cast<ShuffleVectorInst>(RD->RHS);
1006 ConstantInt *CI = dyn_cast<ConstantInt>(ReduxRoot->getOperand(1));
1013 auto *RdxStart = dyn_cast<Instruction>(ReduxRoot->getOperand(0));
1057 if ((S = dyn_cast<ShuffleVectorInst>(L)))
1060 S = dyn_cast<ShuffleVectorInst>(R);
1071 ConstantInt *CI = dyn_cast<ConstantInt>(ReduxRoot->getOperand(1));
1078 auto *RdxStart = dyn_cast<Instruction>(ReduxRoot->getOperand(0));
1134 RdxOp = dyn_cast<Instruction>(NextRdxOp);
1231 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1));
1278 ConstantInt *CI = dyn_cast<ConstantInt>(IE->getOperand(2));
1321 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
1325 if (auto *FPMO = dyn_cast<FPMathOperator>(II))
lib/Analysis/TypeBasedAliasAnalysis.cpp 466 if(auto *Id = dyn_cast<MDString>(AccessType.getId()))
lib/Analysis/TypeMetadataUtils.cpp 40 } else if (auto CI = dyn_cast<CallInst>(User)) {
42 } else if (auto II = dyn_cast<InvokeInst>(User)) {
60 } else if (auto GEP = dyn_cast<GetElementPtrInst>(User)) {
83 if (auto *AssumeCI = dyn_cast<CallInst>(CIU.getUser())) {
105 auto *Offset = dyn_cast<ConstantInt>(CI->getArgOperand(1));
113 if (auto EVI = dyn_cast<ExtractValueInst>(CIU)) {
140 if (auto *C = dyn_cast<ConstantStruct>(I)) {
149 if (auto *C = dyn_cast<ConstantArray>(I)) {
lib/Analysis/ValueLatticeUtils.cpp 32 if (auto *Store = dyn_cast<StoreInst>(U)) {
35 } else if (auto *Load = dyn_cast<LoadInst>(U)) {
lib/Analysis/ValueTracking.cpp 157 CxtI = dyn_cast<Instruction>(V);
215 if (const ICmpInst *IC = dyn_cast<ICmpInst>(U))
217 if (Constant *C = dyn_cast<Constant>(IC->getOperand(1)))
257 if (auto *CI = dyn_cast<ConstantInt>(V))
489 if (const User *U = dyn_cast<User>(V))
502 if (const CallInst *CI = dyn_cast<CallInst>(I))
624 ICmpInst *Cmp = dyn_cast<ICmpInst>(Arg);
898 if (auto *SA = dyn_cast<ConstantInt>(I->getOperand(1))) {
1234 if (ConstantInt *Rem = dyn_cast<ConstantInt>(I->getOperand(1))) {
1268 if (ConstantInt *Rem = dyn_cast<ConstantInt>(I->getOperand(1))) {
1356 Operator *LU = dyn_cast<Operator>(L);
1388 auto *OverflowOp = dyn_cast<OverflowingBinaryOperator>(LU);
1470 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
1582 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I->getOperand(0))) {
1665 if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(V)) {
1677 if (const auto *CV = dyn_cast<ConstantVector>(V)) {
1713 if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
1719 if (const Operator *I = dyn_cast<Operator>(V))
1773 if (const ZExtInst *ZI = dyn_cast<ZExtInst>(V))
1776 if (const SelectInst *SI = dyn_cast<SelectInst>(V))
1844 if (const Instruction *I = dyn_cast<Instruction>(GEP))
1881 if (ConstantInt *OpC = dyn_cast<ConstantInt>(GTI.getOperand())) {
1949 if (auto *BO = dyn_cast<BinaryOperator>(Curr))
1957 if (const BranchInst *BI = dyn_cast<BranchInst>(Curr)) {
2001 if (auto *C = dyn_cast<Constant>(V)) {
2008 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
2019 if (auto *VecTy = dyn_cast<VectorType>(C->getType())) {
2033 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2041 if (auto *I = dyn_cast<Instruction>(V)) {
2045 if (auto *Ty = dyn_cast<IntegerType>(V->getType())) {
2064 if (const Argument *A = dyn_cast<Argument>(V))
2069 if (const LoadInst *LI = dyn_cast<LoadInst>(V))
2073 if (const auto *Call = dyn_cast<CallBase>(V)) {
2094 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V))
2098 if (auto *BCO = dyn_cast<BitCastOperator>(V))
2101 if (auto *I2P = dyn_cast<IntToPtrInst>(V))
2109 if (auto *P2I = dyn_cast<PtrToIntInst>(V))
2153 if (ConstantInt *Shift = dyn_cast<ConstantInt>(Y)) {
2210 else if (const SelectInst *SI = dyn_cast<SelectInst>(V)) {
2216 else if (const PHINode *PN = dyn_cast<PHINode>(V)) {
2224 if (ConstantInt *C = dyn_cast<ConstantInt>(Start)) {
2250 const BinaryOperator *BO = dyn_cast<BinaryOperator>(V1);
2339 const auto *CV = dyn_cast<Constant>(V);
2395 if (auto *U = dyn_cast<Operator>(V)) {
2514 if (const auto *CRHS = dyn_cast<Constant>(U->getOperand(1)))
2539 if (const auto *CLHS = dyn_cast<Constant>(U->getOperand(0)))
2675 ConstantInt *CI = dyn_cast<ConstantInt>(V);
2685 ConstantExpr *CO = dyn_cast<ConstantExpr>(V);
2700 Operator *I = dyn_cast<Operator>(V);
2718 ConstantInt *Op1CI = dyn_cast<ConstantInt>(Op1);
2730 if (Constant *Op1C = dyn_cast<Constant>(Op1))
2731 if (Constant *MulC = dyn_cast<Constant>(Mul0)) {
2744 if (ConstantInt *Mul0CI = dyn_cast<ConstantInt>(Mul0))
2754 if (Constant *Op0C = dyn_cast<Constant>(Op0))
2755 if (Constant *MulC = dyn_cast<Constant>(Mul1)) {
2768 if (ConstantInt *Mul1CI = dyn_cast<ConstantInt>(Mul1))
2897 if (auto *CFP = dyn_cast<ConstantFP>(V))
2904 auto *Op = dyn_cast<Operator>(V);
2909 if (auto *FPO = dyn_cast<FPMathOperator>(Op))
2921 if (auto *Call = dyn_cast<CallInst>(Op)) {
2951 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(V)) {
2957 if (auto *CV = dyn_cast<Constant>(V)) {
2977 const Operator *I = dyn_cast<Operator>(V);
3055 if (ConstantInt *Exponent = dyn_cast<ConstantInt>(I->getOperand(1))) {
3103 if (auto *FPMathOp = dyn_cast<FPMathOperator>(V))
3108 if (auto *CFP = dyn_cast<ConstantFP>(V))
3114 if (auto *Inst = dyn_cast<Instruction>(V)) {
3139 if (const auto *II = dyn_cast<IntrinsicInst>(V)) {
3178 auto *CElt = dyn_cast<ConstantFP>(Elt);
3203 Constant *C = dyn_cast<Constant>(V);
3220 if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
3234 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
3243 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
3266 if (ConstantDataSequential *CA = dyn_cast<ConstantDataSequential>(C)) {
3296 StructType *STy = dyn_cast<StructType>(IndexedType);
3381 if (Constant *C = dyn_cast<Constant>(V)) {
3387 if (InsertValueInst *I = dyn_cast<InsertValueInst>(V)) {
3427 if (ExtractValueInst *I = dyn_cast<ExtractValueInst>(V)) {
3461 ArrayType *AT = dyn_cast<ArrayType>(GEP->getSourceElementType());
3467 const ConstantInt *FirstIdx = dyn_cast<ConstantInt>(GEP->getOperand(1));
3484 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
3494 if (const ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(2)))
3505 const GlobalVariable *GV = dyn_cast<GlobalVariable>(V);
3513 if ( (ArrayTy = dyn_cast<ArrayType>(GVTy)) ) {
3530 Array = dyn_cast<ConstantDataArray>(GV->getInitializer());
3599 if (const PHINode *PN = dyn_cast<PHINode>(V)) {
3621 if (const SelectInst *SI = dyn_cast<SelectInst>(V)) {
3697 auto *PrevValue = dyn_cast<Instruction>(PN->getIncomingValue(0));
3699 PrevValue = dyn_cast<Instruction>(PN->getIncomingValue(1));
3708 if (auto *Load = dyn_cast<LoadInst>(PrevValue))
3719 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
3724 } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
3732 if (auto *Call = dyn_cast<CallBase>(V)) {
3749 if (Instruction *I = dyn_cast<Instruction>(V))
3777 if (auto *SI = dyn_cast<SelectInst>(P)) {
3783 if (auto *PN = dyn_cast<PHINode>(P)) {
3809 if (const Operator *U = dyn_cast<Operator>(V)) {
3873 const IntrinsicInst *II = dyn_cast<IntrinsicInst>(U);
3897 const Operator *Inst = dyn_cast<Operator>(V);
3902 if (Constant *C = dyn_cast<Constant>(Inst->getOperand(i)))
4181 if (const auto *EVI = dyn_cast<ExtractValueInst>(U)) {
4190 if (const auto *B = dyn_cast<BranchInst>(U)) {
4250 if (const auto *CRI = dyn_cast<CleanupReturnInst>(I))
4252 if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I))
4446 if (auto *C = dyn_cast<ConstantFP>(V))
4449 if (auto *C = dyn_cast<ConstantDataVector>(V)) {
4463 if (auto *C = dyn_cast<ConstantFP>(V))
4466 if (auto *C = dyn_cast<ConstantDataVector>(V)) {
4960 auto *Cast1 = dyn_cast<CastInst>(V1);
4966 if (auto *Cast2 = dyn_cast<CastInst>(V2)) {
4973 auto *C = dyn_cast<Constant>(V2);
5057 SelectInst *SI = dyn_cast<SelectInst>(V);
5060 CmpInst *CmpI = dyn_cast<CmpInst>(SI->getCondition());
5370 const ICmpInst *LHSCmp = dyn_cast<ICmpInst>(LHS);
5371 const ICmpInst *RHSCmp = dyn_cast<ICmpInst>(RHS);
5377 const BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHS);
5698 if (auto *BO = dyn_cast<BinaryOperator>(V))
5700 else if (auto *II = dyn_cast<IntrinsicInst>(V))
5702 else if (auto *SI = dyn_cast<SelectInst>(V))
5707 if (auto *I = dyn_cast<Instruction>(V))
5724 ConstantInt *OpC = dyn_cast<ConstantInt>(GEP->getOperand(i));
5755 const GEPOperator *GEP1 = dyn_cast<GEPOperator>(Ptr1);
5756 const GEPOperator *GEP2 = dyn_cast<GEPOperator>(Ptr2);
5783 GEP_T = dyn_cast<GEPOperator>(Op0);
lib/Analysis/VectorUtils.cpp 153 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
172 CastInst *CI = dyn_cast<CastInst>(U);
186 auto *PtrTy = dyn_cast<PointerType>(Ptr->getType());
203 while (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(V))
206 const SCEVAddRecExpr *S = dyn_cast<SCEVAddRecExpr>(V);
217 if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(V)) {
236 if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(V)) {
242 const SCEVUnknown *U = dyn_cast<SCEVUnknown>(V);
268 if (Constant *C = dyn_cast<Constant>(V))
271 if (InsertElementInst *III = dyn_cast<InsertElementInst>(V)) {
287 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V)) {
315 if (auto *C = dyn_cast<Constant>(V))
339 if (auto *C = dyn_cast<Constant>(V))
704 VectorType *VecTy1 = dyn_cast<VectorType>(V1->getType());
705 VectorType *VecTy2 = dyn_cast<VectorType>(V2->getType());
753 auto *ConstMask = dyn_cast<Constant>(Mask);
770 auto *ConstMask = dyn_cast<Constant>(Mask);
791 if (auto *CV = dyn_cast<ConstantVector>(Mask))
818 auto *LI = dyn_cast<LoadInst>(&I);
819 auto *SI = dyn_cast<StoreInst>(&I);
1012 const SCEVConstant *DistToB = dyn_cast<SCEVConstant>(
lib/AsmParser/LLParser.cpp 133 if (Function *Fn = dyn_cast<Function>(V)) {
150 } else if (CallInst *CI = dyn_cast<CallInst>(V)) {
158 } else if (InvokeInst *II = dyn_cast<InvokeInst>(V)) {
166 } else if (CallBrInst *CBI = dyn_cast<CallBrInst>(V)) {
174 } else if (auto *GV = dyn_cast<GlobalVariable>(V)) {
920 auto *PTy = dyn_cast<PointerType>(AliaseeType);
1366 if (auto *FT = dyn_cast<FunctionType>(PTy->getElementType()))
1403 PointerType *PTy = dyn_cast<PointerType>(Ty);
1434 PointerType *PTy = dyn_cast<PointerType>(Ty);
3665 if (V && !(C = dyn_cast<Constant>(V)))
5225 if (StructType *ST = dyn_cast<StructType>(Ty)) {
5930 if (BasicBlock *BB = dyn_cast<BasicBlock>(Op0)) {
6068 FunctionType *Ty = dyn_cast<FunctionType>(RetType);
6395 FunctionType *Ty = dyn_cast<FunctionType>(RetType);
6740 Constant *CV = dyn_cast<Constant>(V);
6797 FunctionType *Ty = dyn_cast<FunctionType>(RetType);
7196 PointerType *BasePointerType = dyn_cast<PointerType>(BaseType->getScalarType());
7431 auto *F = dyn_cast<Function>(GV);
lib/Bitcode/Reader/BitcodeReader.cpp 2023 auto *GO = dyn_cast<GlobalObject>(V);
2198 if (auto *F = dyn_cast<Function>(V))
2436 if (StructType *STy = dyn_cast<StructType>(CurTy)) {
2441 } else if (ArrayType *ATy = dyn_cast<ArrayType>(CurTy)) {
2446 } else if (VectorType *VTy = dyn_cast<VectorType>(CurTy)) {
2632 if (VectorType *VTy = dyn_cast<VectorType>(CurTy))
2667 VectorType *OpTy = dyn_cast<VectorType>(CurTy);
2687 VectorType *OpTy = dyn_cast<VectorType>(CurTy);
2699 VectorType *RTy = dyn_cast<VectorType>(CurTy);
3342 auto *PTy = dyn_cast<PointerType>(Ty);
4106 dyn_cast<VectorType>(Cond->getType())) {
4480 dyn_cast<FunctionType>(getFullyStructuredTypeByID(Record[OpNum++]));
4490 PointerType *CalleeTy = dyn_cast<PointerType>(Callee->getType());
4495 dyn_cast<FunctionType>(cast<PointerType>(FullTy)->getElementType());
4567 dyn_cast<FunctionType>(getFullyStructuredTypeByID(Record[OpNum++]));
4577 PointerType *OpTy = dyn_cast<PointerType>(Callee->getType());
4582 dyn_cast<FunctionType>(cast<PointerType>(FullTy)->getElementType());
5008 dyn_cast<FunctionType>(getFullyStructuredTypeByID(Record[OpNum++]));
5018 PointerType *OpTy = dyn_cast<PointerType>(Callee->getType());
5023 dyn_cast<FunctionType>(cast<PointerType>(FullTy)->getElementType());
5167 if (Argument *A = dyn_cast<Argument>(ValueList.back())) {
5222 Function *F = dyn_cast<Function>(GV);
5255 if (CallInst *CI = dyn_cast<CallInst>(U))
5320 if (CallInst *CI = dyn_cast<CallInst>(U))
lib/Bitcode/Reader/MetadataLoader.cpp 203 if (auto *MDN = dyn_cast<MDNode>(MD))
405 if (auto *MDN = dyn_cast<MDNode>(MD))
518 if (auto *DGV = dyn_cast<DIGlobalVariable>(MD)) {
535 if (auto *DDI = dyn_cast<DbgDeclareInst>(&I))
838 if (auto *GO = dyn_cast<GlobalObject>(ValueList[ValueID]))
1576 if (auto *F = dyn_cast<Function>(CMD->getValue())) {
1739 if (auto *GV = dyn_cast<GlobalVariable>(CMD->getValue())) {
1742 } else if (auto *CI = dyn_cast<ConstantInt>(CMD->getValue())) {
1905 if (auto *GO = dyn_cast<GlobalObject>(ValueList[ValueID]))
lib/Bitcode/Reader/ValueList.cpp 88 if (Constant *PHC = dyn_cast<Constant>(&*OldV)) {
205 if (ConstantArray *UserCA = dyn_cast<ConstantArray>(UserC)) {
207 } else if (ConstantStruct *UserCS = dyn_cast<ConstantStruct>(UserC)) {
lib/Bitcode/Writer/BitcodeWriter.cpp 195 if (auto FS = dyn_cast<FunctionSummary>(Summary.get()))
449 if (auto *AS = dyn_cast<AliasSummary>(Summary.getSecond()))
1392 if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) {
1397 } else if (const auto *PEO = dyn_cast<PossiblyExactOperator>(V)) {
1400 } else if (const auto *FPMO = dyn_cast<FPMathOperator>(V)) {
2017 if (const MDNode *N = dyn_cast<MDNode>(MD)) {
2320 if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) {
2345 } else if (const ConstantInt *IV = dyn_cast<ConstantInt>(C)) {
2363 } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
2411 dyn_cast<ConstantDataSequential>(C)) {
2427 } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2516 } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
4003 if (auto *AS = dyn_cast<AliasSummary>(S)) {
4010 if (auto *VS = dyn_cast<GlobalVarSummary>(S)) {
4130 if (auto *FS = dyn_cast<FunctionSummary>(&AS->getAliasee()))
lib/Bitcode/Writer/ValueEnumerator.cpp 91 if (const Constant *C = dyn_cast<Constant>(V))
253 if (const Constant *C = dyn_cast<Constant>(V))
404 auto *MD = dyn_cast<MetadataAsValue>(&Op);
417 if (const auto *Call = dyn_cast<CallBase>(&I))
458 if (auto *MD = dyn_cast<MetadataAsValue>(V))
595 if (auto *N = dyn_cast<MDNode>(MD.first))
675 if (auto *N = dyn_cast<MDNode>(MD))
683 if (auto *C = dyn_cast<ConstantAsMetadata>(MD))
716 auto *N = dyn_cast<MDNode>(MD);
816 if (auto *GO = dyn_cast<GlobalObject>(V))
823 if (const Constant *C = dyn_cast<Constant>(V)) {
864 if (StructType *STy = dyn_cast<StructType>(Ty))
897 const Constant *C = dyn_cast<Constant>(V);
984 if (auto *MD = dyn_cast<MetadataAsValue>(&OI))
985 if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata()))
lib/CodeGen/Analysis.cpp 44 if (StructType *STy = dyn_cast<StructType>(Ty)) {
57 else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
89 if (StructType *STy = dyn_cast<StructType>(Ty)) {
100 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
132 if (StructType *STy = dyn_cast<StructType>(&Ty)) {
140 if (ArrayType *ATy = dyn_cast<ArrayType>(&Ty)) {
160 GlobalValue *GV = dyn_cast<GlobalValue>(V);
161 GlobalVariable *Var = dyn_cast<GlobalVariable>(V);
167 GV = dyn_cast<GlobalValue>(Init);
281 const Instruction *I = dyn_cast<Instruction>(V);
319 } else if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(V)) {
334 } else if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(V)) {
399 if (ArrayType *AT = dyn_cast<ArrayType>(T))
516 const ReturnInst *Ret = dyn_cast<ReturnInst>(Term);
lib/CodeGen/AsmPrinter/ARMException.cpp 65 Per = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
lib/CodeGen/AsmPrinter/AsmPrinter.cpp 164 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
831 if (auto *SP = dyn_cast<DISubprogram>(V->getScope())) {
920 if (auto *SP = dyn_cast<DISubprogram>(
1232 NumUses += getNumGlobalVariableUses(dyn_cast<Constant>(CU));
1255 NumGOTEquivUsers += getNumGlobalVariableUses(dyn_cast<Constant>(U));
1317 if (auto *CE = dyn_cast<ConstantExpr>(GIS.getIndirectSymbol()))
1339 if (auto *GA = dyn_cast<GlobalAlias>(&GIS)) {
1503 Cur = dyn_cast<GlobalAlias>(Cur->getAliasee())) {
1966 dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
1993 const ConstantArray *InitList = dyn_cast<ConstantArray>(List);
1995 StructType *ETy = dyn_cast<StructType>(InitList->getType()->getElementType());
2005 ConstantStruct *CS = dyn_cast<ConstantStruct>(O);
2009 ConstantInt *Priority = dyn_cast<ConstantInt>(CS->getOperand(0));
2017 dyn_cast<GlobalValue>(CS->getOperand(2)->stripPointerCasts());
2171 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV))
2174 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV))
2177 if (const BlockAddress *BA = dyn_cast<BlockAddress>(CV))
2180 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
2341 if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
2352 if (const ConstantArray *CA = dyn_cast<ConstantArray>(V)) {
2368 if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(V))
2657 const GlobalValue *FinalGV = dyn_cast<GlobalValue>(GV->getOperand(0));
2677 BaseCV = dyn_cast<Constant>(CV->user_back());
2682 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
2699 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV))
2707 if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(CV))
2710 if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV))
2713 if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV))
2716 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
2732 if (const ConstantVector *V = dyn_cast<ConstantVector>(CV))
2798 if (const MCSectionCOFF *S = dyn_cast<MCSectionCOFF>(
3129 auto Associated = dyn_cast<MCSymbolELF>(CurrentFnSym);
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp 311 ClosestSubprogram = dyn_cast<DISubprogram>(Scope);
926 GVSym ? dyn_cast<MCSectionCOFF>(&GVSym->getSection()) : nullptr;
1456 const DIDerivedType *DT = dyn_cast<DIDerivedType>(T);
2156 const DICompositeType *DCTy = dyn_cast<DICompositeType>(Ty);
2175 if (auto *SP = dyn_cast<DISubprogram>(Element)) {
2177 } else if (auto *DDTy = dyn_cast<DIDerivedType>(Element)) {
2191 } else if (auto *Composite = dyn_cast<DICompositeType>(Element)) {
2761 const DILexicalBlock *DILB = dyn_cast<DILexicalBlock>(Scope.getScopeNode());
2863 dyn_cast<DIType>(MD)));
3060 if (DIType *RT = dyn_cast<DIType>(Ty)) {
lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp 145 const DIDerivedType *DDTy = dyn_cast<DIDerivedType>(Ty);
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp 103 Per = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
146 auto *P = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp 126 auto *CB = GVContext ? dyn_cast<DICommonBlock>(GVContext) : nullptr;
702 auto *Array = dyn_cast<DICompositeType>(Var->getType());
706 if (auto *Subrange = dyn_cast<DISubrange>(El)) {
1007 if (auto *NS = dyn_cast<DINamespace>(Entity))
1009 else if (auto *M = dyn_cast<DIModule>(Entity))
1011 else if (auto *SP = dyn_cast<DISubprogram>(Entity))
1013 else if (auto *T = dyn_cast<DIType>(Entity))
1015 else if (auto *GV = dyn_cast<DIGlobalVariable>(Entity))
1052 Label = dyn_cast<const DbgLabel>(Entity);
1054 if (const DbgVariable *Var = dyn_cast<const DbgVariable>(Entity))
1056 else if ((Label = dyn_cast<const DbgLabel>(Entity)))
lib/CodeGen/AsmPrinter/DwarfDebug.cpp 734 CalleeDecl = dyn_cast<Function>(CalleeOp.getGlobal());
1019 if (DIType *RT = dyn_cast<DIType>(Ty))
1578 const DIBasicType *BT = dyn_cast<DIBasicType>(
1621 if (auto *DV = dyn_cast<DILocalVariable>(DN)) {
1623 } else if (auto *DL = dyn_cast<DILabel>(DN)) {
1749 if (auto *LBF = dyn_cast<DILexicalBlockFile>(Scope))
1862 if (auto *DV = dyn_cast<DILocalVariable>(DN))
1864 else if (auto *DL = dyn_cast<DILabel>(DN))
2716 if (auto *M = dyn_cast<DIMacro>(MN))
2718 else if (auto *F = dyn_cast<DIMacroFile>(MN))
lib/CodeGen/AsmPrinter/DwarfUnit.cpp 463 if (auto *CTy = dyn_cast<DICompositeType>(Ty)) {
474 if (auto *DTy = dyn_cast<DIDerivedType>(Ty)) {
604 if (auto *TTP = dyn_cast<DITemplateTypeParameter>(Element))
606 else if (auto *TVP = dyn_cast<DITemplateValueParameter>(Element))
622 if (auto *T = dyn_cast<DIType>(Context))
624 if (auto *NS = dyn_cast<DINamespace>(Context))
626 if (auto *SP = dyn_cast<DISubprogram>(Context))
628 if (auto *M = dyn_cast<DIModule>(Context))
656 if (auto *BT = dyn_cast<DIBasicType>(Ty))
658 else if (auto *STy = dyn_cast<DISubroutineType>(Ty))
660 else if (auto *CTy = dyn_cast<DICompositeType>(Ty)) {
711 if (auto *CT = dyn_cast<DICompositeType>(Ty)) {
910 if (auto *SP = dyn_cast<DISubprogram>(Element))
912 else if (auto *DDTy = dyn_cast<DIDerivedType>(Element)) {
933 } else if (auto *Property = dyn_cast<DIObjCProperty>(Element)) {
949 } else if (auto *Composite = dyn_cast<DICompositeType>(Element)) {
lib/CodeGen/AsmPrinter/EHStreamer.cpp 179 const Function *F = dyn_cast<Function>(MO.getGlobal());
lib/CodeGen/AsmPrinter/WinException.cpp 76 PerFn = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
225 PerFn = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
lib/CodeGen/AtomicExpandPass.cpp 219 auto LI = dyn_cast<LoadInst>(I);
220 auto SI = dyn_cast<StoreInst>(I);
221 auto RMWI = dyn_cast<AtomicRMWInst>(I);
222 auto CASI = dyn_cast<AtomicCmpXchgInst>(I);
1283 ExtractValueInst *EV = dyn_cast<ExtractValueInst>(User);
1317 auto C = dyn_cast<ConstantInt>(RMWI->getValOperand());
lib/CodeGen/CFGuardLongjmp.cpp 86 auto *F = dyn_cast<Function>(MO.getGlobal());
lib/CodeGen/CodeGenPrepare.cpp 582 BranchInst *Term = dyn_cast<BranchInst>(SinglePred->getTerminator());
597 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
679 if (auto *CBI = dyn_cast<CallBrInst>((*PI)->getTerminator()))
768 if (const PHINode *UPN = dyn_cast<PHINode>(UI))
770 Instruction *Insn = dyn_cast<Instruction>(UPN->getIncomingValue(I));
804 if (const PHINode *V2PN = dyn_cast<PHINode>(V2))
849 PHINode *InValPhi = dyn_cast<PHINode>(InVal);
918 auto Op = dyn_cast<ConstantInt>(GEP->getOperand(i));
966 auto Derived = dyn_cast<GetElementPtrInst>(ToReplace->getDerivedPtr());
1048 if (GCRelocateInst *Relocate = dyn_cast<GCRelocateInst>(U))
1087 if (PHINode *PN = dyn_cast<PHINode>(User)) {
1144 if (auto *ASC = dyn_cast<AddrSpaceCastInst>(CI)) {
1457 auto *CmpC = dyn_cast<ConstantInt>(User->getOperand(1));
1813 if ((AI = dyn_cast<AllocaInst>(Val)) && AI->getAlignment() < PrefAlign &&
1821 if ((GV = dyn_cast<GlobalVariable>(Val)) && GV->canIncreaseAlignment() &&
1829 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(CI)) {
1833 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) {
1853 IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
1877 ZExtInst *ExtVal = dyn_cast<ZExtInst>(CI->getArgOperand(0));
1976 ReturnInst *RetI = dyn_cast<ReturnInst>(BB->getTerminator());
1984 BCI = dyn_cast<BitCastInst>(V);
1988 PN = dyn_cast<PHINode>(V);
2019 CallInst *CI = dyn_cast<CallInst>(IncomingVal);
2040 CallInst *CI = dyn_cast<CallInst>(&*RI);
2051 BranchInst *BI = dyn_cast<BranchInst>(TailCallBB->getTerminator());
2426 if (Instruction *IVal = dyn_cast<Instruction>(Val))
2452 if (Instruction *IVal = dyn_cast<Instruction>(Val))
2478 if (Instruction *IVal = dyn_cast<Instruction>(Val))
3008 if (auto *PI = dyn_cast<Instruction>(P))
3014 if (auto *PHI = dyn_cast<PHINode>(PI))
3016 if (auto *Select = dyn_cast<SelectInst>(PI))
3032 To = dyn_cast<PHINode>(OldReplacement);
3304 PHINode *FirstPhi = dyn_cast<PHINode>(FirstValue);
3305 PHINode *SecondPhi = dyn_cast<PHINode>(SecondValue);
3388 if (SelectInst *Select = dyn_cast<SelectInst>(V)) {
3433 if (SelectInst *CurrentSelect = dyn_cast<SelectInst>(Current)) {
3570 Instruction *PromotedInst = dyn_cast<Instruction>(Val);
3738 const BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Inst);
3751 const ConstantInt *Cst = dyn_cast<ConstantInt>(Inst->getOperand(1));
3773 const auto *AndInst = dyn_cast<const Instruction>(*ExtInst->user_begin());
3775 const auto *Cst = dyn_cast<ConstantInt>(AndInst->getOperand(1));
3799 Instruction *Opnd = dyn_cast<Instruction>(OpndVal);
3825 Instruction *ExtOpnd = dyn_cast<Instruction>(Ext->getOperand(0));
3884 Instruction *ExtInst = dyn_cast<Instruction>(ExtVal);
3917 if (Instruction *ITrunc = dyn_cast<Instruction>(Trunc)) {
3956 if (const ConstantInt *Cst = dyn_cast<ConstantInt>(Opnd)) {
4117 ConstantInt *RHS = dyn_cast<ConstantInt>(AddrInst->getOperand(1));
4142 if (ConstantInt *CI = dyn_cast<ConstantInt>(AddrInst->getOperand(i))) {
4181 auto *BaseI = dyn_cast<Instruction>(Base);
4244 Instruction *Ext = dyn_cast<Instruction>(AddrInst);
4311 if (ConstantInt *CI = dyn_cast<ConstantInt>(Addr)) {
4317 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(Addr)) {
4325 } else if (Instruction *I = dyn_cast<Instruction>(Addr)) {
4351 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Addr)) {
4442 if (LoadInst *LI = dyn_cast<LoadInst>(UserI)) {
4447 if (StoreInst *SI = dyn_cast<StoreInst>(UserI)) {
4455 if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(UserI)) {
4463 if (AtomicCmpXchgInst *CmpX = dyn_cast<AtomicCmpXchgInst>(UserI)) {
4471 if (CallInst *CI = dyn_cast<CallInst>(UserI)) {
4477 InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledValue());
4510 if (AllocaInst *AI = dyn_cast<AllocaInst>(Val))
4595 PointerType *AddrTy = dyn_cast<PointerType>(Address->getType());
4634 if (Instruction *I = dyn_cast<Instruction>(V))
4695 if (PHINode *P = dyn_cast<PHINode>(V)) {
4702 if (SelectInst *SI = dyn_cast<SelectInst>(V)) {
5341 if (auto *BaseI = dyn_cast<Instruction>(OldBase)) {
5347 else if (InvokeInst *Invoke = dyn_cast<InvokeInst>(BaseI)) {
5732 if (auto *Phi = dyn_cast<PHINode>(I)) {
5740 auto *AndC = dyn_cast<ConstantInt>(I->getOperand(1));
5754 auto *ShlC = dyn_cast<ConstantInt>(I->getOperand(1));
5830 auto *I = dyn_cast<Instruction>(V);
5861 CmpInst *Cmp = dyn_cast<CmpInst>(SI->getCondition());
5888 DefSI = dyn_cast<SelectInst>(V)) {
5943 SelectInst *I = dyn_cast<SelectInst>(&*It);
6250 if (auto *Arg = dyn_cast<Argument>(Cond))
6418 if (ConstantInt *CstVal = dyn_cast<ConstantInt>(ValExtractIdx))
6715 auto *LBC = dyn_cast<BitCastInst>(LValue);
6716 auto *HBC = dyn_cast<BitCastInst>(HValue);
6848 if (auto *I = dyn_cast<Instruction>(Usr)) {
6928 if (PHINode *P = dyn_cast<PHINode>(I)) {
6942 if (CastInst *CI = dyn_cast<CastInst>(I)) {
6971 if (auto *Cmp = dyn_cast<CmpInst>(I))
6975 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
6986 if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
6998 if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(I)) {
7004 if (AtomicCmpXchgInst *CmpX = dyn_cast<AtomicCmpXchgInst>(I)) {
7010 BinaryOperator *BinOp = dyn_cast<BinaryOperator>(I);
7019 ConstantInt *CI = dyn_cast<ConstantInt>(BinOp->getOperand(1));
7025 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
7122 DbgValueInst *DVI = dyn_cast<DbgValueInst>(Insn);
7240 if (auto *I = dyn_cast<Instruction>(Cond2)) {
lib/CodeGen/DwarfEHPrepare.cpp 105 InsertValueInst *SelIVI = dyn_cast<InsertValueInst>(V);
112 ExcIVI = dyn_cast<InsertValueInst>(SelIVI->getOperand(0));
116 SelLoad = dyn_cast<LoadInst>(SelIVI->getOperand(1));
187 if (auto *RI = dyn_cast<ResumeInst>(BB.getTerminator()))
lib/CodeGen/ExpandMemCmp.cpp 350 if (auto *Source1C = dyn_cast<Constant>(Source1))
356 if (auto *Source2C = dyn_cast<Constant>(Source2))
731 ConstantInt *SizeCast = dyn_cast<ConstantInt>(CI->getArgOperand(2));
826 CallInst *CI = dyn_cast<CallInst>(&I);
lib/CodeGen/ExpandReductions.cpp 82 if (auto II = dyn_cast<IntrinsicInst>(&*I))
lib/CodeGen/GCRootLowering.cpp 134 if (CallInst *CI = dyn_cast<CallInst>(I))
154 dyn_cast<AllocaInst>(SI->getOperand(1)->stripPointerCasts()))
lib/CodeGen/GlobalISel/IRTranslator.cpp 246 if (const StoreInst *SI = dyn_cast<StoreInst>(&I)) {
249 } else if (const LoadInst *LI = dyn_cast<LoadInst>(&I)) {
252 } else if (const AtomicCmpXchgInst *AI = dyn_cast<AtomicCmpXchgInst>(&I)) {
259 } else if (const AtomicRMWInst *AI = dyn_cast<AtomicRMWInst>(&I)) {
338 auto *CI = dyn_cast<CmpInst>(&U);
852 if (auto Arg = dyn_cast<Argument>(V))
854 if (auto AI = dyn_cast<AllocaInst>(V))
951 if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(&U)) {
954 } else if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(&U)) {
1010 if (const CmpInst *Cmp = dyn_cast<CmpInst>(SI.getCondition()))
1075 if (const auto *CI = dyn_cast<ConstantInt>(Idx)) {
1136 if (auto *MCI = dyn_cast<MemCpyInst>(&CI)) {
1139 } else if (auto *MMI = dyn_cast<MemMoveInst>(&CI)) {
1306 const AllocaInst *AI = dyn_cast<AllocaInst>(V);
1330 auto AI = dyn_cast<AllocaInst>(Address);
1382 } else if (const auto *CI = dyn_cast<Constant>(V)) {
1678 const Function *Fn = dyn_cast<Function>(Callee);
1900 if (auto *CI = dyn_cast<ConstantInt>(U.getOperand(1))) {
2110 if (auto CI = dyn_cast<ConstantInt>(&C))
2112 else if (auto CF = dyn_cast<ConstantFP>(&C))
2124 } else if (auto GV = dyn_cast<GlobalValue>(&C))
2126 else if (auto CAZ = dyn_cast<ConstantAggregateZero>(&C)) {
2138 } else if (auto CV = dyn_cast<ConstantDataVector>(&C)) {
2148 } else if (auto CE = dyn_cast<ConstantExpr>(&C)) {
2157 } else if (auto CV = dyn_cast<ConstantVector>(&C)) {
2165 } else if (auto *BA = dyn_cast<BlockAddress>(&C)) {
2208 const auto *CI = dyn_cast<CallInst>(&I);
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp 147 if (auto *CI = dyn_cast<ConstantInt>(&C)) {
152 } else if (auto *CFP = dyn_cast<ConstantFP>(&C)) {
lib/CodeGen/GlobalMerge.cpp 311 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U.getUser())) {
326 Instruction *I = dyn_cast<Instruction>(UI->getUser());
573 dyn_cast<GlobalVariable>(InitList->getOperand(i)->stripPointerCasts()))
590 dyn_cast<GlobalVariable>(U->stripPointerCasts()))
623 PointerType *PT = dyn_cast<PointerType>(GV.getType());
lib/CodeGen/HardwareLoops.cpp 302 if (auto *Const = dyn_cast<ConstantInt>(ICmp->getOperand(OpIdx)))
lib/CodeGen/IndirectBrExpandPass.cpp 94 if (auto *IBr = dyn_cast<IndirectBrInst>(BB.getTerminator())) {
lib/CodeGen/InterleavedAccessPass.cpp 293 auto *Extract = dyn_cast<ExtractElementInst>(*UI);
298 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(*UI);
422 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(SI->getValueOperand());
461 if (LoadInst *LI = dyn_cast<LoadInst>(&I))
464 if (StoreInst *SI = dyn_cast<StoreInst>(&I))
lib/CodeGen/InterleavedLoadCombinePass.cpp 187 IntegerType *Ty = dyn_cast<IntegerType>(V->getType());
712 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V);
715 LoadInst *LI = dyn_cast<LoadInst>(V);
718 BitCastInst *BCI = dyn_cast<BitCastInst>(V);
732 Instruction *Op = dyn_cast<Instruction>(BCI->getOperand(0));
737 VectorType *VTy = dyn_cast<VectorType>(Op->getType());
787 VectorType *ArgTy = dyn_cast<VectorType>(SVI->getOperand(0)->getType());
907 ConstantInt *C = dyn_cast<ConstantInt>(RHS);
909 C = dyn_cast<ConstantInt>(LHS);
943 if (auto *BO = dyn_cast<BinaryOperator>(&V))
959 PointerType *PtrTy = dyn_cast<PointerType>(Ptr.getType());
999 ConstantInt *IDX = dyn_cast<ConstantInt>(GEP.getOperand(idxOperand));
1171 if (Is.find(dyn_cast<Instruction>(U)) == Is.end())
1266 if (auto SVI = dyn_cast<ShuffleVectorInst>(&I)) {
lib/CodeGen/IntrinsicLowering.cpp 495 IntegerType *Ty = dyn_cast<IntegerType>(CI->getType());
lib/CodeGen/LexicalScopes.cpp 169 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope))
197 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope))
220 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope))
lib/CodeGen/LiveDebugVariables.cpp 507 if (const auto *V = dyn_cast<const DILocalVariable>(Node)) {
510 } else if (const auto *L = dyn_cast<const DILabel>(Node)) {
lib/CodeGen/LowLevelType.cpp 21 if (auto VTy = dyn_cast<VectorType>(&Ty)) {
27 } else if (auto PTy = dyn_cast<PointerType>(&Ty)) {
lib/CodeGen/LowerEmuTLS.cpp 100 const ConstantInt *InitIntValue = dyn_cast<ConstantInt>(InitValue);
lib/CodeGen/MIRParser/MIParser.cpp 2184 auto *F = dyn_cast<Function>(GV);
lib/CodeGen/MIRParser/MIRParser.cpp 768 Result = dyn_cast<T>(Node);
lib/CodeGen/MachineFunction.cpp 658 if (const auto *LPI = dyn_cast<LandingPadInst>(FirstI)) {
660 dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts()))
673 dyn_cast<GlobalValue>(Val->stripPointerCasts()));
686 } else if (const auto *CPI = dyn_cast<CatchPadInst>(FirstI)) {
689 addCatchTypeInfo(LandingPad, dyn_cast<GlobalValue>(TypeInfo));
lib/CodeGen/MachineInstr.cpp 530 dyn_cast<OverflowingBinaryOperator>(&I)) {
538 if (const PossiblyExactOperator *PE = dyn_cast<PossiblyExactOperator>(&I))
543 if (const FPMathOperator *FP = dyn_cast<FPMathOperator>(&I)) {
1597 auto *DIV = dyn_cast<DILocalVariable>(MO.getMetadata());
1608 auto *DIL = dyn_cast<DILabel>(MO.getMetadata());
lib/CodeGen/MachineLICM.cpp 387 dyn_cast<FixedStackPseudoSourceValue>(MemOp->getPseudoValue())) {
lib/CodeGen/MachineRegisterInfo.cpp 561 const Function *Func = dyn_cast<Function>(MO.getGlobal());
lib/CodeGen/MachineVerifier.cpp 1412 auto *MaskVT = dyn_cast<VectorType>(Mask->getType());
1844 dyn_cast<FixedStackPseudoSourceValue>(PSV);
lib/CodeGen/PreISelIntrinsicLowering.cpp 38 auto CI = dyn_cast<CallInst>(I->getUser());
69 if (Function *Fn = dyn_cast<Function>(FCache.getCallee())) {
lib/CodeGen/RegUsageInfoPropagate.cpp 92 return dyn_cast<const Function>(MO.getGlobal());
lib/CodeGen/SafeStack.cpp 222 auto C = dyn_cast<ConstantInt>(AI->getArraySize());
262 if (auto MTI = dyn_cast<MemTransferInst>(MI)) {
270 const auto *Len = dyn_cast<ConstantInt>(MI->getLength());
329 if (const MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) {
384 if (auto AI = dyn_cast<AllocaInst>(&I)) {
398 } else if (auto RI = dyn_cast<ReturnInst>(&I)) {
400 } else if (auto CI = dyn_cast<CallInst>(&I)) {
404 } else if (auto LP = dyn_cast<LandingPadInst>(&I)) {
407 } else if (auto II = dyn_cast<IntrinsicInst>(&I)) {
602 if (auto *PHI = dyn_cast<PHINode>(User))
612 if (auto *PHI = dyn_cast<PHINode>(User))
687 auto II = dyn_cast<IntrinsicInst>(I);
lib/CodeGen/SafeStackColoring.cpp 58 auto *Op = dyn_cast<Instruction>(I->getOperand(1));
78 if (auto *BI = dyn_cast<BitCastInst>(U)) {
82 auto *UI = dyn_cast<Instruction>(U);
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp 80 Constant *C = dyn_cast<Constant>(Mask);
838 if (CallInst *CI = dyn_cast<CallInst>(&*CurInstIterator++))
849 IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
lib/CodeGen/SelectionDAG/DAGCombiner.cpp 912 auto LoadStore = dyn_cast<MemSDNode>(Node);
1856 if (auto *MemNode = dyn_cast<MemSDNode>(CurNode))
8810 if (ConstantSDNode *SCCC = dyn_cast<ConstantSDNode>(SCC.getNode())) {
10862 LoadSDNode *LD1 = dyn_cast<LoadSDNode>(getBuildPairElt(N, 0));
10863 LoadSDNode *LD2 = dyn_cast<LoadSDNode>(getBuildPairElt(N, 1));
13457 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(Use)) {
13462 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(Use)) {
13508 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
13516 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
13739 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
13747 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
13936 StoreSDNode *ST = dyn_cast<StoreSDNode>(Chain.getNode());
15389 if (LoadSDNode *Ldn = dyn_cast<LoadSDNode>(RootNode)) {
15396 if (StoreSDNode *OtherST = dyn_cast<StoreSDNode>(*I2)) {
15407 if (StoreSDNode *OtherST = dyn_cast<StoreSDNode>(*I)) {
19937 auto *N2C = dyn_cast<ConstantSDNode>(N2.getNode());
20038 auto *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
20039 auto *N2C = dyn_cast<ConstantSDNode>(N2.getNode());
20040 auto *N3C = dyn_cast<ConstantSDNode>(N3.getNode());
20487 if (const auto *LSN = dyn_cast<LSBaseSDNode>(N)) {
lib/CodeGen/SelectionDAG/FastISel.cpp 332 const Instruction *I = dyn_cast<Instruction>(V);
337 if (const auto *Cast = dyn_cast<CastInst>(I))
349 if (const auto *GEP = dyn_cast<GetElementPtrInst>(I))
405 if (const auto *CI = dyn_cast<ConstantInt>(V)) {
415 else if (const auto *CF = dyn_cast<ConstantFP>(V)) {
438 } else if (const auto *Op = dyn_cast<Operator>(V)) {
606 if (const auto *CI = dyn_cast<ConstantInt>(I->getOperand(0)))
630 if (const auto *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
707 if (const auto *CI = dyn_cast<ConstantInt>(Idx)) {
765 if (const auto *C = dyn_cast<ConstantInt>(Val)) {
771 } else if (auto *AI = dyn_cast<AllocaInst>(Val)) {
960 if (const auto *C = dyn_cast<IntToPtrInst>(Callee)) {
964 } else if (const auto *C = dyn_cast<ConstantExpr>(Callee)) {
971 } else if (const auto *GV = dyn_cast<GlobalValue>(Callee)) {
1291 if (const InlineAsm *IA = dyn_cast<InlineAsm>(Call->getCalledValue())) {
1316 if (const auto *II = dyn_cast<IntrinsicInst>(Call))
1362 dyn_cast<Argument>(Address->stripInBoundsConstantOffsets());
1416 } else if (const auto *CI = dyn_cast<ConstantInt>(V)) {
1429 } else if (const auto *CF = dyn_cast<ConstantFP>(V)) {
1615 if (const auto *Call = dyn_cast<CallInst>(I)) {
1752 const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(U);
2300 if (const auto *Inst = dyn_cast<Instruction>(PHIOp))
2396 if (const auto *LI = dyn_cast<LoadInst>(I)) {
2402 } else if (const auto *SI = dyn_cast<StoreInst>(I)) {
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp 70 if (const auto *CI = dyn_cast<CmpInst>(U)) {
135 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
204 if (const auto *II = dyn_cast<IntrinsicInst>(&I)) {
211 if (const auto *CI = dyn_cast<CallInst>(&I)) {
440 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
473 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
lib/CodeGen/SelectionDAG/InstrEmitter.cpp 732 if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
737 } else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp 1299 if (StoreSDNode *ST = dyn_cast<StoreSDNode>(User)) {
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp 3721 ConstantSDNode *LoCmpC = dyn_cast<ConstantSDNode>(LoCmp.getNode());
3722 ConstantSDNode *HiCmpC = dyn_cast<ConstantSDNode>(HiCmp.getNode());
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp 1336 if (const auto *RegOp = dyn_cast<RegisterMaskSDNode>(Op.getNode()))
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp 147 MachineSDNode *MN = dyn_cast<MachineSDNode>(N);
lib/CodeGen/SelectionDAG/SelectionDAG.cpp 136 auto *BV = dyn_cast<BuildVectorSDNode>(N);
2943 if (auto *CInt = dyn_cast<ConstantInt>(Elt)) {
2949 if (auto *CFP = dyn_cast<ConstantFP>(Elt)) {
2961 if (auto *CInt = dyn_cast<ConstantInt>(Cst)) {
2965 } else if (auto *CFP = dyn_cast<ConstantFP>(Cst)) {
3912 if (auto *CInt = dyn_cast<ConstantInt>(Elt)) {
3917 if (auto *CFP = dyn_cast<ConstantFP>(Elt)) {
4756 auto *C2 = dyn_cast<ConstantSDNode>(N2);
4806 if (auto *C1 = dyn_cast<ConstantSDNode>(N1)) {
4807 if (auto *C2 = dyn_cast<ConstantSDNode>(N2)) {
4816 if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(N1))
4819 if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(N2))
4824 auto *BV1 = dyn_cast<BuildVectorSDNode>(N1);
4827 auto *BV2 = dyn_cast<BuildVectorSDNode>(N2);
4984 auto *N1CFP = dyn_cast<ConstantFPSDNode>(N1.getNode());
4985 auto *N2CFP = dyn_cast<ConstantFPSDNode>(N2.getNode());
5616 if (LoadSDNode *L = dyn_cast<LoadSDNode>(*U))
7726 if (MachineSDNode *MN = dyn_cast<MachineSDNode>(N))
lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp 272 if (const auto *LS0 = dyn_cast<LSBaseSDNode>(N))
274 if (const auto *LN = dyn_cast<LifetimeSDNode>(N)) {
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 168 if (auto *R = dyn_cast<ReturnInst>(V))
171 if (auto *CI = dyn_cast<CallInst>(V)) {
345 if (const CallInst *CI = dyn_cast<CallInst>(I))
1092 if (auto *FPMO = dyn_cast<FPMathOperator>(&I)) {
1282 if (const AllocaInst *AI = dyn_cast<AllocaInst>(V)) {
1443 if (const Constant *C = dyn_cast<Constant>(V)) {
1446 if (const ConstantInt *CI = dyn_cast<ConstantInt>(C))
1449 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
1458 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
1464 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
1488 dyn_cast<ConstantDataSequential>(C)) {
1526 if (const BlockAddress *BA = dyn_cast<BlockAddress>(C))
1535 if (const ConstantVector *CV = dyn_cast<ConstantVector>(C)) {
1557 if (const AllocaInst *AI = dyn_cast<AllocaInst>(V)) {
1566 if (const Instruction *Inst = dyn_cast<Instruction>(V)) {
1661 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Pad)) {
1716 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Pad)) {
1961 if (const Instruction *VI = dyn_cast<Instruction>(V)) {
2013 if (const Instruction *I = dyn_cast<Instruction>(V))
2034 if (const CmpInst *BOp = dyn_cast<CmpInst>(Cond)) {
2042 if (const ICmpInst *IC = dyn_cast<ICmpInst>(Cond)) {
2088 const Instruction *BOp = dyn_cast<Instruction>(Cond);
2262 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(CondVal)) {
2755 const Function *Fn = dyn_cast<Function>(Callee);
2951 if (const CallInst *Call = dyn_cast<CallInst>(&*PredI)) {
2979 const Instruction *Inst = dyn_cast<Instruction>(I);
2993 if (const FPMathOperator *FPOp = dyn_cast<const FPMathOperator>(Inst))
3038 auto Inst = dyn_cast<Instruction>(U);
3043 if (const FPMathOperator *FPOp = dyn_cast<const FPMathOperator>(Inst))
3048 dyn_cast<ShuffleVectorInst>(U)) {
3074 auto U2 = dyn_cast<Instruction>(*U->user_begin());
3090 const ConstantInt *Val = dyn_cast<ConstantInt>(U->getOperand(1));
3113 if (auto *OFBinOp = dyn_cast<OverflowingBinaryOperator>(&I)) {
3117 if (auto *ExactOp = dyn_cast<PossiblyExactOperator>(&I)) {
3168 dyn_cast<const OverflowingBinaryOperator>(&I)) {
3173 dyn_cast<const PossiblyExactOperator>(&I))
3198 if (const ICmpInst *IC = dyn_cast<ICmpInst>(&I))
3200 else if (const ConstantExpr *IC = dyn_cast<ConstantExpr>(&I))
3225 if (const FCmpInst *FC = dyn_cast<FCmpInst>(&I))
3227 else if (const ConstantExpr *FC = dyn_cast<ConstantExpr>(&I))
3233 auto *FPMO = dyn_cast<FPMathOperator>(&I);
3496 else if(ConstantInt *C = dyn_cast<ConstantInt>(I.getOperand(0)))
3742 if (const InsertValueInst *IV = dyn_cast<InsertValueInst>(&I))
3796 if (const ExtractValueInst *EV = dyn_cast<ExtractValueInst>(&I))
3881 const auto *C = dyn_cast<Constant>(Idx);
4008 if (const Argument *Arg = dyn_cast<Argument>(SV)) {
4013 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(SV)) {
4195 if (const Argument *Arg = dyn_cast<Argument>(PtrV)) {
4200 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(PtrV)) {
4338 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
4353 auto *C = dyn_cast<Constant>(GEP->getOperand(i));
4803 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Arg)) {
4848 if (VectorType *PTy = dyn_cast<VectorType>(I.getType())) {
5424 const Argument *Arg = dyn_cast<Argument>(V);
5525 if (LoadSDNode *LNode = dyn_cast<LoadSDNode>(LCandidate.getNode()))
5527 dyn_cast<FrameIndexSDNode>(LNode->getBasePtr().getNode()))
5592 if (auto *FISDN = dyn_cast<FrameIndexSDNode>(N.getNode())) {
5827 dyn_cast<AllocaInst>(Address->stripInBoundsConstantOffsets())) {
5833 } else if (const auto *Arg = dyn_cast<Argument>(
5856 if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
5859 auto FINode = dyn_cast<FrameIndexSDNode>(N.getNode());
5947 ConstantInt *CI = dyn_cast<ConstantInt>(I.getArgOperand(0));
6799 auto *Base = dyn_cast<GlobalObject>(GetPointerBaseWithConstantOffset(
6813 auto *ElemBase = dyn_cast<GlobalObject>(GetPointerBaseWithConstantOffset(
7202 if (const Constant *LoadInput = dyn_cast<Constant>(PtrVal)) {
7263 const ConstantInt *CSize = dyn_cast<ConstantInt>(Size);
7767 PointerType *PtrTy = dyn_cast<PointerType>(OpTy);
7774 if (StructType *STy = dyn_cast<StructType>(OpTy))
8076 } else if (const auto *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) {
8090 if (StructType *STy = dyn_cast<StructType>(CS.getType())) {
8417 if (StructType *StructResult = dyn_cast<StructType>(CSResultType))
9434 const auto *AI = dyn_cast<AllocaInst>(V);
9448 const auto *SI = dyn_cast<StoreInst>(&I);
9483 const auto *Arg = dyn_cast<Argument>(Val);
9520 auto *FINode = dyn_cast<FrameIndexSDNode>(LNode->getBasePtr().getNode());
9808 dyn_cast<FrameIndexSDNode>(InVals[i].getNode()))
9843 dyn_cast<FrameIndexSDNode>(ArgValues[0].getNode()))
9860 dyn_cast<LoadSDNode>(Res.getOperand(LowAddressOp).getNode()))
9862 dyn_cast<FrameIndexSDNode>(LNode->getBasePtr().getNode()))
9961 if (const Constant *C = dyn_cast<Constant>(PHIOp)) {
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp 544 if (const MachineSDNode *MN = dyn_cast<MachineSDNode>(this)) {
557 dyn_cast<ShuffleVectorSDNode>(this)) {
568 } else if (const ConstantSDNode *CSDN = dyn_cast<ConstantSDNode>(this)) {
570 } else if (const ConstantFPSDNode *CSDN = dyn_cast<ConstantFPSDNode>(this)) {
581 dyn_cast<GlobalAddressSDNode>(this)) {
592 } else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(this)) {
594 } else if (const JumpTableSDNode *JTDN = dyn_cast<JumpTableSDNode>(this)) {
598 } else if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(this)){
610 } else if (const TargetIndexSDNode *TI = dyn_cast<TargetIndexSDNode>(this)) {
614 } else if (const BasicBlockSDNode *BBDN = dyn_cast<BasicBlockSDNode>(this)) {
620 } else if (const RegisterSDNode *R = dyn_cast<RegisterSDNode>(this)) {
624 dyn_cast<ExternalSymbolSDNode>(this)) {
628 } else if (const SrcValueSDNode *M = dyn_cast<SrcValueSDNode>(this)) {
633 } else if (const MDNodeSDNode *MD = dyn_cast<MDNodeSDNode>(this)) {
638 } else if (const VTSDNode *N = dyn_cast<VTSDNode>(this)) {
641 else if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(this)) {
661 } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(this)) {
673 } else if (const MaskedLoadSDNode *MLd = dyn_cast<MaskedLoadSDNode>(this)) {
692 } else if (const MaskedStoreSDNode *MSt = dyn_cast<MaskedStoreSDNode>(this)) {
703 } else if (const MemSDNode* M = dyn_cast<MemSDNode>(this)) {
708 dyn_cast<BlockAddressSDNode>(this)) {
722 dyn_cast<AddrSpaceCastSDNode>(this)) {
728 } else if (const LifetimeSDNode *LN = dyn_cast<LifetimeSDNode>(this)) {
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp 368 ConstantExpr *CE = dyn_cast<ConstantExpr>(PN->getIncomingValue(i));
1183 if (const IntrinsicInst *EHPtrCall = dyn_cast<IntrinsicInst>(U)) {
1208 if (const auto *Call = dyn_cast<IntrinsicInst>(U)) {
1238 if (const auto *CPI = dyn_cast<CatchPadInst>(LLVMBB->getFirstNonPHI())) {
1263 if (const auto *CPI = dyn_cast<CatchPadInst>(LLVMBB->getFirstNonPHI()))
1298 const DbgDeclareInst *DI = dyn_cast<DbgDeclareInst>(&I);
1317 if (const auto *AI = dyn_cast<AllocaInst>(Address)) {
1321 } else if (const auto *Arg = dyn_cast<Argument>(Address))
lib/CodeGen/SelectionDAG/StatepointLowering.cpp 152 if (const auto *Relocate = dyn_cast<GCRelocateInst>(Val)) {
164 if (const BitCastInst *Cast = dyn_cast<BitCastInst>(Val))
170 if (const PHINode *Phi = dyn_cast<PHINode>(Val)) {
554 if (const Argument *Arg = dyn_cast<Argument>(V)) {
lib/CodeGen/SelectionDAG/TargetLowering.cpp 2004 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op))
2706 if (auto *CN = dyn_cast<ConstantSDNode>(N)) {
2708 } else if (auto *BV = dyn_cast<BuildVectorSDNode>(N)) {
2739 const ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N);
2741 const BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(N);
3080 if (auto *N1C = dyn_cast<ConstantSDNode>(N1.getNode())) {
3608 if (auto *N1C = dyn_cast<ConstantSDNode>(N1.getNode())) {
3939 if (auto *GASD = dyn_cast<GlobalAddressSDNode>(N)) {
4215 if (StructType *STy = dyn_cast<StructType>(CS.getType())) {
4235 llvm::PointerType *PtrTy = dyn_cast<PointerType>(OpTy);
4242 if (StructType *STy = dyn_cast<StructType>(OpTy))
4262 } else if (PointerType *PT = dyn_cast<PointerType>(OpTy)) {
lib/CodeGen/ShadowStackGCLowering.cpp 222 if (Constant *C = dyn_cast<Constant>(V))
267 return dyn_cast<GetElementPtrInst>(Val);
279 return dyn_cast<GetElementPtrInst>(Val);
lib/CodeGen/SjLjEHPrepare.cpp 140 auto *EVI = dyn_cast<ExtractValueInst>(Val);
276 if (auto *AI = dyn_cast<AllocaInst>(&Inst))
360 if (auto *II = dyn_cast<InvokeInst>(BB.getTerminator())) {
371 } else if (auto *RI = dyn_cast<ReturnInst>(BB.getTerminator())) {
451 if (auto *CI = dyn_cast<CallInst>(&I)) {
lib/CodeGen/StackColoring.cpp 950 if (BitCastInst *BCI = dyn_cast<BitCastInst>(Use.get()))
lib/CodeGen/StackProtector.cpp 117 if (ArrayType *AT = dyn_cast<ArrayType>(Ty)) {
139 const StructType *ST = dyn_cast<StructType>(Ty);
226 if (const CallInst *CI = dyn_cast<CallInst>(&I))
277 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
287 if (const auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) {
413 ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator());
lib/CodeGen/SwiftErrorValueTracking.cpp 109 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(&Inst))
288 } else if (const LoadInst *LI = dyn_cast<const LoadInst>(&*It)) {
296 } else if (const StoreInst *SI = dyn_cast<const StoreInst>(&*It)) {
305 } else if (const ReturnInst *R = dyn_cast<const ReturnInst>(&*It)) {
lib/CodeGen/TargetLoweringObjectFileImpl.cpp 529 auto *OtherGV = dyn_cast<GlobalValue>(VM->getValue());
530 return OtherGV ? dyn_cast<MCSymbolELF>(TM.getSymbol(OtherGV)) : nullptr;
564 const GlobalVariable *GV = dyn_cast<GlobalVariable>(GO);
577 const Function *F = dyn_cast<Function>(GO);
661 if (const auto *F = dyn_cast<Function>(GO)) {
1277 if (const auto *GA = dyn_cast<GlobalAlias>(ComdatKey))
1614 } else if (const auto *CFP = dyn_cast<ConstantFP>(C)) {
1616 } else if (const auto *CI = dyn_cast<ConstantInt>(C)) {
1739 if (const auto *F = dyn_cast<Function>(GO)) {
lib/CodeGen/ValueTypes.cpp 106 if (IntegerType *ITy = dyn_cast<IntegerType>(LLVMTy))
108 if (VectorType *VTy = dyn_cast<VectorType>(LLVMTy))
lib/CodeGen/WasmEHPrepare.cpp 251 if (Function *F = dyn_cast<Function>(CallPersonalityF.getCallee()))
283 if (auto *CI = dyn_cast<CallInst>(U.getUser())) {
360 if (const auto *CatchPad = dyn_cast<CatchPadInst>(Pad)) {
365 if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(UnwindPad))
lib/CodeGen/WinEHPrepare.cpp 156 dyn_cast<AllocaInst>(CPI->getArgOperand(2)->stripPointerCasts()))
167 if (const auto *CRI = dyn_cast<CleanupReturnInst>(U))
177 auto *II = dyn_cast<InvokeInst>(BB.getTerminator());
187 dyn_cast<FuncletPadInst>(FuncletEntryBB->getFirstNonPHI());
191 else if (auto *CatchPad = dyn_cast<CatchPadInst>(FuncletPad))
193 else if (auto *CleanupPad = dyn_cast<CleanupPadInst>(FuncletPad))
223 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(TI)) {
241 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(FirstNonPHI)) {
265 if (auto *InnerCatchSwitch = dyn_cast<CatchSwitchInst>(UserI)) {
270 if (auto *InnerCleanupPad = dyn_cast<CleanupPadInst>(UserI)) {
343 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(FirstNonPHI)) {
356 const Function *Filter = dyn_cast<Function>(FilterOrNull);
375 if (auto *InnerCatchSwitch = dyn_cast<CatchSwitchInst>(UserI)) {
380 if (auto *InnerCleanupPad = dyn_cast<CleanupPadInst>(UserI)) {
416 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(EHPad))
419 if (auto *CleanupPad = dyn_cast<CleanupPadInst>(EHPad))
510 if (const auto *CPI = dyn_cast<CleanupPadInst>(FirstNonPHI))
512 else if (const auto *CSI = dyn_cast<CatchSwitchInst>(FirstNonPHI))
531 if (const auto *Cleanup = dyn_cast<CleanupPadInst>(Pad)) {
541 if (const auto *I = dyn_cast<Instruction>(U))
565 if (const auto *I = dyn_cast<Instruction>(U))
588 if (const auto *Catch = dyn_cast<CatchPadInst>(Pad)) {
602 if (auto *CleanupRet = dyn_cast<CleanupReturnInst>(U)) {
611 if (auto *Invoke = dyn_cast<InvokeInst>(U)) {
613 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(U)) {
615 } else if (auto *ChildCleanup = dyn_cast<CleanupPadInst>(U)) {
635 if (auto *CSI = dyn_cast<CatchSwitchInst>(UserUnwindPad))
702 auto *PN = dyn_cast<PHINode>(I);
814 if (auto *CatchRet = dyn_cast<CatchReturnInst>(Pred->getTerminator()))
829 dyn_cast<CatchReturnInst>(IncomingBlock->getTerminator())) {
877 if (auto *Inst = dyn_cast<Instruction>(IV)) {
896 auto *OldI = dyn_cast<Instruction>(const_cast<Value *>(VT.first));
937 auto *FuncletPad = dyn_cast<FuncletPadInst>(FirstNonPHI);
956 dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts());
984 if (auto *CRI = dyn_cast<CatchReturnInst>(TI))
988 if (auto *CRI = dyn_cast<CleanupReturnInst>(TI))
1123 PHINode *PN = dyn_cast<PHINode>(InVal);
1171 if (auto *UsingPHI = dyn_cast<PHINode>(UsingInst)) {
1183 dyn_cast<CatchReturnInst>(IncomingBlock->getTerminator())) {
lib/DebugInfo/DWARF/DWARFContext.cpp 76 auto *MachO = dyn_cast<MachOObjectFile>(&Obj);
636 return dyn_cast<DWARFCompileUnit>(DWOCU.get());
1317 } else if (auto *MObj = dyn_cast<MachOObjectFile>(&Obj)) {
1344 const MachOObjectFile *MachObj = dyn_cast<MachOObjectFile>(&Obj);
lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp 80 if (auto *CoffObj = dyn_cast<COFFObjectFile>(Obj))
212 auto *CoffObject = dyn_cast<COFFObjectFile>(Module);
217 if (auto *CoffObject = dyn_cast<COFFObjectFile>(Module))
lib/DebugInfo/Symbolize/Symbolize.cpp 309 const MachOObjectFile *MachDbgObj = dyn_cast<const MachOObjectFile>(DbgObj);
356 if (auto MachObj = dyn_cast<const MachOObjectFile>(Obj))
453 if (auto CoffObject = dyn_cast<COFFObjectFile>(Objects.first)) {
lib/ExecutionEngine/ExecutionEngine.cpp 383 ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
387 ConstantStruct *CS = dyn_cast<ConstantStruct>(InitList->getOperand(i));
395 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
400 if (Function *F = dyn_cast<Function>(FP))
575 if (Function *F = const_cast<Function*>(dyn_cast<Function>(GV)))
584 const_cast<GlobalVariable *>(dyn_cast<GlobalVariable>(GV)))
611 if(StructType *STy = dyn_cast<StructType>(C->getType())) {
643 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
905 while (auto *A = dyn_cast<GlobalAlias>(C)) {
910 else if (const Function *F = dyn_cast<Function>(C))
912 else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(C))
920 const ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(C);
921 const ConstantVector *CV = dyn_cast<ConstantVector>(C);
922 const ConstantAggregateZero *CAZ = dyn_cast<ConstantAggregateZero>(C);
1138 if (const ConstantVector *CP = dyn_cast<ConstantVector>(Init)) {
1151 if (const ConstantArray *CPA = dyn_cast<ConstantArray>(Init)) {
1159 if (const ConstantStruct *CPS = dyn_cast<ConstantStruct>(Init)) {
1168 dyn_cast<ConstantDataSequential>(Init)) {
lib/ExecutionEngine/Interpreter/Execution.cpp 909 if (InvokeInst *II = dyn_cast<InvokeInst> (I))
2105 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
2107 } else if (Constant *CPV = dyn_cast<Constant>(V)) {
2109 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
lib/ExecutionEngine/Orc/ExecutionUtils.cpp 49 ConstantStruct *CS = dyn_cast<ConstantStruct>(InitList->getOperand(I));
lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp 31 if (auto Call = dyn_cast<CallBase>(&I))
58 if (auto DirectCall = dyn_cast<Function>(CalledValue))
62 if (auto CI = dyn_cast<CallInst>(&I))
65 if (auto II = dyn_cast<InvokeInst>(BB->getTerminator()))
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp 462 if (auto *COFFObj = dyn_cast<object::COFFObjectFile>(Obj)) {
486 if (auto *COFFObj = dyn_cast<object::COFFObjectFile>(Obj))
503 if (auto *COFFObj = dyn_cast<object::COFFObjectFile>(Obj))
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp 552 if (auto *E = dyn_cast<ELFObjectFileBase>(&Obj)) {
lib/FuzzMutate/OpDescriptor.cpp 16 if (auto *IntTy = dyn_cast<IntegerType>(T)) {
lib/FuzzMutate/Operations.cpp 191 if (auto *CI = dyn_cast<ConstantInt>(V))
223 if (auto *ArrayT = dyn_cast<ArrayType>(Cur[0]->getType()))
233 if (auto *ArrayT = dyn_cast<ArrayType>(Cur[0]->getType()))
248 if (auto *CI = dyn_cast<ConstantInt>(V))
lib/FuzzMutate/RandomIRBuilder.cpp 52 if (auto *I = dyn_cast<Instruction>(Ptr)) {
142 if (auto PtrTy = dyn_cast<PointerType>(Inst->getType())) {
lib/IR/AbstractCallSite.cpp 46 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U->getUser()))
lib/IR/AsmWriter.cpp 123 if (const Constant *C = dyn_cast<Constant>(V))
198 if (auto *BA = dyn_cast<BlockAddress>(V))
258 if (const Constant *C = dyn_cast<Constant>(V))
319 if (const Argument *MA = dyn_cast<Argument>(V))
322 if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
325 if (const Instruction *I = dyn_cast<Instruction>(V)) {
330 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
333 if (const auto *MAV = dyn_cast<MetadataAsValue>(V)) {
865 if (const Argument *FA = dyn_cast<Argument>(V))
868 if (const Instruction *I = dyn_cast<Instruction>(V))
872 if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
875 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
878 if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(V))
881 if (const GlobalIFunc *GIF = dyn_cast<GlobalIFunc>(V))
884 if (const Function *Func = dyn_cast<Function>(V))
1004 if (const auto *Call = dyn_cast<CallBase>(&I)) {
1068 if (const CallInst *CI = dyn_cast<CallInst>(&I))
1073 if (MDNode *N = dyn_cast<MDNode>(V->getMetadata()))
1251 if (const FPMathOperator *FPO = dyn_cast<const FPMathOperator>(U)) {
1274 dyn_cast<OverflowingBinaryOperator>(U)) {
1280 dyn_cast<PossiblyExactOperator>(U)) {
1283 } else if (const GEPOperator *GEP = dyn_cast<GEPOperator>(U)) {
1293 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
1302 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {
1386 if (const BlockAddress *BA = dyn_cast<BlockAddress>(CV)) {
1397 if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV)) {
1416 if (const ConstantDataArray *CA = dyn_cast<ConstantDataArray>(CV)) {
1444 if (const ConstantStruct *CS = dyn_cast<ConstantStruct>(CV)) {
1507 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
1516 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(CE)) {
1560 else if (auto *MDV = dyn_cast<ValueAsMetadata>(MD)) {
2234 const Constant *CV = dyn_cast<Constant>(V);
2241 if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) {
2258 if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
2268 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2285 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2309 if (const DIExpression *Expr = dyn_cast<DIExpression>(MD)) {
2314 if (const MDNode *N = dyn_cast<MDNode>(MD)) {
2322 if (const DILocation *Loc = dyn_cast<DILocation>(N)) {
2334 if (const MDString *MDS = dyn_cast<MDString>(MD)) {
3170 if (auto *Expr = dyn_cast<DIExpression>(Op)) {
3633 if (const auto *Relocate = dyn_cast<GCRelocateInst>(&V))
3677 if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
3708 if (const CmpInst *CI = dyn_cast<CmpInst>(&I))
3712 if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(&I))
3755 } else if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
3766 } else if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(&I)) {
3771 } else if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(&I)) {
3777 } else if (const LandingPadInst *LPI = dyn_cast<LandingPadInst>(&I)) {
3795 } else if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(&I)) {
3811 } else if (const auto *FPI = dyn_cast<FuncletPadInst>(&I)) {
3824 } else if (const auto *CRI = dyn_cast<CatchReturnInst>(&I)) {
3830 } else if (const auto *CRI = dyn_cast<CleanupReturnInst>(&I)) {
3839 } else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
3884 } else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
3927 } else if (const CallBrInst *CBI = dyn_cast<CallBrInst>(&I)) {
3972 } else if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
4012 if (const auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
4016 } else if (const auto *LI = dyn_cast<LoadInst>(&I)) {
4057 if (const LoadInst *LI = dyn_cast<LoadInst>(&I)) {
4062 } else if (const StoreInst *SI = dyn_cast<StoreInst>(&I)) {
4067 } else if (const AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(&I)) {
4070 } else if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(&I)) {
4073 } else if (const FenceInst *FI = dyn_cast<FenceInst>(&I)) {
4150 IsInFunction ? nullptr : dyn_cast<BasicBlock>(Order.V)) {
4262 if (StructType *STy = dyn_cast<StructType>(const_cast<Type*>(this)))
4270 if (const auto *CI = dyn_cast<CallInst>(&I))
4282 if (auto *I = dyn_cast<Instruction>(this))
4302 if (const Instruction *I = dyn_cast<Instruction>(this)) {
4306 } else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) {
4310 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
4312 if (const GlobalVariable *V = dyn_cast<GlobalVariable>(GV))
4314 else if (const Function *F = dyn_cast<Function>(GV))
4318 } else if (const MetadataAsValue *V = dyn_cast<MetadataAsValue>(this)) {
4320 } else if (const Constant *C = dyn_cast<Constant>(this)) {
4391 auto *N = dyn_cast<MDNode>(&MD);
lib/IR/AutoUpgrade.cpp 566 VectorType *ArgTy = dyn_cast<VectorType>(fArgs[0]);
842 ArrayType *ATy = dyn_cast<ArrayType>(GV->getValueType());
845 StructType *STy = dyn_cast<StructType>(ATy->getElementType());
959 if (const auto *C = dyn_cast<Constant>(Mask))
970 if (const auto *C = dyn_cast<Constant>(Mask))
1222 if (const auto *C = dyn_cast<Constant>(Mask))
1242 if (const auto *C = dyn_cast<Constant>(Mask))
1313 const auto *C = dyn_cast<Constant>(Mask);
3709 if (auto *MTI = dyn_cast<MemTransferInst>(MemCI))
3735 if (CallInst *CI = dyn_cast<CallInst>(*UI++))
3872 CallInst *CI = dyn_cast<CallInst>(*I++);
4123 auto *T = dyn_cast<MDTuple>(&N);
lib/IR/BasicBlock.cpp 153 const ReturnInst *RI = dyn_cast<ReturnInst>(&InstList.back());
166 if (auto *BI = dyn_cast<BitCastInst>(Prev)) {
174 if (auto *CI = dyn_cast<CallInst>(Prev)) {
184 auto *RI = dyn_cast<ReturnInst>(&InstList.back());
298 PHINode *P = empty() ? nullptr : dyn_cast<PHINode>(&*begin());
315 PHINode *APN = dyn_cast<PHINode>(&front());
342 while (PHINode *PN = dyn_cast<PHINode>(&front())) {
476 return dyn_cast<LandingPadInst>(getFirstNonPHI());
lib/IR/ConstantFold.cpp 108 if (PointerType *PTy = dyn_cast<PointerType>(V->getType()))
109 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy))
118 if (StructType *STy = dyn_cast<StructType>(ElTy)) {
123 dyn_cast<SequentialType>(ElTy)) {
139 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
140 if (VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) {
165 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
182 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) {
223 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
244 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS))
268 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
291 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
354 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
360 if (StructType *STy = dyn_cast<StructType>(Ty))
384 if (PointerType *PTy = dyn_cast<PointerType>(Ty))
411 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
420 if (StructType *STy = dyn_cast<StructType>(Ty)) {
447 if (PointerType *PTy = dyn_cast<PointerType>(Ty))
474 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
482 if (StructType *STy = dyn_cast<StructType>(Ty))
539 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
594 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
610 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
635 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
662 if (StructType *STy = dyn_cast<StructType>(Ty))
683 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
693 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
700 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
711 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
740 if (ConstantVector *CondV = dyn_cast<ConstantVector>(Cond)) {
774 if (ConstantExpr *TrueVal = dyn_cast<ConstantExpr>(V1)) {
779 if (ConstantExpr *FalseVal = dyn_cast<ConstantExpr>(V2)) {
795 auto *CIdx = dyn_cast<ConstantInt>(Idx);
804 if (auto *CE = dyn_cast<ConstantExpr>(Val)) {
833 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx);
918 if (StructType *ST = dyn_cast<StructType>(Agg->getType()))
934 if (StructType *ST = dyn_cast<StructType>(Agg->getType()))
936 if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType()))
961 if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
969 } else if (VectorType *VTy = dyn_cast<VectorType>(C->getType())) {
1100 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1132 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1192 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1208 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1))
1219 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) {
1220 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1282 } else if (ConstantFP *CFP1 = dyn_cast<ConstantFP>(C1)) {
1283 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) {
1307 } else if (VectorType *VTy = dyn_cast<VectorType>(C1->getType())) {
1326 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1381 if (StructType *STy = dyn_cast<StructType>(Ty)) {
1389 } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
1458 R = dyn_cast<ConstantInt>(
1462 R = dyn_cast<ConstantInt>(
1466 R = dyn_cast<ConstantInt>(
1504 if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) {
1549 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1553 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1557 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1571 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(V1)) {
1583 if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1599 } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(V1)) {
1611 if (const BlockAddress *BA2 = dyn_cast<BlockAddress>(V2)) {
1664 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1684 } else if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1694 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1788 if (VectorType *VT = dyn_cast<VectorType>(C1->getType()))
1823 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2))
1835 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C1))
2080 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) {
2091 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
2131 if (auto *CI = dyn_cast<ConstantInt>(Idxs[0])) {
2198 if (VectorType *VT = dyn_cast<VectorType>(C->getType()))
2204 if (auto *VT = dyn_cast<VectorType>(Idxs[i]->getType())) {
2214 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2248 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0))
2312 dyn_cast<PointerType>(CE->getOperand(0)->getType());
2313 PointerType *DstPtrTy = dyn_cast<PointerType>(CE->getType());
2316 dyn_cast<ArrayType>(SrcPtrTy->getElementType());
2318 dyn_cast<ArrayType>(DstPtrTy->getElementType());
2363 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idxs[i])) {
2463 if (auto *GV = dyn_cast<GlobalVariable>(C))
lib/IR/Constants.cpp 41 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
45 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this))
50 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
67 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
71 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this))
76 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
87 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
91 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
102 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
106 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
110 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
115 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this)) {
128 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
132 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
136 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
141 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this)) {
154 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
158 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
162 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
167 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this)) {
180 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
184 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
203 if (auto *CFP = dyn_cast<ConstantFP>(this))
216 if (auto *CFP = dyn_cast<ConstantFP>(this))
229 if (auto *CFP = dyn_cast<ConstantFP>(this))
242 if (auto *CFP = dyn_cast<ConstantFP>(this))
259 auto *Cy = dyn_cast<Constant>(Y);
333 if (PointerType *PTy = dyn_cast<PointerType>(ScalarTy))
337 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
344 if (IntegerType *ITy = dyn_cast<IntegerType>(Ty))
360 if (const ConstantAggregate *CC = dyn_cast<ConstantAggregate>(this))
363 if (const ConstantAggregateZero *CAZ = dyn_cast<ConstantAggregateZero>(this))
366 if (const UndefValue *UV = dyn_cast<UndefValue>(this))
369 if (const ConstantDataSequential *CDS =dyn_cast<ConstantDataSequential>(this))
377 if (ConstantInt *CI = dyn_cast<ConstantInt>(Elt)) {
430 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
436 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) {
473 if (const auto *GV = dyn_cast<GlobalValue>(WorkItem))
477 const Constant *ConstOp = dyn_cast<Constant>(Op);
503 const Constant *UC = dyn_cast<Constant>(U);
517 if (const BlockAddress *BA = dyn_cast<BlockAddress>(this))
520 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) {
522 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0));
523 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1));
539 if (auto *LHSGV = dyn_cast<GlobalValue>(LHSOp0->stripPointerCasts()))
540 if (auto *RHSGV = dyn_cast<GlobalValue>(RHSOp0->stripPointerCasts()))
560 const Constant *User = dyn_cast<Constant>(C->user_back());
575 const Constant *User = dyn_cast<Constant>(*I);
626 if (auto *VTy = dyn_cast<VectorType>(Ty))
634 if (auto *VTy = dyn_cast<VectorType>(Ty))
657 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
681 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
726 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
738 if (auto *VTy = dyn_cast<VectorType>(Ty))
751 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
762 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
773 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
784 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
795 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
843 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
890 if (auto *AT = dyn_cast<ArrayType>(Ty))
892 if (auto *VT = dyn_cast<VectorType>(Ty))
923 if (auto *ST = dyn_cast<SequentialType>(Ty))
946 if (auto *CI = dyn_cast<ConstantInt>(C))
959 if (auto *CFP = dyn_cast<ConstantFP>(C))
972 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
981 } else if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
1000 if (auto *ST = dyn_cast<StructType>(T))
1213 dyn_cast<ExtractValueConstantExpr>(this))
1403 if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(this))
1405 if (const ConstantVector *CV = dyn_cast<ConstantVector>(this))
1421 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
1828 if (VectorType *VT = dyn_cast<VectorType>(DstTy)) {
2083 if (VectorType *VT = dyn_cast<VectorType>(LHS->getType()))
2108 if (VectorType *VT = dyn_cast<VectorType>(LHS->getType()))
2443 if (auto *IT = dyn_cast<IntegerType>(Ty)) {
2457 if (ArrayType *AT = dyn_cast<ArrayType>(getType()))
2653 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
2671 if (ConstantFP *CFP = dyn_cast<ConstantFP>(V)) {
lib/IR/Core.cpp 757 if (auto *PTy = dyn_cast<PointerType>(Ty))
879 if (MDNode *N = dyn_cast<MDNode>(MD))
978 if (auto *C = dyn_cast<ConstantAsMetadata>(Op))
985 if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
986 if (auto *L = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
1033 if (Constant *C = dyn_cast<Constant>(unwrap(Val)))
1078 else if (auto *C = dyn_cast<Constant>(V))
1080 else if (auto *MDV = dyn_cast<MetadataAsValue>(V)) {
1106 if (auto *C = dyn_cast<Constant>(V))
1108 if (auto *MAV = dyn_cast<MetadataAsValue>(V))
1114 if (const auto *MD = dyn_cast<MetadataAsValue>(unwrap(V)))
1115 if (const MDString *S = dyn_cast<MDString>(MD->getMetadata())) {
1180 if (auto *MDV = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
1221 if (const auto *I = dyn_cast<Instruction>(unwrap(Val))) {
1225 } else if (const auto *GV = dyn_cast<GlobalVariable>(unwrap(Val))) {
1231 } else if (const auto *F = dyn_cast<Function>(unwrap(Val))) {
1245 if (const auto *I = dyn_cast<Instruction>(unwrap(Val))) {
1249 } else if (const auto *GV = dyn_cast<GlobalVariable>(unwrap(Val))) {
1255 } else if (const auto *F = dyn_cast<Function>(unwrap(Val))) {
1268 if (const auto *I = dyn_cast<Instruction>(unwrap(Val))) {
1272 } else if (const auto *GV = dyn_cast<GlobalVariable>(unwrap(Val))) {
1278 } else if (const auto *F = dyn_cast<Function>(unwrap(Val))) {
1290 if (const auto *I = dyn_cast<Instruction>(unwrap(Val)))
1810 return wrap(InlineAsm::get(dyn_cast<FunctionType>(unwrap(Ty)), AsmString,
1995 if (GlobalValue *GV = dyn_cast<GlobalValue>(P))
1997 if (AllocaInst *AI = dyn_cast<AllocaInst>(P))
1999 if (LoadInst *LI = dyn_cast<LoadInst>(P))
2001 if (StoreInst *SI = dyn_cast<StoreInst>(P))
2010 if (GlobalObject *GV = dyn_cast<GlobalObject>(P))
2012 else if (AllocaInst *AI = dyn_cast<AllocaInst>(P))
2014 else if (LoadInst *LI = dyn_cast<LoadInst>(P))
2016 else if (StoreInst *SI = dyn_cast<StoreInst>(P))
2026 if (Instruction *Instr = dyn_cast<Instruction>(unwrap(Value))) {
2313 if (Function *F = dyn_cast<Function>(unwrap(Fn)))
2736 if (ICmpInst *I = dyn_cast<ICmpInst>(unwrap(Inst)))
2738 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2745 if (FCmpInst *I = dyn_cast<FCmpInst>(unwrap(Inst)))
2747 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2754 if (Instruction *C = dyn_cast<Instruction>(unwrap(Inst)))
2760 if (Instruction *C = dyn_cast<Instruction>(unwrap(Inst)))
2766 Instruction *I = dyn_cast<Instruction>(unwrap(Inst));
2771 if (FuncletPadInst *FPI = dyn_cast<FuncletPadInst>(unwrap(Instr))) {
2864 if (CleanupReturnInst *CRI = dyn_cast<CleanupReturnInst>(unwrap(Invoke))) {
2866 } else if (CatchSwitchInst *CSI = dyn_cast<CatchSwitchInst>(unwrap(Invoke))) {
2877 if (CleanupReturnInst *CRI = dyn_cast<CleanupReturnInst>(unwrap(Invoke))) {
2879 } else if (CatchSwitchInst *CSI = dyn_cast<CatchSwitchInst>(unwrap(Invoke))) {
2960 if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
2962 if (auto *EV = dyn_cast<ExtractValueInst>(I))
2964 if (auto *IV = dyn_cast<InsertValueInst>(I))
2966 if (auto *CE = dyn_cast<ConstantExpr>(I))
2974 if (auto *EV = dyn_cast<ExtractValueInst>(I))
2976 if (auto *IV = dyn_cast<InsertValueInst>(I))
2978 if (auto *CE = dyn_cast<ConstantExpr>(I))
3645 if (LoadInst *LI = dyn_cast<LoadInst>(P))
3647 if (StoreInst *SI = dyn_cast<StoreInst>(P))
3649 if (AtomicRMWInst *AI = dyn_cast<AtomicRMWInst>(P))
3656 if (LoadInst *LI = dyn_cast<LoadInst>(P))
3658 if (StoreInst *SI = dyn_cast<StoreInst>(P))
3660 if (AtomicRMWInst *AI = dyn_cast<AtomicRMWInst>(P))
3676 if (LoadInst *LI = dyn_cast<LoadInst>(P))
3678 else if (StoreInst *SI = dyn_cast<StoreInst>(P))
3689 if (LoadInst *LI = dyn_cast<LoadInst>(P))
3942 if (AtomicRMWInst *I = dyn_cast<AtomicRMWInst>(P))
3952 if (AtomicRMWInst *I = dyn_cast<AtomicRMWInst>(P))
lib/IR/DIBuilder.cpp 94 if (auto *SP = dyn_cast<DISubprogram>(N))
lib/IR/DataLayout.cpp 779 if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
801 if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
lib/IR/DebugInfo.cpp 89 if (auto *T = dyn_cast<DIType>(RT))
95 if (auto *T = dyn_cast<DIType>(Entity))
97 else if (auto *SP = dyn_cast<DISubprogram>(Entity))
99 else if (auto *NS = dyn_cast<DINamespace>(Entity))
101 else if (auto *M = dyn_cast<DIModule>(Entity))
108 if (auto *DDI = dyn_cast<DbgDeclareInst>(&I))
110 else if (auto *DVI = dyn_cast<DbgValueInst>(&I))
128 if (auto *ST = dyn_cast<DISubroutineType>(DT)) {
133 if (auto *DCT = dyn_cast<DICompositeType>(DT)) {
136 if (auto *T = dyn_cast<DIType>(D))
138 else if (auto *SP = dyn_cast<DISubprogram>(D))
143 if (auto *DDT = dyn_cast<DIDerivedType>(DT)) {
151 if (auto *Ty = dyn_cast<DIType>(Scope)) {
155 if (auto *CU = dyn_cast<DICompileUnit>(Scope)) {
159 if (auto *SP = dyn_cast<DISubprogram>(Scope)) {
165 if (auto *LB = dyn_cast<DILexicalBlockBase>(Scope)) {
167 } else if (auto *NS = dyn_cast<DINamespace>(Scope)) {
169 } else if (auto *M = dyn_cast<DIModule>(Scope)) {
189 if (auto *TType = dyn_cast<DITemplateTypeParameter>(Element)) {
191 } else if (auto *TVal = dyn_cast<DITemplateValueParameter>(Element)) {
199 auto *N = dyn_cast<MDNode>(DDI->getVariable());
203 auto *DV = dyn_cast<DILocalVariable>(N);
214 auto *N = dyn_cast<MDNode>(DVI->getVariable());
218 auto *DV = dyn_cast<DILocalVariable>(N);
524 if (auto *MDSub = dyn_cast<DISubprogram>(N)) {
530 if (auto *CU = dyn_cast<DICompileUnit>(N))
534 if (auto *MDLB = dyn_cast<DILexicalBlockBase>(N))
537 if (auto *MLD = dyn_cast<DILocation>(N))
563 if (auto *MDS = dyn_cast<DISubprogram>(Parent))
lib/IR/DebugInfoMetadata.cpp 213 if (auto *T = dyn_cast<DIType>(this))
216 if (auto *SP = dyn_cast<DISubprogram>(this))
219 if (auto *LB = dyn_cast<DILexicalBlockBase>(this))
222 if (auto *NS = dyn_cast<DINamespace>(this))
225 if (auto *CB = dyn_cast<DICommonBlock>(this))
228 if (auto *M = dyn_cast<DIModule>(this))
237 if (auto *T = dyn_cast<DIType>(this))
239 if (auto *SP = dyn_cast<DISubprogram>(this))
241 if (auto *NS = dyn_cast<DINamespace>(this))
243 if (auto *CB = dyn_cast<DICommonBlock>(this))
245 if (auto *M = dyn_cast<DIModule>(this))
581 if (auto *Block = dyn_cast<DILexicalBlockBase>(this))
587 if (auto *File = dyn_cast<DILexicalBlockFile>(this))
793 if (auto *T = dyn_cast<DIType>(RawType))
797 if (auto *DT = dyn_cast<DIDerivedType>(RawType)) {
lib/IR/DiagnosticInfo.cpp 165 if (auto *F = dyn_cast<Function>(V)) {
169 else if (auto *I = dyn_cast<Instruction>(V))
179 } else if (auto *I = dyn_cast<Instruction>(V))
lib/IR/Dominators.cpp 169 if (const auto *II = dyn_cast<InvokeInst>(Def)) {
233 PHINode *PN = dyn_cast<PHINode>(UserInst);
256 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
274 if (const InvokeInst *II = dyn_cast<InvokeInst>(Def)) {
300 Instruction *I = dyn_cast<Instruction>(U.getUser());
307 if (PHINode *PN = dyn_cast<PHINode>(I))
lib/IR/Function.cpp 590 if (PointerType* PTyp = dyn_cast<PointerType>(Ty)) {
593 } else if (ArrayType* ATyp = dyn_cast<ArrayType>(Ty)) {
596 } else if (StructType *STyp = dyn_cast<StructType>(Ty)) {
607 } else if (FunctionType *FT = dyn_cast<FunctionType>(Ty)) {
615 } else if (VectorType* VTy = dyn_cast<VectorType>(Ty)) {
981 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
988 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
998 VectorType *VTy = dyn_cast<VectorType>(Ty);
1009 if (auto *VTy = dyn_cast<VectorType>(Ty))
1019 VectorType *VTy = dyn_cast<VectorType>(Ty);
1027 if (VectorType *VTy = dyn_cast<VectorType>(Ty))
1033 VectorType *VTy = dyn_cast<VectorType>(Ty);
1147 VectorType *VT = dyn_cast<VectorType>(Ty);
1153 PointerType *PT = dyn_cast<PointerType>(Ty);
1160 StructType *ST = dyn_cast<StructType>(Ty);
1201 if (VectorType *VTy = dyn_cast<VectorType>(NewTy))
1203 else if (IntegerType *ITy = dyn_cast<IntegerType>(NewTy))
1216 if (VectorType *VTy = dyn_cast<VectorType>(NewTy))
1218 else if (IntegerType *ITy = dyn_cast<IntegerType>(NewTy))
1238 auto *ReferenceType = dyn_cast<VectorType>(ArgTys[D.getArgumentNumber()]);
1239 auto *ThisArgType = dyn_cast<VectorType>(Ty);
1257 PointerType *ThisArgType = dyn_cast<PointerType>(Ty);
1264 dyn_cast<VectorType> (ArgTys[D.getArgumentNumber()]);
1265 PointerType *ThisArgType = dyn_cast<PointerType>(Ty);
1290 VectorType *ReferenceType = dyn_cast<VectorType>(ArgTys[RefArgNumber]);
1291 VectorType *ThisArgVecTy = dyn_cast<VectorType>(Ty);
1297 dyn_cast<PointerType>(ThisArgVecTy->getVectorElementType());
1306 auto *ReferenceType = dyn_cast<VectorType>(ArgTys[D.getArgumentNumber()]);
1316 if (auto *VTy = dyn_cast<VectorType>(NewTy)) {
1324 VectorType *VTy = dyn_cast<VectorType>(Ty);
1333 auto *ReferenceType = dyn_cast<VectorType>(ArgTys[D.getArgumentNumber()]);
1334 auto *ThisArgVecTy = dyn_cast<VectorType>(Ty);
1425 const auto *Call = dyn_cast<CallBase>(FU);
1458 if (const auto *Call = dyn_cast<CallBase>(&I))
lib/IR/Globals.cpp 45 if (const Function *F = dyn_cast<Function>(this))
98 if (auto *GA = dyn_cast<GlobalAlias>(this)) {
166 if (auto *GA = dyn_cast<GlobalAlias>(this)) {
176 if (auto *GA = dyn_cast<GlobalAlias>(this)) {
233 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
237 if (const Function *F = dyn_cast<Function>(this))
287 if (auto *GO = dyn_cast<GlobalObject>(this))
289 if (auto *GA = dyn_cast<GlobalIndirectSymbol>(this))
295 auto *GO = dyn_cast<GlobalObject>(this);
303 auto *GO = dyn_cast<GlobalObject>(this);
325 if (auto *Var = dyn_cast<GlobalVariable>(this))
436 if (auto *GO = dyn_cast<GlobalObject>(C))
438 if (auto *GA = dyn_cast<GlobalAlias>(C))
441 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
lib/IR/InlineAsm.cpp 293 StructType *STy = dyn_cast<StructType>(Ty->getReturnType());
lib/IR/Instruction.cpp 246 if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) {
253 if (auto *PE = dyn_cast<PossiblyExactOperator>(V))
258 if (auto *FP = dyn_cast<FPMathOperator>(V))
262 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
263 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
268 if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) {
275 if (auto *PE = dyn_cast<PossiblyExactOperator>(V))
279 if (auto *FP = dyn_cast<FPMathOperator>(V)) {
287 if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
288 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
384 if (const AllocaInst *AI = dyn_cast<AllocaInst>(I1))
388 if (const LoadInst *LI = dyn_cast<LoadInst>(I1))
394 if (const StoreInst *SI = dyn_cast<StoreInst>(I1))
400 if (const CmpInst *CI = dyn_cast<CmpInst>(I1))
402 if (const CallInst *CI = dyn_cast<CallInst>(I1))
407 if (const InvokeInst *CI = dyn_cast<InvokeInst>(I1))
411 if (const CallBrInst *CI = dyn_cast<CallBrInst>(I1))
415 if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(I1))
417 if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(I1))
419 if (const FenceInst *FI = dyn_cast<FenceInst>(I1))
422 if (const AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(I1))
431 if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(I1))
460 if (const PHINode *thisPHI = dyn_cast<PHINode>(this)) {
500 const PHINode *PN = dyn_cast<PHINode>(I);
593 if (const CallInst *CI = dyn_cast<CallInst>(this))
595 if (const auto *CRI = dyn_cast<CleanupReturnInst>(this))
597 if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(this))
608 auto II = dyn_cast<IntrinsicInst>(this);
lib/IR/Instructions.cpp 57 auto C = dyn_cast<ConstantInt>(getArraySize());
86 if (VectorType *VT = dyn_cast<VectorType>(Op0->getType())) {
90 VectorType *ET = dyn_cast<VectorType>(Op1->getType());
270 if (const CallInst *CI = dyn_cast<CallInst>(this))
279 if (auto *CI = dyn_cast<CallInst>(this))
286 if (auto *CI = dyn_cast<CallInst>(this))
518 const ConstantInt *CVal = dyn_cast<ConstantInt>(val);
549 } else if (Constant *CO = dyn_cast<Constant>(ArraySize)) {
594 if (Function *F = dyn_cast<Function>(MallocFunc.getCallee())) {
680 if (Function *F = dyn_cast<Function>(FreeFunc.getCallee()))
826 if (dyn_cast<BlockAddress>(getArgOperand(ArgNo)) == Old)
1262 if (ConstantInt *CI = dyn_cast<ConstantInt>(getOperand(0)))
1639 CompositeType *CT = dyn_cast<CompositeType>(Agg);
1666 if (ConstantInt *CI = dyn_cast<ConstantInt>(getOperand(i))) {
1850 auto *MaskTy = dyn_cast<VectorType>(Mask->getType());
1858 if (const auto *MV = dyn_cast<ConstantVector>(Mask)) {
1861 if (auto *CI = dyn_cast<ConstantInt>(Op)) {
1871 if (const auto *CDS = dyn_cast<ConstantDataSequential>(Mask)) {
1883 if (const auto *CE = dyn_cast<ConstantExpr>(Mask))
1892 if (auto *CDS = dyn_cast<ConstantDataSequential>(Mask))
1904 if (auto *CDS = dyn_cast<ConstantDataSequential>(Mask)) {
2171 if (ArrayType *AT = dyn_cast<ArrayType>(Agg)) {
2174 } else if (StructType *ST = dyn_cast<StructType>(Agg)) {
2974 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2975 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy))
3029 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {
3030 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) {
3039 if (PointerType *DestPtrTy = dyn_cast<PointerType>(DestTy)) {
3040 if (PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy)) {
3065 if (auto *PtrTy = dyn_cast<PointerType>(SrcTy))
3066 if (auto *IntTy = dyn_cast<IntegerType>(DestTy))
3069 if (auto *PtrTy = dyn_cast<PointerType>(DestTy))
3070 if (auto *IntTy = dyn_cast<IntegerType>(SrcTy))
3096 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
3097 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy))
3237 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
3244 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
3249 PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy->getScalarType());
3250 PointerType *DstPtrTy = dyn_cast<PointerType>(DstTy->getScalarType());
3267 VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy);
3268 VectorType *DstVecTy = dyn_cast<VectorType>(DstTy);
3279 PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy->getScalarType());
3283 PointerType *DstPtrTy = dyn_cast<PointerType>(DstTy->getScalarType());
3290 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {
3291 if (VectorType *DstVecTy = dyn_cast<VectorType>(DstTy))
3520 if (ICmpInst *IC = dyn_cast<ICmpInst>(this))
3527 if (const ICmpInst *IC = dyn_cast<ICmpInst>(this))
3533 if (const ICmpInst *IC = dyn_cast<ICmpInst>(this))
lib/IR/IntrinsicInst.cpp 45 if (auto *V = dyn_cast<ValueAsMetadata>(MD))
lib/IR/LLVMContext.cpp 193 if (auto *Remark = dyn_cast<DiagnosticInfoOptimizationBase>(&DI))
216 if (auto *OptDiagBase = dyn_cast<DiagnosticInfoOptimizationBase>(&DI))
lib/IR/LLVMContextImpl.h 341 if (auto *MD = dyn_cast<ConstantAsMetadata>(CountNode))
350 if (auto *MD = dyn_cast<ConstantAsMetadata>(CountNode))
lib/IR/Mangler.cpp 139 const Function *MSFunc = dyn_cast<Function>(GV);
lib/IR/Metadata.cpp 90 auto *N = dyn_cast<MDNode>(MD);
161 if (auto *PH = dyn_cast<DistinctMDOperandPlaceholder>(&MD)) {
174 else if (auto *PH = dyn_cast<DistinctMDOperandPlaceholder>(&MD))
304 auto *OwnerMD = dyn_cast<MDNode>(Owner.get<Metadata *>());
314 if (auto *N = dyn_cast<MDNode>(&MD))
316 return dyn_cast<ValueAsMetadata>(&MD);
320 if (auto *N = dyn_cast<MDNode>(&MD))
322 return dyn_cast<ValueAsMetadata>(&MD);
326 if (auto *N = dyn_cast<MDNode>(&MD))
328 return dyn_cast<ValueAsMetadata>(&MD);
333 if (auto *A = dyn_cast<Argument>(V)) {
358 if (auto *C = dyn_cast<Constant>(V))
414 if (auto *C = dyn_cast<Constant>(To)) {
1470 DIGlobalVariable *GV = dyn_cast<DIGlobalVariable>(Attachment);
lib/IR/ModuleSummaryIndex.cpp 121 if (auto *GVS = dyn_cast<GlobalVarSummary>(Ref->getBaseObject())) {
173 if (auto *GVS = dyn_cast<GlobalVarSummary>(S->getBaseObject()))
186 if (auto *GVS = dyn_cast<GlobalVarSummary>(
355 if (auto *GVS = dyn_cast<GlobalVarSummary>(S))
361 if (auto *GVS = dyn_cast<GlobalVarSummary>(S))
lib/IR/Operator.cpp 23 if (auto *I = dyn_cast<GetElementPtrInst>(this))
29 if (auto *I = dyn_cast<GetElementPtrInst>(this))
42 ConstantInt *OpC = dyn_cast<ConstantInt>(GTI.getOperand());
lib/IR/SafepointIRVerifier.cpp 141 const BranchInst *BI = dyn_cast<BranchInst>(TI);
149 ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition());
254 if (auto *PT = dyn_cast<PointerType>(T))
265 if (VectorType *VT = dyn_cast<VectorType>(Ty))
267 if (ArrayType *AT = dyn_cast<ArrayType>(Ty))
269 if (StructType *ST = dyn_cast<StructType>(Ty))
340 if (const auto *CI = dyn_cast<CastInst>(V)) {
344 if (const auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
350 if (const auto *PN = dyn_cast<PHINode>(V)) {
355 if (const auto *SI = dyn_cast<SelectInst>(V)) {
658 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
794 if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
lib/IR/Statepoint.cpp 27 if (auto *Call = dyn_cast<CallBase>(V))
41 if (auto *Call = dyn_cast<CallBase>(V))
49 if (auto *Call = dyn_cast<CallBase>(V))
lib/IR/Type.cpp 73 if (auto *thisPTy = dyn_cast<VectorType>(this)) {
74 if (auto *thatPTy = dyn_cast<VectorType>(Ty))
82 if (auto *thatPTy = dyn_cast<VectorType>(Ty))
90 if (auto *PTy = dyn_cast<PointerType>(this)) {
91 if (auto *OtherPTy = dyn_cast<PointerType>(Ty))
99 if (auto *ATy = dyn_cast<ArrayType>(this)) {
104 if (auto *STy = dyn_cast<StructType>(this)) {
139 if (auto *VTy = dyn_cast<VectorType>(this))
152 if (auto *ATy = dyn_cast<ArrayType>(this))
155 if (auto *VTy = dyn_cast<VectorType>(this))
512 if (auto *VTy = dyn_cast<VectorType>(ElemTy))
537 if (auto *STy = dyn_cast<StructType>(this)) {
548 if (auto *STy = dyn_cast<StructType>(this)) {
557 if (auto *STy = dyn_cast<StructType>(this)) {
562 const Constant *C = dyn_cast<Constant>(V);
574 if (auto *STy = dyn_cast<StructType>(this))
600 if (auto *VTy = dyn_cast<VectorType>(ElemTy))
lib/IR/TypeFinder.cpp 103 if (StructType *STy = dyn_cast<StructType>(Ty))
121 if (const auto *M = dyn_cast<MetadataAsValue>(V)) {
122 if (const auto *N = dyn_cast<MDNode>(M->getMetadata()))
124 if (const auto *MDV = dyn_cast<ValueAsMetadata>(M->getMetadata()))
159 if (auto *N = dyn_cast<MDNode>(Op)) {
163 if (auto *C = dyn_cast<ConstantAsMetadata>(Op)) {
lib/IR/Value.cpp 153 const auto *User = dyn_cast<Instruction>(*UI);
166 if (Instruction *I = dyn_cast<Instruction>(V)) {
170 } else if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
173 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
176 } else if (Argument *A = dyn_cast<Argument>(V)) {
287 if (Function *F = dyn_cast<Function>(this))
353 const GlobalValue *GV = dyn_cast<GlobalValue>(this);
385 auto *C = dyn_cast<Constant>(V);
389 auto *CE = dyn_cast<ConstantExpr>(Expr);
415 if (auto *C = dyn_cast<Constant>(U.getUser())) {
425 if (BasicBlock *BB = dyn_cast<BasicBlock>(this))
448 auto *I = dyn_cast<Instruction>(U.getUser());
476 if (auto *GEP = dyn_cast<GEPOperator>(V)) {
505 if (const auto *Call = dyn_cast<CallBase>(V)) {
565 if (auto *GEP = dyn_cast<GEPOperator>(V)) {
591 } else if (auto *GA = dyn_cast<GlobalAlias>(V)) {
594 } else if (const auto *Call = dyn_cast<CallBase>(V)) {
614 if (const Argument *A = dyn_cast<Argument>(this)) {
625 } else if (const auto *Call = dyn_cast<CallBase>(this)) {
632 } else if (const LoadInst *LI = dyn_cast<LoadInst>(this)) {
645 } else if (auto *IP = dyn_cast<IntToPtrInst>(this)) {
658 } else if (auto *AI = dyn_cast<AllocaInst>(this)) {
663 } else if (auto *GV = dyn_cast<GlobalVariable>(this)) {
676 if (auto *GO = dyn_cast<GlobalObject>(this)) {
689 if (auto *GVar = dyn_cast<GlobalVariable>(GO)) {
703 } else if (const Argument *A = dyn_cast<Argument>(this)) {
712 } else if (const AllocaInst *AI = dyn_cast<AllocaInst>(this)) {
720 } else if (const auto *Call = dyn_cast<CallBase>(this)) {
726 } else if (const LoadInst *LI = dyn_cast<LoadInst>(this)) {
737 auto *PN = dyn_cast<PHINode>(this);
765 auto *Arg = dyn_cast<Argument>(this);
768 auto *Alloca = dyn_cast<AllocaInst>(this);
lib/IR/ValueSymbolTable.cpp 50 if (auto *GV = dyn_cast<GlobalValue>(V)) {
lib/IR/Verifier.cpp 574 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(&GV);
601 if (const Instruction *I = dyn_cast<Instruction>(V)) {
610 } else if (const Function *F = dyn_cast<Function>(V)) {
643 if (ArrayType *ATy = dyn_cast<ArrayType>(GV.getValueType())) {
644 StructType *STy = dyn_cast<StructType>(ATy->getElementType());
668 if (ArrayType *ATy = dyn_cast<ArrayType>(GVType)) {
669 PointerType *PTy = dyn_cast<PointerType>(ATy->getElementType());
673 const ConstantArray *InitArray = dyn_cast<ConstantArray>(Init);
691 if (auto *GVE = dyn_cast<DIGlobalVariableExpression>(MD))
702 if (auto *VTy = dyn_cast<VectorType>(GV.getValueType()))
724 if (const auto *GV = dyn_cast<GlobalValue>(&C)) {
728 if (const auto *GA2 = dyn_cast<GlobalAlias>(GV)) {
740 if (const auto *CE = dyn_cast<ConstantExpr>(&C))
745 if (const auto *GA2 = dyn_cast<GlobalAlias>(V))
747 else if (const auto *C2 = dyn_cast<Constant>(V))
811 if (auto *N = dyn_cast<MDNode>(Op)) {
815 if (auto *V = dyn_cast<ValueAsMetadata>(Op)) {
831 auto *L = dyn_cast<LocalAsMetadata>(&MD);
840 if (Instruction *I = dyn_cast<Instruction>(L->getValue())) {
843 } else if (BasicBlock *BB = dyn_cast<BasicBlock>(L->getValue()))
845 else if (Argument *A = dyn_cast<Argument>(L->getValue()))
854 if (auto *N = dyn_cast<MDNode>(MD)) {
864 if (auto *V = dyn_cast<ValueAsMetadata>(MD))
877 if (auto *SP = dyn_cast<DISubprogram>(N.getRawScope()))
956 auto *Params = dyn_cast<MDTuple>(&RawParams);
1118 auto *Node = dyn_cast<MDTuple>(RawNode);
1143 auto *ThrownTypes = dyn_cast<MDTuple>(RawThrownTypes);
1159 if (auto *SP = dyn_cast<DISubprogram>(N.getRawScope()))
1662 if (PointerType *PTy = dyn_cast<PointerType>(Ty)) {
1888 if (const auto *CE = dyn_cast<ConstantExpr>(C))
1891 if (const auto *GV = dyn_cast<GlobalValue>(C)) {
1958 auto *PT = dyn_cast<PointerType>(Target->getType());
2039 const CallInst *UserCall = dyn_cast<const CallInst>(U);
2081 if (auto *II = dyn_cast<InvokeInst>(Terminator))
2083 else if (auto *CSI = dyn_cast<CatchSwitchInst>(Terminator))
2237 auto *Per = dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
2511 if (auto *BA = dyn_cast<BlockAddress>(V))
2726 if (auto *PTy = dyn_cast<PointerType>(SrcTy->getScalarType()))
2753 if (auto *PTy = dyn_cast<PointerType>(DestTy->getScalarType()))
2854 = dyn_cast<Function>(Call.getCalledValue()->stripPointerCasts());
2871 if (auto AI = dyn_cast<AllocaInst>(InAllocaArg->stripInBoundsOffsets()))
2882 if (auto AI = dyn_cast<AllocaInst>(SwiftErrorArg->stripInBoundsOffsets())) {
2887 auto ArgI = dyn_cast<Argument>(SwiftErrorArg);
3027 PointerType *PL = dyn_cast<PointerType>(L);
3028 PointerType *PR = dyn_cast<PointerType>(R);
3309 if (auto *PTy = dyn_cast<PointerType>(GEP.getType())) {
3377 PointerType *PTy = dyn_cast<PointerType>(LI.getOperand(0)->getType());
3403 PointerType *PTy = dyn_cast<PointerType>(SI.getOperand(1)->getType());
3453 if (auto StoreI = dyn_cast<StoreInst>(U))
3457 if (auto *Call = dyn_cast<CallBase>(U))
3502 PointerType *PTy = dyn_cast<PointerType>(CXI.getOperand(0)->getType());
3522 PointerType *PTy = dyn_cast<PointerType>(RMWI.getOperand(0)->getType());
3580 if (auto *FPI = dyn_cast<FuncletPadInst>(EHPad))
3594 if (auto *LPI = dyn_cast<LandingPadInst>(&I)) {
3599 const auto *II = dyn_cast<InvokeInst>(PredBB->getTerminator());
3607 if (auto *CPI = dyn_cast<CatchPadInst>(&I)) {
3626 if (auto *II = dyn_cast<InvokeInst>(TI)) {
3633 } else if (auto *CRI = dyn_cast<CleanupReturnInst>(TI)) {
3636 } else if (auto *CSI = dyn_cast<CatchSwitchInst>(TI)) {
3777 if (auto *CRI = dyn_cast<CleanupReturnInst>(U)) {
3779 } else if (auto *CSI = dyn_cast<CatchSwitchInst>(U)) {
3787 } else if (auto *II = dyn_cast<InvokeInst>(U)) {
3794 } else if (auto *CPI = dyn_cast<CleanupPadInst>(U)) {
3906 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(FPI.getParentPad())) {
3986 if (InvokeInst *II = dyn_cast<InvokeInst>(Op)) {
4033 if (BranchInst *BI = dyn_cast<BranchInst>(&I))
4035 else if (SwitchInst *SI = dyn_cast<SwitchInst>(&I))
4039 else if (IndirectBrInst *IBI = dyn_cast<IndirectBrInst>(&I))
4089 if (Instruction *Used = dyn_cast<Instruction>(U.getUser()))
4102 const CallBase *CBI = dyn_cast<CallBase>(&I);
4113 if (Function *F = dyn_cast<Function>(I.getOperand(i))) {
4133 } else if (BasicBlock *OpBB = dyn_cast<BasicBlock>(I.getOperand(i))) {
4136 } else if (Argument *OpArg = dyn_cast<Argument>(I.getOperand(i))) {
4139 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(I.getOperand(i))) {
4147 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(I.getOperand(i))) {
4223 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(&I)) {
4280 if (auto *MD = dyn_cast<MetadataAsValue>(V))
4290 auto *GV = dyn_cast<GlobalVariable>(InfoArg);
4358 if (const auto *MTI = dyn_cast<MemTransferInst>(MI)) {
4379 if (auto *LengthCI = dyn_cast<ConstantInt>(AMI->getLength())) {
4394 if (const auto *AMT = dyn_cast<AtomicMemTransferInst>(AMI)) {
4406 dyn_cast<AllocaInst>(Call.getArgOperand(0)->stripPointerCasts());
4444 auto *AI = dyn_cast<AllocaInst>(Arg->stripPointerCasts());
4454 Function *Fn = dyn_cast<Function>(FnArg);
4467 if (auto *CI = dyn_cast<CallInst>(&Call))
4479 const auto *StatepointCall = dyn_cast<CallBase>(Call.getArgOperand(0));
4506 dyn_cast<LandingPadInst>(Call.getArgOperand(0))) {
4671 auto *RI = dyn_cast<ReturnInst>(Call.getNextNode());
4746 if (auto *SP = dyn_cast<DISubprogram>(LocalScope))
4749 if (auto *LB = dyn_cast<DILexicalBlockBase>(LocalScope))
4839 if (auto *OperandT = dyn_cast<VectorType>(Operand->getType())) {
4848 if (auto *OperandT = dyn_cast<VectorType>(Operand->getType())) {
lib/LTO/LTO.cpp 196 if (auto *GVS = dyn_cast<GlobalVarSummary>(GS)) {
200 if (auto *FS = dyn_cast<FunctionSummary>(GS)) {
368 if (auto AS = dyn_cast<AliasSummary>(S.get()))
378 if (auto *VarSummary = dyn_cast<GlobalVarSummary>(GVS->getBaseObject()))
654 if (auto GO = dyn_cast<GlobalObject>(&GV))
881 auto *FS = dyn_cast<FunctionSummary>(S.get());
lib/LTO/LTOModule.cpp 248 if (const ConstantExpr *ce = dyn_cast<ConstantExpr>(c)) {
250 if (GlobalVariable *gvn = dyn_cast<GlobalVariable>(op)) {
252 if (ConstantDataArray *ca = dyn_cast<ConstantDataArray>(cn)) {
265 const ConstantStruct *c = dyn_cast<ConstantStruct>(clgv->getInitializer());
299 const ConstantStruct *c = dyn_cast<ConstantStruct>(clgv->getInitializer());
379 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(v)) {
424 const GlobalVariable *gv = dyn_cast<GlobalVariable>(def);
593 auto *F = dyn_cast<Function>(GV);
lib/LTO/UpdateCompilerUsed.cpp 106 FuncAliasee = dyn_cast<Function>(A->getAliasee());
lib/Linker/IRMover.cpp 104 if (auto *STy = dyn_cast<StructType>(Ty))
134 if (StructType *SSTy = dyn_cast<StructType>(SrcTy)) {
165 if (PointerType *PT = dyn_cast<PointerType>(DstTy)) {
168 } else if (FunctionType *FT = dyn_cast<FunctionType>(DstTy)) {
171 } else if (StructType *DSTy = dyn_cast<StructType>(DstTy)) {
176 } else if (auto *DSeqTy = dyn_cast<SequentialType>(DstTy)) {
285 if (auto *DTy = dyn_cast<StructType>(*Entry)) {
574 auto *SGV = dyn_cast<GlobalValue>(V);
586 GlobalValue *New = dyn_cast<GlobalValue>(*NewProto);
591 if (auto *F = dyn_cast<Function>(New)) {
594 } else if (auto *V = dyn_cast<GlobalVariable>(New)) {
688 if (auto *SGVar = dyn_cast<GlobalVariable>(SGV)) {
690 } else if (auto *SF = dyn_cast<Function>(SGV)) {
713 if (auto *NewGO = dyn_cast<GlobalObject>(NewGV)) {
722 if (auto *NewF = dyn_cast<Function>(NewGV)) {
906 dyn_cast<GlobalValue>(E->getAggregateElement(2)->stripPointerCasts());
1006 if (Function *F = dyn_cast<Function>(NewGV))
1012 if (auto *GO = dyn_cast<GlobalObject>(NewGV)) {
1090 if (auto *F = dyn_cast<Function>(&Src))
1092 if (auto *GVar = dyn_cast<GlobalVariable>(&Src)) {
lib/Linker/LinkModules.cpp 345 auto *DGVar = dyn_cast<GlobalVariable>(DGV);
346 auto *SGVar = dyn_cast<GlobalVariable>(&GV);
434 if (auto *F = dyn_cast<Function>(&GV)) {
436 } else if (auto *Var = dyn_cast<GlobalVariable>(&GV)) {
443 if (auto *FTy = dyn_cast<FunctionType>(Alias.getValueType())) {
lib/MC/ConstantPools.cpp 41 const MCConstantExpr *C = dyn_cast<MCConstantExpr>(Value);
lib/MC/ELFObjectWriter.cpp 519 !(Value = dyn_cast<MCSymbolRefExpr>(Symbol->getVariableValue())) ||
597 if (const auto *T = dyn_cast<MCTargetExpr>(Expr))
600 if (const MCSymbolRefExpr *Ref = dyn_cast<MCSymbolRefExpr>(Expr)) {
1484 if (const auto *Inner = dyn_cast<MCSymbolRefExpr>(Expr)) {
lib/MC/MCAsmStreamer.cpp 600 if (auto *E = dyn_cast<MCTargetExpr>(Value))
lib/MC/MCAssembler.cpp 504 if (const MCEncodedFragment *EF = dyn_cast<MCEncodedFragment>(&F))
687 if (auto *ELFSec = dyn_cast<const MCSectionELF>(Sec))
821 if (auto *FragWithFixups = dyn_cast<MCDataFragment>(&Frag)) {
826 } else if (auto *FragWithFixups = dyn_cast<MCRelaxableFragment>(&Frag)) {
831 } else if (auto *FragWithFixups = dyn_cast<MCCVDefRangeFragment>(&Frag)) {
834 } else if (auto *FragWithFixups = dyn_cast<MCDwarfLineAddrFragment>(&Frag)) {
837 } else if (auto *AF = dyn_cast<MCAlignFragment>(&Frag)) {
845 dyn_cast<MCDwarfCallFrameFragment>(&Frag)) {
lib/MC/MCCodePadder.cpp 160 dyn_cast<MCPaddingFragment>(CurrFragment);
343 dyn_cast<MCPaddingFragment>(Fragment);
lib/MC/MCExpr.cpp 105 if (const MCConstantExpr *RHSC = dyn_cast<MCConstantExpr>(BE.getRHS())) {
496 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(this)) {
685 const auto *Inner = dyn_cast<MCSymbolRefExpr>(Expr);
791 if (const MCTargetExpr *L = dyn_cast<MCTargetExpr>(ABE->getLHS()))
lib/MC/MCFragment.cpp 336 if (const MCEncodedFragment *EF = dyn_cast<MCEncodedFragment>(this))
lib/MC/MCParser/AsmParser.cpp 1170 if (auto TV = dyn_cast<MCTargetExpr>(V))
3055 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value)) {
3546 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value)) {
3563 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value)) {
3783 if (const auto *MCE = dyn_cast<MCConstantExpr>(Value))
4756 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value)) {
5691 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value);
5707 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value);
lib/MC/MachObjectWriter.cpp 92 dyn_cast<const MCConstantExpr>(S.getVariableValue()))
330 const auto *Ref = dyn_cast<MCSymbolRefExpr>(Value);
lib/MC/WasmObjectWriter.cpp 596 if (auto *Align = dyn_cast<MCAlignFragment>(&Frag)) {
605 } else if (auto *Fill = dyn_cast<MCFillFragment>(&Frag)) {
611 } else if (auto *LEB = dyn_cast<MCLEBFragment>(&Frag)) {
1553 auto *SymRef = dyn_cast<MCSymbolRefExpr>(Expr);
lib/MC/WinCOFFObjectWriter.cpp 343 dyn_cast<MCSymbolRefExpr>(Symbol.getVariableValue());
lib/Object/IRSymtab.cpp 288 auto *Fallback = dyn_cast<GlobalValue>(
lib/Object/ModuleSymbolTable.cpp 195 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) {
215 else if (auto *Var = dyn_cast<GlobalVariable>(GV)) {
lib/Object/SymbolSize.cpp 28 if (auto *M = dyn_cast<MachOObjectFile>(&O))
34 if (auto *M = dyn_cast<MachOObjectFile>(&O))
43 if (const auto *E = dyn_cast<ELFObjectFileBase>(&O)) {
lib/ObjectYAML/ELFEmitter.cpp 409 if (auto RawSec = dyn_cast<ELFYAML::RawContentSection>(Sec)) {
418 } else if (auto S = dyn_cast<ELFYAML::RawContentSection>(Sec)) {
420 } else if (auto S = dyn_cast<ELFYAML::SymtabShndxSection>(Sec)) {
422 } else if (auto S = dyn_cast<ELFYAML::RelocationSection>(Sec)) {
424 } else if (auto S = dyn_cast<ELFYAML::Group>(Sec)) {
426 } else if (auto S = dyn_cast<ELFYAML::MipsABIFlags>(Sec)) {
428 } else if (auto S = dyn_cast<ELFYAML::NoBitsSection>(Sec)) {
434 } else if (auto S = dyn_cast<ELFYAML::DynamicSection>(Sec)) {
436 } else if (auto S = dyn_cast<ELFYAML::SymverSection>(Sec)) {
438 } else if (auto S = dyn_cast<ELFYAML::VerneedSection>(Sec)) {
440 } else if (auto S = dyn_cast<ELFYAML::VerdefSection>(Sec)) {
442 } else if (auto S = dyn_cast<ELFYAML::StackSizesSection>(Sec)) {
444 } else if (auto S = dyn_cast<ELFYAML::HashSection>(Sec)) {
446 } else if (auto S = dyn_cast<ELFYAML::AddrsigSection>(Sec)) {
448 } else if (auto S = dyn_cast<ELFYAML::NoteSection>(Sec)) {
1137 if (auto VerNeed = dyn_cast<ELFYAML::VerneedSection>(Sec.get())) {
1143 } else if (auto VerDef = dyn_cast<ELFYAML::VerdefSection>(Sec.get())) {
lib/ObjectYAML/ELFYAML.cpp 1200 if (auto S = dyn_cast<ELFYAML::RawContentSection>(Section.get()))
1210 dyn_cast<ELFYAML::RawContentSection>(Section.get())) {
1217 if (const auto *SS = dyn_cast<ELFYAML::StackSizesSection>(Section.get())) {
1237 if (const auto *HS = dyn_cast<ELFYAML::HashSection>(Section.get())) {
1260 if (const auto *Sec = dyn_cast<ELFYAML::AddrsigSection>(Section.get())) {
1285 if (const auto *NS = dyn_cast<ELFYAML::NoteSection>(Section.get())) {
lib/ObjectYAML/WasmEmitter.cpp 307 if (auto S = dyn_cast<WasmYAML::DylinkSection>(&Section)) {
309 } else if (auto S = dyn_cast<WasmYAML::NameSection>(&Section)) {
311 } else if (auto S = dyn_cast<WasmYAML::LinkingSection>(&Section)) {
313 } else if (auto S = dyn_cast<WasmYAML::ProducersSection>(&Section)) {
315 } else if (auto S = dyn_cast<WasmYAML::TargetFeaturesSection>(&Section)) {
553 if (auto S = dyn_cast<WasmYAML::CustomSection>(Sec.get()))
562 if (auto S = dyn_cast<WasmYAML::CustomSection>(Sec.get()))
564 else if (auto S = dyn_cast<WasmYAML::TypeSection>(Sec.get()))
566 else if (auto S = dyn_cast<WasmYAML::ImportSection>(Sec.get()))
568 else if (auto S = dyn_cast<WasmYAML::FunctionSection>(Sec.get()))
570 else if (auto S = dyn_cast<WasmYAML::TableSection>(Sec.get()))
572 else if (auto S = dyn_cast<WasmYAML::MemorySection>(Sec.get()))
574 else if (auto S = dyn_cast<WasmYAML::GlobalSection>(Sec.get()))
576 else if (auto S = dyn_cast<WasmYAML::EventSection>(Sec.get()))
578 else if (auto S = dyn_cast<WasmYAML::ExportSection>(Sec.get()))
580 else if (auto S = dyn_cast<WasmYAML::StartSection>(Sec.get()))
582 else if (auto S = dyn_cast<WasmYAML::ElemSection>(Sec.get()))
584 else if (auto S = dyn_cast<WasmYAML::CodeSection>(Sec.get()))
586 else if (auto S = dyn_cast<WasmYAML::DataSection>(Sec.get()))
588 else if (auto S = dyn_cast<WasmYAML::DataCountSection>(Sec.get()))
lib/ProfileData/Coverage/CoverageMappingReader.cpp 682 if (auto *Universal = dyn_cast<MachOUniversalBinary>(Bin.get())) {
754 if (auto *Universal = dyn_cast<MachOUniversalBinary>(Bin.get())) {
774 if (auto *Ar = dyn_cast<Archive>(Bin.get())) {
lib/Remarks/YAMLRemarkParser.cpp 201 auto *Root = dyn_cast<yaml::MappingNode>(YAMLRoot);
249 auto *Args = dyn_cast<yaml::SequenceNode>(RemarkField.getValue());
288 if (auto *Key = dyn_cast<yaml::ScalarNode>(Node.getKey()))
295 auto *Value = dyn_cast<yaml::ScalarNode>(Node.getValue());
311 auto *Value = dyn_cast<yaml::ScalarNode>(Node.getValue());
322 auto *DebugLoc = dyn_cast<yaml::MappingNode>(Node.getValue());
364 auto *ArgMap = dyn_cast<yaml::MappingNode>(&Node);
431 auto *Value = dyn_cast<yaml::ScalarNode>(Node.getValue());
lib/Remarks/YAMLRemarkSerializer.cpp 59 if (auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
84 if (auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
139 if (auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
lib/Support/VirtualFileSystem.cpp 668 if (auto Dir = dyn_cast<detail::InMemoryDirectory>(Node))
670 if (auto File = dyn_cast<detail::InMemoryFile>(Node))
672 if (auto Link = dyn_cast<detail::InMemoryHardLink>(Node))
761 if (auto *NewDir = dyn_cast<detail::InMemoryDirectory>(Node)) {
773 if (auto Link = dyn_cast<detail::InMemoryHardLink>(Node)) {
831 if (auto File = dyn_cast<detail::InMemoryFile>(Node)) {
838 if (auto File = dyn_cast<detail::InMemoryHardLink>(Node)) {
877 if (auto *F = dyn_cast<detail::InMemoryFile>(*Node))
942 if (auto *DirNode = dyn_cast<detail::InMemoryDirectory>(*Node))
1125 auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(E);
1147 const auto *S = dyn_cast<yaml::ScalarNode>(N);
1225 auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(
1230 dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(
1288 auto *M = dyn_cast<yaml::MappingNode>(N);
1359 auto *Contents = dyn_cast<yaml::SequenceNode>(I.getValue());
1488 auto *Top = dyn_cast<yaml::MappingNode>(Root);
1517 auto *Roots = dyn_cast<yaml::SequenceNode>(I.getValue());
1687 auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(From);
1713 if (auto *F = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(E)) {
1774 auto *F = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(*E);
1806 dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(*Result)) {
1830 auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(SrcE);
1842 auto *FE = dyn_cast<RedirectingFileSystem::RedirectingFileEntry>(SrcE);
lib/Support/YAMLTraits.cpp 141 MapHNode *MN = dyn_cast<MapHNode>(CurrentNode);
166 MapHNode *MN = dyn_cast<MapHNode>(CurrentNode);
210 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode))
215 if (ScalarHNode *SN = dyn_cast<ScalarHNode>(CurrentNode)) {
230 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
247 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
269 if (ScalarHNode *SN = dyn_cast<ScalarHNode>(CurrentNode)) {
293 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
305 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
308 if (ScalarHNode *SN = dyn_cast<ScalarHNode>(N.get())) {
327 if (SequenceHNode *SQ = dyn_cast<SequenceHNode>(CurrentNode)) {
339 if (ScalarHNode *SN = dyn_cast<ScalarHNode>(CurrentNode)) {
374 if (ScalarNode *SN = dyn_cast<ScalarNode>(N)) {
381 } else if (BlockScalarNode *BSN = dyn_cast<BlockScalarNode>(N)) {
384 } else if (SequenceNode *SQ = dyn_cast<SequenceNode>(N)) {
393 } else if (MappingNode *Map = dyn_cast<MappingNode>(N)) {
397 ScalarNode *Key = dyn_cast<ScalarNode>(KeyNode);
lib/TableGen/JSONBackend.cpp 51 } else if (auto *Bit = dyn_cast<BitInit>(&I)) {
53 } else if (auto *Bits = dyn_cast<BitsInit>(&I)) {
58 } else if (auto *Int = dyn_cast<IntInit>(&I)) {
60 } else if (auto *Str = dyn_cast<StringInit>(&I)) {
62 } else if (auto *Code = dyn_cast<CodeInit>(&I)) {
64 } else if (auto *List = dyn_cast<ListInit>(&I)) {
79 if (auto *Def = dyn_cast<DefInit>(&I)) {
83 } else if (auto *Var = dyn_cast<VarInit>(&I)) {
87 } else if (auto *VarBit = dyn_cast<VarBitInit>(&I)) {
88 if (auto *Var = dyn_cast<VarInit>(VarBit->getBitVar())) {
94 } else if (auto *Dag = dyn_cast<DagInit>(&I)) {
lib/TableGen/Record.cpp 79 if (const BitsRecTy *BitsTy = dyn_cast<BitsRecTy>(RHS))
106 if (const BitsRecTy *RHSb = dyn_cast<BitsRecTy>(RHS))
135 if (const auto *ListTy = dyn_cast<ListRecTy>(RHS))
141 if (const ListRecTy *RHSl = dyn_cast<ListRecTy>(RHS))
229 const RecordRecTy *RTy = dyn_cast<RecordRecTy>(RHS);
266 if (RecordRecTy *RecTy1 = dyn_cast<RecordRecTy>(T1)) {
267 if (RecordRecTy *RecTy2 = dyn_cast<RecordRecTy>(T2))
276 if (ListRecTy *ListTy1 = dyn_cast<ListRecTy>(T1)) {
277 if (ListRecTy *ListTy2 = dyn_cast<ListRecTy>(T2)) {
325 if (auto *BRT = dyn_cast<BitsRecTy>(Ty)) {
371 if (auto *BRT = dyn_cast<BitsRecTy>(Ty)) {
381 if (auto *Bit = dyn_cast<BitInit>(getBit(i)))
436 if (VarBitInit *CurBitVar = dyn_cast<VarBitInit>(CurBit)) {
488 if (auto *BRT = dyn_cast<BitsRecTy>(Ty)) {
602 if (auto *LRT = dyn_cast<ListRecTy>(Ty)) {
639 DefInit *DI = dyn_cast<DefInit>(getElement(i));
716 if (StringInit *LHSs = dyn_cast<StringInit>(LHS))
719 if (DefInit *LHSd = dyn_cast<DefInit>(LHS))
722 if (IntInit *LHSi = dyn_cast<IntInit>(LHS))
725 if (StringInit *Name = dyn_cast<StringInit>(LHS)) {
765 if (ListInit *LHSl = dyn_cast<ListInit>(LHS)) {
772 if (ListInit *LHSl = dyn_cast<ListInit>(LHS)) {
781 if (ListInit *LHSl = dyn_cast<ListInit>(LHS))
786 if (ListInit *LHSl = dyn_cast<ListInit>(LHS))
788 if (StringInit *LHSs = dyn_cast<StringInit>(LHS))
854 if (const StringInit *I0s = dyn_cast<StringInit>(I0))
855 if (const StringInit *I1s = dyn_cast<StringInit>(I1))
872 if (const ListInit *LHSList = dyn_cast<ListInit>(LHS))
873 if (const ListInit *RHSList = dyn_cast<ListInit>(RHS))
885 DagInit *LHSs = dyn_cast<DagInit>(LHS);
886 DagInit *RHSs = dyn_cast<DagInit>(RHS);
888 DefInit *LOp = dyn_cast<DefInit>(LHSs->getOperator());
889 DefInit *ROp = dyn_cast<DefInit>(RHSs->getOperator());
912 ListInit *LHSs = dyn_cast<ListInit>(LHS);
913 ListInit *RHSs = dyn_cast<ListInit>(RHS);
923 TypedInit *Value = dyn_cast<TypedInit>(LHS);
924 IntInit *Size = dyn_cast<IntInit>(RHS);
932 StringInit *LHSs = dyn_cast<StringInit>(LHS);
933 StringInit *RHSs = dyn_cast<StringInit>(RHS);
966 StringInit *LHSs = dyn_cast<StringInit>(LHS);
967 StringInit *RHSs = dyn_cast<StringInit>(RHS);
1093 if (DagInit *Argd = dyn_cast<DagInit>(Arg))
1111 if (DagInit *MHSd = dyn_cast<DagInit>(MHS))
1114 if (ListInit *MHSl = dyn_cast<ListInit>(MHS)) {
1131 DefInit *LHSd = dyn_cast<DefInit>(LHS);
1132 VarInit *LHSv = dyn_cast<VarInit>(LHS);
1133 StringInit *LHSs = dyn_cast<StringInit>(LHS);
1135 DefInit *MHSd = dyn_cast<DefInit>(MHS);
1136 VarInit *MHSv = dyn_cast<VarInit>(MHS);
1137 StringInit *MHSs = dyn_cast<StringInit>(MHS);
1139 DefInit *RHSd = dyn_cast<DefInit>(RHS);
1140 VarInit *RHSv = dyn_cast<VarInit>(RHS);
1141 StringInit *RHSs = dyn_cast<StringInit>(RHS);
1190 ListInit *MHSl = dyn_cast<ListInit>(MHS);
1191 ListInit *RHSl = dyn_cast<ListInit>(RHS);
1206 Children.emplace_back(Node, dyn_cast<StringInit>(Name));
1293 if (ListInit *LI = dyn_cast<ListInit>(List)) {
1358 if (TypedInit *TI = dyn_cast<TypedInit>(Expr)) {
1395 if (RecordRecTy *RecordType = dyn_cast<RecordRecTy>(getType())) {
1417 BitsRecTy *T = dyn_cast<BitsRecTy>(getType());
1451 ListRecTy *T = dyn_cast<ListRecTy>(getType());
1542 if (ListInit *List = dyn_cast<ListInit>(NewTI)) {
1567 if (auto *RRT = dyn_cast<RecordRecTy>(Ty))
1732 if (DefInit *DI = dyn_cast<DefInit>(Rec)) {
1934 if (DefInit *DefI = dyn_cast<DefInit>(Val))
2002 if (BitsRecTy *BTy = dyn_cast<BitsRecTy>(getType())) {
2089 if (TypedInit *VRT = dyn_cast<TypedInit>(VR))
2175 if (StringInit *SI = dyn_cast<StringInit>(R->getValue()))
2177 if (CodeInit *CI = dyn_cast<CodeInit>(R->getValue()))
2190 if (BitsInit *BI = dyn_cast<BitsInit>(R->getValue()))
2202 if (ListInit *LI = dyn_cast<ListInit>(R->getValue()))
2213 if (DefInit *DI = dyn_cast<DefInit>(I))
2228 if (IntInit *II = dyn_cast<IntInit>(R->getValue()))
2241 if (IntInit *II = dyn_cast<IntInit>(I))
2257 if (StringInit *SI = dyn_cast<StringInit>(I))
2274 if (DefInit *DI = dyn_cast<DefInit>(R->getValue()))
2286 if (DefInit *DI = dyn_cast<DefInit>(R->getValue()))
2301 if (BitInit *BI = dyn_cast<BitInit>(R->getValue()))
2318 if (BitInit *BI = dyn_cast<BitInit>(R->getValue()))
2330 if (DagInit *DI = dyn_cast<DagInit>(R->getValue()))
lib/TableGen/SetTheory.cpp 90 IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[1]);
185 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[3])) {
193 if (StringInit *SI = dyn_cast<StringInit>(Expr->arg_begin()[0]))
199 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[1]))
206 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[2]))
284 if (DefInit *Def = dyn_cast<DefInit>(Expr)) {
292 if (ListInit *LI = dyn_cast<ListInit>(Expr))
296 DagInit *DagExpr = dyn_cast<DagInit>(Expr);
299 DefInit *OpInit = dyn_cast<DefInit>(DagExpr->getOperator());
lib/TableGen/TGParser.cpp 76 if (auto VBI = dyn_cast<VarBitInit>(Bit)) {
77 if (auto VI = dyn_cast<VarInit>(VBI->getBitVar())) {
125 if (BinOpInit *BinOp = dyn_cast<BinOpInit>(NewName))
174 if (VarInit *VI = dyn_cast<VarInit>(V))
183 BitsInit *CurVal = dyn_cast<BitsInit>(RV->getValue());
213 if (BitsInit *BI = dyn_cast<BitsInit>(V))
216 else if (TypedInit *TI = dyn_cast<TypedInit>(V))
378 auto LI = dyn_cast<ListInit>(List);
874 VarInit *IterVar = dyn_cast<VarInit>(L->IterVar);
957 ListInit *LHSl = dyn_cast<ListInit>(LHS);
958 StringInit *LHSs = dyn_cast<StringInit>(LHS);
959 TypedInit *LHSt = dyn_cast<TypedInit>(LHS);
965 ListRecTy *LType = dyn_cast<ListRecTy>(LHSt->getType());
966 StringRecTy *SType = dyn_cast<StringRecTy>(LHSt->getType());
988 TypedInit *Itemt = dyn_cast<TypedInit>(Item);
997 ListRecTy *LType = dyn_cast<ListRecTy>(LHSt->getType());
1292 TypedInit *MHSt = dyn_cast<TypedInit>(MHS);
1302 if (ListRecTy *InListTy = dyn_cast<ListRecTy>(MHSt->getType())) {
1305 if (ListRecTy *OutListTy = dyn_cast<ListRecTy>(ItemType)) {
1314 } else if (DagRecTy *InDagTy = dyn_cast<DagRecTy>(MHSt->getType())) {
1353 TypedInit *RHSt = dyn_cast<TypedInit>(RHS);
1427 TypedInit *MHSt = dyn_cast<TypedInit>(MHS);
1438 TypedInit *RHSt = dyn_cast<TypedInit>(RHS);
1460 if (TypedInit *MHSt = dyn_cast<TypedInit>(MHS))
1462 if (BitsInit *MHSbits = dyn_cast<BitsInit>(MHS))
1467 if (TypedInit *RHSt = dyn_cast<TypedInit>(RHS))
1469 if (BitsInit *RHSbits = dyn_cast<BitsInit>(RHS))
1494 TypedInit *RHSt = dyn_cast<TypedInit>(RHS);
1522 TypedInit *Start = dyn_cast<TypedInit>(StartUntyped);
1539 TypedInit *List = dyn_cast<TypedInit>(ListUntyped);
1546 ListRecTy *ListType = dyn_cast<ListRecTy>(List->getType());
1612 TypedInit *Expr = dyn_cast<TypedInit>(ExprUntyped);
1722 if (TypedInit *Vt = dyn_cast<TypedInit>(V))
1724 if (BitsInit *Vbits = dyn_cast<BitsInit>(V))
1856 if (TypedInit *TI = dyn_cast<TypedInit>(Args[i])) {
1904 if (BitsInit *BI = dyn_cast<BitsInit>(Vals[i])) {
1910 if (VarInit *VI = dyn_cast<VarInit>(Vals[i])) {
1911 if (BitsRecTy *BitsRec = dyn_cast<BitsRecTy>(VI->getType())) {
1938 ListRecTy *ListType = dyn_cast<ListRecTy>(ItemType);
1979 TypedInit *TArg = dyn_cast<TypedInit>(V);
2178 TypedInit *LHS = dyn_cast<TypedInit>(Result);
2204 auto CastLHS = dyn_cast<TypedInit>(
2232 RHS = dyn_cast<TypedInit>(RHSResult);
2239 auto CastRHS = dyn_cast<TypedInit>(
2471 TypedInit *TI = dyn_cast<TypedInit>(I);
lib/Target/AArch64/AArch64FalkorHWPFFix.cpp 155 LoadInst *LoadI = dyn_cast<LoadInst>(&I);
164 const SCEVAddRecExpr *LSCEVAddRec = dyn_cast<SCEVAddRecExpr>(LSCEV);
lib/Target/AArch64/AArch64FastISel.cpp 315 if (const auto *LI = dyn_cast<LoadInst>(I->getOperand(0)))
319 if (const auto *Arg = dyn_cast<Argument>(I->getOperand(0)))
531 if (const auto *CPN = dyn_cast<ConstantPointerNull>(C)) {
539 if (const auto *CI = dyn_cast<ConstantInt>(C))
541 else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
543 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
567 if (const auto *MI = dyn_cast<MulOperator>(I)) {
568 if (const auto *C = dyn_cast<ConstantInt>(MI->getOperand(0)))
571 if (const auto *C = dyn_cast<ConstantInt>(MI->getOperand(1)))
583 if (const Instruction *I = dyn_cast<Instruction>(Obj)) {
591 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
596 if (auto *Ty = dyn_cast<PointerType>(Obj->getType()))
638 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
688 if (const ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
705 if (const ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
715 const auto *CI = dyn_cast<ConstantInt>(U->getOperand(1));
738 if (const auto *I = dyn_cast<Instruction>(Src)) {
741 if (const auto *ZE = dyn_cast<ZExtInst>(I)) {
747 } else if (const auto *SE = dyn_cast<SExtInst>(I)) {
757 if (const auto *AI = dyn_cast<BinaryOperator>(Src))
762 if (const auto *C = dyn_cast<ConstantInt>(LHS))
766 if (const auto *C = dyn_cast<ConstantInt>(RHS))
797 if (const auto *C = dyn_cast<ConstantInt>(LHS))
822 if (const auto *I = dyn_cast<Instruction>(Src)) {
825 if (const auto *ZE = dyn_cast<ZExtInst>(I)) {
831 } else if (const auto *SE = dyn_cast<SExtInst>(I)) {
857 if (const auto *C = dyn_cast<ConstantInt>(LHS))
861 if (const auto *C = dyn_cast<ConstantInt>(RHS))
885 if (const auto *ZE = dyn_cast<ZExtInst>(U)) {
890 } else if (const auto *SE = dyn_cast<SExtInst>(U)) {
933 if (const auto *I = dyn_cast<Instruction>(V)) {
937 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
963 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
1197 if (const auto *SI = dyn_cast<BinaryOperator>(LHS))
1213 if (const auto *C = dyn_cast<ConstantInt>(RHS)) {
1221 } else if (const auto *C = dyn_cast<Constant>(RHS))
1232 if (const auto *SI = dyn_cast<BinaryOperator>(RHS))
1233 if (const auto *C = dyn_cast<ConstantInt>(SI->getOperand(1)))
1257 if (const auto *C = dyn_cast<ConstantInt>(MulLHS))
1277 if (const auto *SI = dyn_cast<BinaryOperator>(RHS)) {
1278 if (const auto *C = dyn_cast<ConstantInt>(SI->getOperand(1))) {
1526 if (const auto *CFP = dyn_cast<ConstantFP>(RHS))
1620 if (const auto *SI = dyn_cast<ShlOperator>(LHS))
1630 if (const auto *C = dyn_cast<ConstantInt>(RHS)) {
1643 if (const auto *C = dyn_cast<ConstantInt>(MulLHS))
1663 if (const auto *SI = dyn_cast<ShlOperator>(RHS))
1664 if (const auto *C = dyn_cast<ConstantInt>(SI->getOperand(1))) {
1990 if (const Argument *Arg = dyn_cast<Argument>(SV)) {
1995 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(SV)) {
2011 if (const auto *ZE = dyn_cast<ZExtInst>(I->use_begin()->getUser())) {
2016 } else if (const auto *SE = dyn_cast<SExtInst>(I->use_begin()->getUser())) {
2192 if (const Argument *Arg = dyn_cast<Argument>(PtrV)) {
2197 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(PtrV)) {
2206 if (const auto *CI = dyn_cast<ConstantInt>(Op0)) {
2209 } else if (const auto *CF = dyn_cast<ConstantFP>(Op0)) {
2338 if (const auto *AI = dyn_cast<BinaryOperator>(LHS))
2343 if (const auto *C = dyn_cast<ConstantInt>(AndLHS))
2347 if (const auto *C = dyn_cast<ConstantInt>(AndRHS))
2431 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
2493 } else if (const auto *CI = dyn_cast<ConstantInt>(BI->getCondition())) {
2661 if (auto *CI = dyn_cast<ConstantInt>(SI->getTrueValue())) {
2672 } else if (auto *CI = dyn_cast<ConstantInt>(SI->getFalseValue())) {
3416 if (const auto *C = dyn_cast<ConstantInt>(RHS))
3421 if (const auto *C = dyn_cast<ConstantInt>(RHS))
3708 if (const auto *C = dyn_cast<ConstantInt>(RHS))
3715 if (const auto *C = dyn_cast<ConstantInt>(RHS))
4526 const auto *LI = dyn_cast<LoadInst>(I->getOperand(0));
4600 if (const auto *Arg = dyn_cast<Argument>(I->getOperand(0))) {
4688 if (const auto *C = dyn_cast<ConstantInt>(Src0))
4693 if (const auto *C = dyn_cast<ConstantInt>(Src1))
4698 if (const auto *ZExt = dyn_cast<ZExtInst>(Src0)) {
4707 } else if (const auto *SExt = dyn_cast<SExtInst>(Src0)) {
4759 if (const auto *C = dyn_cast<ConstantInt>(I->getOperand(1))) {
4765 if (const auto *ZExt = dyn_cast<ZExtInst>(Op0)) {
4774 } else if (const auto *SExt = dyn_cast<SExtInst>(Op0)) {
5035 if (const auto *CI = dyn_cast<ConstantInt>(Idx)) {
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp 247 if (const ConstantSDNode *C = dyn_cast<const ConstantSDNode>(N)) {
793 dyn_cast<GlobalAddressSDNode>(N.getOperand(1).getNode());
lib/Target/AArch64/AArch64ISelLowering.cpp 1973 if (ConstantSDNode *RHSC = dyn_cast<ConstantSDNode>(RHS.getNode())) {
3692 if (LoadSDNode *L = dyn_cast<LoadSDNode>(*U))
7436 dyn_cast<BuildVectorSDNode>(Op.getOperand(1).getNode());
7440 BVN = dyn_cast<BuildVectorSDNode>(Op.getOperand(0).getNode());
7966 BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(Op.getNode());
8057 BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(RHS.getNode());
8475 MemSDNode *Mem = dyn_cast<MemSDNode>(Load);
8687 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
9842 dyn_cast<BuildVectorSDNode>(N->getOperand(1).getNode());
10919 if (ConstantSDNode *CInc = dyn_cast<ConstantSDNode>(Inc.getNode())) {
11092 if (ConstantSDNode *CInc = dyn_cast<ConstantSDNode>(Inc.getNode())) {
11886 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
11889 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
11907 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
11910 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
12296 if (Function *F = dyn_cast<Function>(SecurityCheckCookie.getCallee())) {
12341 ConstantInt* Mask = dyn_cast<ConstantInt>(AndI.getOperand(1));
lib/Target/AArch64/AArch64InstrInfo.cpp 5440 Callee = dyn_cast<Function>(MOP.getGlobal());
lib/Target/AArch64/AArch64InstructionSelector.cpp 1135 if (auto *GV = dyn_cast<GlobalValue>(V)) {
lib/Target/AArch64/AArch64PromoteConstant.cpp 305 const CallInst *CI = dyn_cast<const CallInst>(Instr);
360 if (PHINode *PhiInst = dyn_cast<PHINode>(&User))
lib/Target/AArch64/AArch64StackTagging.cpp 253 if (VectorType *VecTy = dyn_cast<VectorType>(V->getType())) {
531 if (auto *AI = dyn_cast<AllocaInst>(I)) {
536 if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(I)) {
544 auto *II = dyn_cast<IntrinsicInst>(I);
636 dyn_cast<ConstantInt>(Start->getArgOperand(0))->getZExtValue();
lib/Target/AArch64/AArch64Subtarget.cpp 255 auto *F = dyn_cast<Function>(GV);
lib/Target/AArch64/AArch64TargetTransformInfo.cpp 280 if (auto *Cast = dyn_cast<CastInst>(SingleUser->getOperand(1)))
730 LoadInst *LMemI = dyn_cast<LoadInst>(&I);
739 const SCEVAddRecExpr *LSCEVAddRec = dyn_cast<SCEVAddRecExpr>(LSCEV);
796 StructType *ST = dyn_cast<StructType>(ExpectedType);
881 if (const GetElementPtrInst *GEPInst = dyn_cast<GetElementPtrInst>(U)) {
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp 634 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
656 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
680 auto *MCE = dyn_cast<MCConstantExpr>(getImm());
728 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
740 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
753 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
774 if (auto *CE = dyn_cast<MCConstantExpr>(getShiftedImmVal()))
778 if (auto *CE = dyn_cast<MCConstantExpr>(getImm())) {
895 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
905 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
972 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
983 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1136 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1388 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val)) {
1404 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val)) {
1418 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
1568 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
1582 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
1634 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
1648 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
1662 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(getImm());
2377 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
2792 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
2993 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
3104 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
3532 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal)) {
4505 const MCConstantExpr *Op3CE = dyn_cast<MCConstantExpr>(Op3.getImm());
4537 const MCConstantExpr *LSBCE = dyn_cast<MCConstantExpr>(LSBOp.getImm());
4538 const MCConstantExpr *WidthCE = dyn_cast<MCConstantExpr>(WidthOp.getImm());
4593 const MCConstantExpr *Op3CE = dyn_cast<MCConstantExpr>(Op3.getImm());
4594 const MCConstantExpr *Op4CE = dyn_cast<MCConstantExpr>(Op4.getImm());
4657 const MCConstantExpr *Op3CE = dyn_cast<MCConstantExpr>(Op3.getImm());
4658 const MCConstantExpr *Op4CE = dyn_cast<MCConstantExpr>(Op4.getImm());
5478 if (const AArch64MCExpr *AE = dyn_cast<AArch64MCExpr>(Expr)) {
5483 const MCSymbolRefExpr *SE = dyn_cast<MCSymbolRefExpr>(Expr);
5580 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm());
5734 auto *MCE = dyn_cast<MCConstantExpr>(ImmVal);
lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp 1344 dyn_cast<MCConstantExpr>(MI->getOperand(OpNum).getExpr());
lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp 283 if (const AArch64MCExpr *A64E = dyn_cast<AArch64MCExpr>(Expr)) {
lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp 77 if (const AArch64MCExpr *A64E = dyn_cast<AArch64MCExpr>(Expr)) {
91 if (const AArch64MCExpr *A64E = dyn_cast<AArch64MCExpr>(Expr)) {
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp 101 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Base)) {
104 } else if (const Argument *Arg = dyn_cast<Argument>(Base)) {
lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp 71 if (Instruction *I = dyn_cast<Instruction>(U)) {
94 if (Function* F = dyn_cast<Function>(A.getAliasee())) {
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp 119 if (const auto *CE = dyn_cast<ConstantExpr>(C)) {
307 if (const AddrSpaceCastInst *ASC = dyn_cast<AddrSpaceCastInst>(&I)) {
lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp 134 Instruction *PtrI = dyn_cast<Instruction>(Ptr);
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp 229 const IntegerType *IntTy = dyn_cast<IntegerType>(T);
233 if (const VectorType *VT = dyn_cast<VectorType>(T)) {
311 if (Instruction *Inst = dyn_cast<Instruction>(ExtRes)) {
318 if (const auto *ExactOp = dyn_cast<PossiblyExactOperator>(&I))
437 VectorType *VT = dyn_cast<VectorType>(V->getType());
527 const ConstantFP *CNum = dyn_cast<ConstantFP>(Num);
578 if (VectorType *VT = dyn_cast<VectorType>(Ty)) {
905 if (VectorType *VT = dyn_cast<VectorType>(Ty)) {
lib/Target/AMDGPU/AMDGPUFixFunctionBitcasts.cpp 37 auto Callee = dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts());
lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp 349 if (auto PtrTy = dyn_cast<PointerType>(Ty)) {
378 if (auto PtrTy = dyn_cast<PointerType>(Ty))
766 if (auto PtrTy = dyn_cast<PointerType>(Ty)) {
805 if (auto PtrTy = dyn_cast<PointerType>(Ty))
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp 524 if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N))
527 if (const ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N))
531 if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N))
534 if (const ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N))
817 if (ConstantFPSDNode *FP = dyn_cast<ConstantFPSDNode>(N))
1621 if (MemSDNode *MN = dyn_cast<MemSDNode>(N))
2717 MachineSDNode *MachineNode = dyn_cast<MachineSDNode>(Node);
lib/Target/AMDGPU/AMDGPUISelLowering.cpp 1063 if (LoadSDNode *L = dyn_cast<LoadSDNode>(*U)) {
1184 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
2814 if (MemSDNode *M = dyn_cast<MemSDNode>(U)) {
lib/Target/AMDGPU/AMDGPUInline.cpp 133 PointerType *Ty = dyn_cast<PointerType>(PtrArg->getType());
139 if (const AllocaInst *AI = dyn_cast<AllocaInst>(PtrArg)) {
lib/Target/AMDGPU/AMDGPUInstrInfo.cpp 45 if (const Argument *Arg = dyn_cast<Argument>(Ptr))
48 const Instruction *I = dyn_cast<Instruction>(Ptr);
lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp 1526 const Instruction *I = dyn_cast<Instruction>(Ptr);
lib/Target/AMDGPU/AMDGPULibCalls.cpp 226 if (Function *F = dyn_cast<Function>(Callee.getCallee()))
235 if (Function *F = dyn_cast<Function>(Callee.getCallee()))
492 if (auto Op = dyn_cast<FPMathOperator>(CI))
654 if (const FPMathOperator *FPOp = dyn_cast<const FPMathOperator>(CI))
746 if (ConstantDataVector *CV = dyn_cast<ConstantDataVector>(opr0)) {
749 ConstantFP *eltval = dyn_cast<ConstantFP>(
784 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) {
824 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) {
843 ConstantFP *CF0 = dyn_cast<ConstantFP>(opr0);
844 ConstantFP *CF1 = dyn_cast<ConstantFP>(opr1);
884 CZero = dyn_cast<ConstantAggregateZero>(opr1);
887 CF = dyn_cast<ConstantFP>(opr1);
888 CINT = dyn_cast<ConstantInt>(opr1);
890 VectorType *VTy = dyn_cast<VectorType>(opr0->getType());
893 ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(opr1);
1027 CF = dyn_cast<ConstantFP>(opr0);
1044 ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(opr0);
1080 if (const ConstantFP *CF = dyn_cast<ConstantFP>(opr1)) {
1089 if (const ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(opr1)) {
1132 if (const VectorType *vTy = dyn_cast<VectorType>(rTy))
1159 ConstantInt *CINT = dyn_cast<ConstantInt>(opr1);
1214 ConstantFP *CF0 = dyn_cast<ConstantFP>(opr0);
1215 ConstantFP *CF1 = dyn_cast<ConstantFP>(opr1);
1238 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr2)) {
1297 LoadInst *LI = dyn_cast<LoadInst>(CArgVal);
1631 if ((copr0 = dyn_cast<Constant>(aCI->getArgOperand(0))) == nullptr)
1636 if ((copr1 = dyn_cast<Constant>(aCI->getArgOperand(1))) == nullptr) {
1643 if ((copr2 = dyn_cast<Constant>(aCI->getArgOperand(2))) == nullptr)
lib/Target/AMDGPU/AMDGPULibFunc.cpp 1019 if (auto *MF = dyn_cast<AMDGPUMangledLibFunc>(F.Impl.get()))
1021 else if (auto *UMF = dyn_cast<AMDGPUUnmangledLibFunc>(F.Impl.get()))
lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp 59 ConstantInt *CI = dyn_cast<ConstantInt>(Size);
122 auto *CI = dyn_cast<CallInst>(U);
lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp 107 if (PointerType *PT = dyn_cast<PointerType>(ArgTy)) {
123 VectorType *VT = dyn_cast<VectorType>(ArgTy);
lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp 104 auto *BCI = dyn_cast<BitCastInst>(*U->user_begin());
108 auto *Load = dyn_cast<LoadInst>(*BCI->user_begin());
176 auto *ZextGroupSize = dyn_cast<ZExtInst>(U);
181 auto *SI = dyn_cast<SelectInst>(ZextUser);
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp 234 auto *CE = dyn_cast<ConstantExpr>(CV);
lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp 82 if (auto *CI = dyn_cast<CallInst>(&*U)) {
93 if (auto *I = dyn_cast<Instruction>(U)) {
lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp 125 if (auto LI = dyn_cast<LoadInst>(Inst)) {
128 if (auto SI = dyn_cast<StoreInst>(Inst)) {
131 if (auto AI = dyn_cast<AtomicCmpXchgInst>(Inst)) {
134 if (auto AI = dyn_cast<AtomicRMWInst>(Inst)) {
137 if (auto MI = dyn_cast<AnyMemIntrinsic>(Inst)) {
160 if (auto LD = dyn_cast<LoadInst>(V)) {
169 if (auto GEP = dyn_cast<GetElementPtrInst>(V)) {
177 if (auto U = dyn_cast<UnaryInstruction>(V)) {
182 if (auto BO = dyn_cast<BinaryOperator>(V)) {
188 if (auto S = dyn_cast<SelectInst>(V)) {
194 if (auto E = dyn_cast<ExtractElementInst>(V)) {
241 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
302 if (auto PT = dyn_cast<PointerType>(V->getType())) {
311 if (auto PT = dyn_cast<PointerType>(V->getType()))
343 if (auto PT = dyn_cast<PointerType>(V->getType())) {
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp 138 const PointerType *PT = dyn_cast<PointerType>(OpType);
163 if (auto LI = dyn_cast<LoadInst>(Op)) {
166 if (auto SI = dyn_cast<StoreInst>(Use)) {
173 if (auto I = dyn_cast<Instruction>(Op)) {
179 ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Op);
182 GlobalVariable *GVar = dyn_cast<GlobalVariable>(ConstExpr->getOperand(0));
187 if (auto CA = dyn_cast<ConstantDataArray>(Init)) {
220 VectorType *LLVMVecType = llvm::dyn_cast<llvm::VectorType>(ArgType);
239 ConstantFP *FpCons = dyn_cast<ConstantFP>(Arg);
243 FPExtInst *FpExt = dyn_cast<FPExtInst>(Arg);
250 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
252 dyn_cast<GlobalVariable>(ConstExpr->getOperand(0));
255 ConstantDataArray *CA = dyn_cast<ConstantDataArray>(Init);
362 dyn_cast<ICmpInst>(Builder.CreateICmpNE(pcall, zeroIntPtr, ""));
382 dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
414 ConstantFP *fpCons = dyn_cast<ConstantFP>(Arg);
423 FPExtInst *FpExt = dyn_cast<FPExtInst>(Arg);
436 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
438 dyn_cast<GlobalVariable>(ConstExpr->getOperand(0));
441 ConstantDataArray *CA = dyn_cast<ConstantDataArray>(Init);
500 IType = dyn_cast<Type>(Type::getInt64Ty(ArgType->getContext()));
505 IType = dyn_cast<Type>(Type::getInt64Ty(ArgType->getContext()));
508 IType = dyn_cast<Type>(Type::getInt32Ty(ArgType->getContext()));
511 IType = dyn_cast<Type>(Type::getInt16Ty(ArgType->getContext()));
517 IType = dyn_cast<Type>(Type::getInt64Ty(ArgType->getContext()));
520 IType = dyn_cast<Type>(Type::getInt32Ty(ArgType->getContext()));
525 IType = dyn_cast<Type>(VectorType::get(IType, EleCount));
548 BufferIdx = dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
575 if (auto *CI = dyn_cast<CallInst>(U.getUser())) {
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp 168 if (AllocaInst *AI = dyn_cast<AllocaInst>(&I))
317 ConstantInt *I0 = dyn_cast<ConstantInt>(GEP->getOperand(1));
366 SequentialType *AllocaTy = dyn_cast<SequentialType>(AT);
385 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser);
413 VectorType *VectorTy = dyn_cast<VectorType>(AllocaTy);
468 IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
530 if (CallInst *CI = dyn_cast<CallInst>(User)) {
542 if (LoadInst *LI = dyn_cast<LoadInst>(UseInst)) {
549 if (StoreInst *SI = dyn_cast<StoreInst>(UseInst)) {
556 } else if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(UseInst)) {
559 } else if (AtomicCmpXchgInst *CAS = dyn_cast<AtomicCmpXchgInst>(UseInst)) {
566 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) {
586 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) {
595 if (SelectInst *SI = dyn_cast<SelectInst>(UseInst)) {
601 if (PHINode *Phi = dyn_cast<PHINode>(UseInst)) {
633 PointerType *PtrTy = dyn_cast<PointerType>(ParamTy);
655 const Instruction *Use = dyn_cast<Instruction>(U);
830 CallInst *Call = dyn_cast<CallInst>(V);
832 if (ICmpInst *CI = dyn_cast<ICmpInst>(V)) {
859 if (SelectInst *SI = dyn_cast<SelectInst>(V)) {
865 } else if (PHINode *Phi = dyn_cast<PHINode>(V)) {
lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp 203 Instruction *I = dyn_cast<Instruction>(U);
206 CallBase *CI = dyn_cast<CallBase>(I);
lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp 140 StoreInst *SI = dyn_cast<StoreInst>(U.getUser());
145 auto *BCI = dyn_cast<BitCastInst>(U.getUser());
190 PointerType *ArgTy = dyn_cast<PointerType>(Arg.getType());
210 VectorType *VT0 = dyn_cast<VectorType>(Ty0);
211 VectorType *VT1 = dyn_cast<VectorType>(Ty1);
266 if (ReturnInst *RI = dyn_cast<ReturnInst>(&BB.back()))
309 SI = dyn_cast<StoreInst>(Q.getInst());
402 if (StructType *CT = dyn_cast<StructType>(EltTy)) {
lib/Target/AMDGPU/AMDGPUSubtarget.cpp 439 if (auto *CI = dyn_cast<CallInst>(I)) {
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp 387 if (const Function *F = dyn_cast<Function>(&GV))
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp 74 const Instruction *I = dyn_cast<Instruction>(Cond);
81 if (const PHINode *PHI = dyn_cast<PHINode>(V)) {
118 if (const BranchInst *Br = dyn_cast<BranchInst>(&I)) {
137 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
156 dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr, DL));
179 const Instruction *Inst = dyn_cast<Instruction>(Op);
319 auto *Ordering = dyn_cast<ConstantInt>(Inst->getArgOperand(2));
320 auto *Volatile = dyn_cast<ConstantInt>(Inst->getArgOperand(4));
548 if (const Argument *A = dyn_cast<Argument>(V))
557 if (const LoadInst *Load = dyn_cast<LoadInst>(V))
568 if (const IntrinsicInst *Intrinsic = dyn_cast<IntrinsicInst>(V))
579 if (const IntrinsicInst *Intrinsic = dyn_cast<IntrinsicInst>(V)) {
699 if (const ExtractElementInst *EE = dyn_cast<ExtractElementInst>(U)) {
700 ConstantInt *CI = dyn_cast<ConstantInt>(EE->getOperand(1));
709 if (const InsertElementInst *IE = dyn_cast<InsertElementInst>(U)) {
710 ConstantInt *CI = dyn_cast<ConstantInt>(IE->getOperand(2));
718 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(U)) {
721 if (auto *FPMO = dyn_cast<FPMathOperator>(II))
lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp 182 } else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp 221 const auto *C = dyn_cast<MCConstantExpr>(MO.getExpr());
332 if (const auto *C = dyn_cast<MCConstantExpr>(Op.getExpr()))
lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp 170 auto Inst = dyn_cast<CallInst>(Use.getUser());
203 auto Inst = dyn_cast<CallInst>(Use.getUser());
lib/Target/AMDGPU/SIAnnotateControlFlow.cpp 231 if (Instruction *Inst = dyn_cast<Instruction>(Cond)) {
333 BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator());
351 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
lib/Target/AMDGPU/SIISelLowering.cpp 987 const ConstantInt *Vol = dyn_cast<ConstantInt>(CI.getOperand(4));
2143 dyn_cast<PointerType>(FType->getParamType(Ins[i].getOrigArgIndex()));
10956 if (const IntrinsicInst *Intrinsic = dyn_cast<IntrinsicInst>(U)) {
10991 if (const IntrinsicInst *Intrinsic = dyn_cast<IntrinsicInst>(V)) {
10999 if (const ExtractValueInst *ExtValue = dyn_cast<ExtractValueInst>(V)) {
11001 dyn_cast<IntrinsicInst>(ExtValue->getOperand(0))) {
11015 if (const CallInst *CI = dyn_cast<CallInst>(V)) {
lib/Target/AMDGPU/Utils/AMDGPUPALMetadata.cpp 39 auto MDN = dyn_cast<MDTuple>(NamedMD->getOperand(0));
54 auto Tuple = dyn_cast<MDTuple>(NamedMD->getOperand(0));
lib/Target/ARC/MCTargetDesc/ARCInstPrinter.cpp 111 if (const auto *CE = dyn_cast<MCConstantExpr>(Expr)) {
117 if (const auto *BE = dyn_cast<MCBinaryExpr>(Expr)) {
118 SRE = dyn_cast<MCSymbolRefExpr>(BE->getLHS());
119 const auto *CE = dyn_cast<MCConstantExpr>(BE->getRHS());
123 SRE = dyn_cast<MCSymbolRefExpr>(Expr);
lib/Target/ARM/ARMAsmPrinter.cpp 83 const GlobalValue *GV = dyn_cast<GlobalValue>(CV->stripPointerCasts());
lib/Target/ARM/ARMCodeGenPrepare.cpp 217 if (auto *Ld = dyn_cast<LoadInst>(V))
245 else if (auto *Call = dyn_cast<CallInst>(V))
247 else if (auto *Trunc = dyn_cast<TruncInst>(V))
266 if (auto *Store = dyn_cast<StoreInst>(V))
268 if (auto *Return = dyn_cast<ReturnInst>(V))
270 if (auto *ZExt = dyn_cast<ZExtInst>(V))
272 if (auto *Switch = dyn_cast<SwitchInst>(V))
274 if (auto *ICmp = dyn_cast<ICmpInst>(V))
363 if (auto *Const = dyn_cast<ConstantInt>(CI->getOperand(0)))
365 else if (auto *Const = dyn_cast<ConstantInt>(CI->getOperand(1)))
400 auto *I = dyn_cast<Instruction>(V);
447 Instruction *InstTo = dyn_cast<Instruction>(To);
466 if (auto *I = dyn_cast<Instruction>(From))
491 if (auto *NewInst = dyn_cast<Instruction>(NewVal)) {
510 if (auto *I = dyn_cast<Instruction>(V))
514 if (auto *I = dyn_cast<Instruction>(ZExt)) {
529 if (auto *I = dyn_cast<Instruction>(V))
531 else if (auto *Arg = dyn_cast<Argument>(V)) {
561 if (auto *Const = dyn_cast<ConstantInt>(Op)) {
577 auto *I = dyn_cast<Instruction>(V);
618 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy));
630 if (auto *Call = dyn_cast<CallInst>(I)) {
643 if (auto *Switch = dyn_cast<SwitchInst>(I)) {
727 if (auto *I = dyn_cast<Instruction>(Masked))
756 if (auto *Call = dyn_cast<CallInst>(I)) {
761 } else if (auto *Switch = dyn_cast<SwitchInst>(I))
805 if (auto *I = dyn_cast<Instruction>(V)) {
854 auto *I = dyn_cast<Instruction>(V);
963 if (auto *I = dyn_cast<Instruction>(V)) {
lib/Target/ARM/ARMConstantPoolValue.cpp 205 const ARMConstantPoolConstant *ACPC = dyn_cast<ARMConstantPoolConstant>(ACPV);
245 const ARMConstantPoolSymbol *ACPS = dyn_cast<ARMConstantPoolSymbol>(ACPV);
285 const ARMConstantPoolMBB *ACPMBB = dyn_cast<ARMConstantPoolMBB>(ACPV);
lib/Target/ARM/ARMConstantPoolValue.h 88 if (Derived *APC = dyn_cast<Derived>(CPV))
lib/Target/ARM/ARMFastISel.cpp 551 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
649 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
651 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
717 if (const Instruction *I = dyn_cast<Instruction>(Obj)) {
725 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
730 if (PointerType *Ty = dyn_cast<PointerType>(Obj->getType()))
770 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
1028 if (const Argument *Arg = dyn_cast<Argument>(SV)) {
1033 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(SV)) {
1160 if (const Argument *Arg = dyn_cast<Argument>(PtrV)) {
1165 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(PtrV)) {
1246 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
1271 } else if (TruncInst *TI = dyn_cast<TruncInst>(BI->getCondition())) {
1296 dyn_cast<ConstantInt>(BI->getCondition())) {
1370 if (const ConstantInt *ConstInt = dyn_cast<ConstantInt>(Src2Value)) {
1385 } else if (const ConstantFP *ConstFP = dyn_cast<ConstantFP>(Src2Value)) {
1632 if (const ConstantInt *ConstInt = dyn_cast<ConstantInt>(I->getOperand(2))) {
2391 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
2778 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Src2Value)) {
2865 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
lib/Target/ARM/ARMISelDAGToDAG.cpp 3404 auto *C = dyn_cast<ConstantSDNode>(N->getOperand(1).getNode());
lib/Target/ARM/ARMISelLowering.cpp 3003 SDValue GA = DAG.getTargetGlobalAddress(dyn_cast<GlobalValue>(GV),
3310 auto *I = dyn_cast<Instruction>(U);
3339 auto *GVar = dyn_cast<GlobalVariable>(GV);
3358 auto *CDAInit = dyn_cast<ConstantDataArray>(Init);
3415 if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
3418 if (const auto *V = dyn_cast<GlobalVariable>(GV))
4164 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CP->getConstVal()))
4184 if (ConstantSDNode *RHSC = dyn_cast<ConstantSDNode>(RHS.getNode())) {
5985 BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(Op.getNode());
8247 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Elt)) {
8358 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
12979 ConstantSDNode *CInc = dyn_cast<ConstantSDNode>(Inc.getNode());
13043 if (StoreSDNode *StN = dyn_cast<StoreSDNode>(N)) {
13222 LoadSDNode *LD = dyn_cast<LoadSDNode>(Op.getNode());
15268 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
15273 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
15314 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
15320 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
15580 IntegerType *Ty = dyn_cast<IntegerType>(CI->getType());
16547 if (Function *F = dyn_cast<Function>(SecurityCheckCookie.getCallee()))
16996 if (auto *ST = dyn_cast<StructType>(Ty)) {
17003 } else if (auto *AT = dyn_cast<ArrayType>(Ty)) {
17018 } else if (auto *VT = dyn_cast<VectorType>(Ty)) {
lib/Target/ARM/ARMParallelDSP.cpp 102 if (auto *SExt = dyn_cast<SExtInst>(V)) {
103 if (auto *I = dyn_cast<Instruction>(SExt->getOperand(0)))
106 } else if (auto *I = dyn_cast<Instruction>(V)) {
335 if (auto *SExt = dyn_cast<SExtInst>(V)) {
339 if (auto *Ld = dyn_cast<LoadInst>(SExt->getOperand(0))) {
362 auto *Ld = dyn_cast<LoadInst>(&I);
443 auto *I = dyn_cast<Instruction>(V);
739 Instruction *BaseSExt = dyn_cast<SExtInst>(Base->user_back());
740 Instruction *OffsetSExt = dyn_cast<SExtInst>(Offset->user_back());
lib/Target/ARM/ARMTargetObjectFile.cpp 77 if (const Function *F = dyn_cast<Function>(GO))
lib/Target/ARM/ARMTargetTransformInfo.cpp 498 if (auto *VecTy = dyn_cast<VectorType>(DataTy)) {
516 const MemCpyInst *MI = dyn_cast<MemCpyInst>(I);
518 ConstantInt *C = dyn_cast<ConstantInt>(MI->getLength());
883 if (auto *Call = dyn_cast<CallInst>(&I)) {
956 if (auto *Call = dyn_cast<IntrinsicInst>(&I)) {
lib/Target/ARM/AsmParser/ARMAsmParser.cpp 972 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm()))
981 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm()))
992 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val)) {
1007 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val)) {
1022 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val)) {
1037 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm.Val);
1052 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1061 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1070 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1078 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1115 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1124 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1153 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1163 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1190 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1199 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1223 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1236 const ARMMCExpr *ARM16Expr = dyn_cast<ARMMCExpr>(getImm());
1241 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1249 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1258 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1268 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1332 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1342 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1350 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1359 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1367 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1525 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1558 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1861 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
1870 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2104 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2118 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2128 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2140 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2150 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2175 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2231 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2240 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2248 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2262 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2271 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2280 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2326 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
2674 if(const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm())) {
2685 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
2829 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
3092 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
3103 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
3999 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ShiftExpr);
4078 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal);
4223 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr);
4466 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(LaneIndex);
4801 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(MemBarrierID);
4869 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ISBarrierID);
5077 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ShiftAmount);
5159 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ShiftAmount);
5221 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ShiftAmount);
5281 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Imm1Exp);
5341 CE = dyn_cast<MCConstantExpr>(Imm2Exp);
5376 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(LSBExpr);
5409 CE = dyn_cast<MCConstantExpr>(WidthExpr);
5505 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Offset);
5698 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr);
5756 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Offset);
5879 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr);
6058 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ImmVal);
7765 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm());
7767 const MCExpr *E = dyn_cast<MCExpr>(Op.getImm());
7769 const ARMMCExpr *ARM16Expr = dyn_cast<ARMMCExpr>(E);
10824 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(AttrExpr);
10858 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ValueExpr);
11102 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(OffsetExpr);
11137 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(OffsetExpr);
11308 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(IndexExpression);
11332 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(OffsetExpr);
11350 const MCConstantExpr *OC = dyn_cast<MCConstantExpr>(OE);
11419 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(OffsetExpr);
11813 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
11819 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
11825 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp 545 dyn_cast<MCSymbolRefExpr>(Fixup.getValue()))
647 dyn_cast<MCSymbolRefExpr>(Fixup.getValue()))
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp 1153 if (const MCSymbolRefExpr *SRE = dyn_cast<MCSymbolRefExpr>(Value)) {
lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp 1211 if (const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(E)) {
lib/Target/ARM/MVETailPredication.cpp 93 auto *Call = dyn_cast<IntrinsicInst>(&I);
102 auto *Call = dyn_cast<IntrinsicInst>(I);
136 auto *Call = dyn_cast<IntrinsicInst>(&I);
245 if (auto *CDS = dyn_cast<ConstantDataSequential>(Const)) {
264 auto *Phi = dyn_cast<PHINode>(IV);
305 } else if (auto *Int = dyn_cast<IntrinsicInst>(&I)) {
328 if (auto *Const = dyn_cast<SCEVConstant>(S->getOperand(0))) {
333 return dyn_cast<SCEVMulExpr>(S->getOperand(1));
337 if (auto *Const = dyn_cast<SCEVConstant>(S->getOperand(0))) {
342 return dyn_cast<SCEVUDivExpr>(S->getOperand(1));
346 if (auto *Const = dyn_cast<SCEVConstant>(S->getRHS())) {
352 if (auto *RoundUp = dyn_cast<SCEVAddExpr>(S->getLHS())) {
353 if (auto *Const = dyn_cast<SCEVConstant>(RoundUp->getOperand(0))) {
373 if (auto *TC = dyn_cast<SCEVAddExpr>(TripCountSE))
374 if (auto *Div = dyn_cast<SCEVUDivExpr>(TC->getOperand(1)))
375 if (auto *Add = dyn_cast<SCEVAddExpr>(Div->getLHS()))
458 auto *Predicate = dyn_cast<Instruction>(I->getArgOperand(PredOp));
lib/Target/AVR/AVRISelLowering.cpp 780 if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
788 } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
836 if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
840 } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
1773 if (const ConstantFP *C = dyn_cast<ConstantFP>(CallOperandVal)) {
1780 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1787 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1794 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1801 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1808 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1815 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1822 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1830 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
1837 if (const ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
lib/Target/AVR/AsmParser/AVRAsmParser.cpp 140 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
167 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
173 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
702 if (MCConstantExpr const *Const = dyn_cast<MCConstantExpr>(Op.getImm())) {
lib/Target/BPF/AsmParser/BPFAsmParser.cpp 179 if (auto *CE = dyn_cast<MCConstantExpr>(Expr))
lib/Target/BPF/BPFAbstractMemberAccess.cpp 198 while (auto *DTy = dyn_cast<DIDerivedType>(Ty)) {
207 while (auto *DTy = dyn_cast<DIDerivedType>(Ty)) {
236 const auto *GV = dyn_cast<GlobalValue>(Call->getCalledValue());
311 auto *Call = dyn_cast<CallInst>(&I);
363 if (const auto *PtrTy = dyn_cast<DIDerivedType>(PType)) {
370 const auto *PTy = dyn_cast<DICompositeType>(PType);
371 const auto *CTy = dyn_cast<DICompositeType>(CType);
392 Ty = dyn_cast<DIType>(PTy->getElements()[ParentAI]);
394 return dyn_cast<DICompositeType>(stripQualifiers(Ty)) == CTy;
400 Instruction *Inst = dyn_cast<Instruction>(U);
404 if (auto *BI = dyn_cast<BitCastInst>(Inst)) {
406 } else if (auto *CI = dyn_cast<CallInst>(Inst)) {
417 } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
432 Instruction *Inst = dyn_cast<Instruction>(U);
436 if (auto *BI = dyn_cast<BitCastInst>(Inst)) {
438 } else if (auto *CI = dyn_cast<CallInst>(Inst)) {
448 } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
462 Instruction *Inst = dyn_cast<Instruction>(U);
466 if (auto *BI = dyn_cast<BitCastInst>(Inst)) {
468 } else if (auto *CI = dyn_cast<CallInst>(Inst)) {
478 } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
496 auto *Call = dyn_cast<CallInst>(&I);
506 const ConstantInt *CV = dyn_cast<ConstantInt>(IndexValue);
520 auto SOff = dyn_cast<ConstantInt>(MemberTy->getStorageOffsetInBits());
532 SOff = dyn_cast<ConstantInt>(Member->getStorageOffsetInBits());
560 auto SOffset = dyn_cast<ConstantInt>(MemberTy->getStorageOffsetInBits());
600 const auto *BTy = dyn_cast<DIBasicType>(BaseTy);
602 const auto *CompTy = dyn_cast<DICompositeType>(BaseTy);
607 BTy = dyn_cast<DIBasicType>(BaseTy);
750 if (const auto *CTy = dyn_cast<DICompositeType>(Ty)) {
764 CTy = dyn_cast<DICompositeType>(BaseTy);
776 auto *CTy = dyn_cast<DICompositeType>(BaseTy);
lib/Target/BPF/BPFISelDAGToDAG.cpp 274 dyn_cast<GlobalAddressSDNode>(OP1N->getOperand(0).getNode());
275 const ConstantSDNode *CDN = dyn_cast<ConstantSDNode>(OP2.getNode());
285 dyn_cast<GlobalAddressSDNode>(OP1.getNode()))
342 const GlobalVariable *V = dyn_cast<GlobalVariable>(Node->getGlobal());
356 if (const ConstantStruct *CS = dyn_cast<ConstantStruct>(Init))
359 else if (const ConstantArray *CA = dyn_cast<ConstantArray>(Init))
398 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
415 if (const ConstantDataArray *CDA = dyn_cast<ConstantDataArray>(CV))
418 if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV))
421 if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV))
lib/Target/BPF/BPFMISimplifyPatchable.cpp 112 auto *GVar = dyn_cast<GlobalVariable>(GVal);
lib/Target/BPF/BTFDebug.cpp 561 if (const auto *CTy = dyn_cast<DICompositeType>(Base)) {
605 if (const auto *BTy = dyn_cast<DIBasicType>(Ty))
607 else if (const auto *STy = dyn_cast<DISubroutineType>(Ty))
610 else if (const auto *CTy = dyn_cast<DICompositeType>(Ty))
612 else if (const auto *DTy = dyn_cast<DIDerivedType>(Ty))
630 const auto *CTy = dyn_cast<DICompositeType>(Ty);
885 if (const auto *DV = dyn_cast<DILocalVariable>(DN)) {
914 const MCSectionELF *SectionELF = dyn_cast<MCSectionELF>(&Section);
991 auto *GVar = dyn_cast<GlobalVariable>(GVal);
997 DIType *Ty = dyn_cast<DIType>(MDN);
1128 auto *GVar = dyn_cast<GlobalVariable>(GVal);
lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp 58 const MCSectionELF *SectionELF = dyn_cast<MCSectionELF>(&Section);
lib/Target/BPF/MCTargetDesc/BPFInstPrinter.cpp 37 if (const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr))
38 SRE = dyn_cast<MCSymbolRefExpr>(BE->getLHS());
40 SRE = dyn_cast<MCSymbolRefExpr>(Expr);
lib/Target/Hexagon/HexagonCommonGEP.cpp 204 if (auto *PTy = dyn_cast<PointerType>(Ty))
212 ConstantInt *CI = dyn_cast<ConstantInt>(Idx);
249 if (ConstantInt *CI = dyn_cast<ConstantInt>(GN.Idx))
804 Instruction *IdxI = dyn_cast<Instruction>(Node->Idx);
840 Instruction *In = dyn_cast<Instruction>(Val);
883 if (Instruction *PIn = dyn_cast<Instruction>(Node->BaseVal))
888 if (Instruction *IIn = dyn_cast<Instruction>(Node->Idx))
1027 if (LoadInst *Ld = dyn_cast<LoadInst>(R)) {
1031 } else if (StoreInst *St = dyn_cast<StoreInst>(R)) {
lib/Target/Hexagon/HexagonConstPropagation.cpp 1086 const ConstantInt *CI = dyn_cast<ConstantInt>(C);
lib/Target/Hexagon/HexagonISelDAGToDAG.cpp 985 if (ConstantSDNode *SC = dyn_cast<ConstantSDNode>(V.getNode()))
1049 ConstantSDNode *CN = dyn_cast<ConstantSDNode>(C.getNode());
1056 ConstantSDNode *EN = dyn_cast<ConstantSDNode>(T2.getNode());
1111 ConstantSDNode *SN = dyn_cast<ConstantSDNode>(S.getOperand(1).getNode());
1119 ConstantSDNode *MN = dyn_cast<ConstantSDNode>(T0.getOperand(1).getNode());
1582 if (const ConstantSDNode *CN = dyn_cast<const ConstantSDNode>(N)) {
lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp 2084 if (auto *CN = dyn_cast<ConstantSDNode>(RotV.getNode())) {
lib/Target/Hexagon/HexagonISelLowering.cpp 548 LSBaseSDNode *LSN = dyn_cast<LSBaseSDNode>(N);
894 const ConstantVector *CV = dyn_cast<ConstantVector>(ConstVal);
922 if (const Constant *ConstVal = dyn_cast<Constant>(CPN->getConstVal())) {
1765 if (const PHINode *PN = dyn_cast<PHINode>(V))
1901 if (auto *CN = dyn_cast<const ConstantSDNode>(Op1.getNode()))
2039 if (auto *BVN = dyn_cast<BuildVectorSDNode>(Op.getOperand(1).getNode())) {
2108 if (auto *CN = dyn_cast<ConstantSDNode>(V.getNode())) {
2111 } else if (auto *CN = dyn_cast<ConstantFPSDNode>(V.getNode())) {
2485 auto *CN = dyn_cast<ConstantSDNode>(P.getNode());
lib/Target/Hexagon/HexagonISelLoweringHVX.cpp 384 auto *IdxN = dyn_cast<ConstantSDNode>(SplatV.getNode());
596 if (const auto *N = dyn_cast<ConstantSDNode>(V.getNode()))
601 if (const auto *N = dyn_cast<ConstantSDNode>(V.getNode()))
893 if (const auto *CN = dyn_cast<const ConstantSDNode>(IdxV.getNode())) {
918 auto *IdxN = dyn_cast<ConstantSDNode>(IdxV.getNode());
978 auto *IdxN = dyn_cast<ConstantSDNode>(IdxV.getNode());
1459 if (const auto *N = dyn_cast<const VTSDNode>(A.getNode()))
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp 274 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
285 const auto *U = dyn_cast<const Instruction>(V);
323 if (Instruction *U = dyn_cast<Instruction>(V)) {
387 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
421 Instruction *U = dyn_cast<Instruction>(V);
465 auto *InI = dyn_cast<const Instruction>(OpI);
466 auto *InJ = dyn_cast<const Instruction>(OpJ);
477 Instruction *SubI = dyn_cast<Instruction>(Sub);
485 Instruction *U = dyn_cast<Instruction>(V);
503 if (Instruction *OpI = dyn_cast<Instruction>(Op))
512 if (Instruction *RootI = dyn_cast<Instruction>(Root))
526 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
635 auto *BO = dyn_cast<BinaryOperator>(IterV);
648 if (auto *T = dyn_cast<ConstantInt>(IncV))
659 if (auto *II = dyn_cast<Instruction>(TheUse.getUser()))
903 auto *RPhi = dyn_cast<PHINode>(PV.R);
925 auto *I1 = dyn_cast<Instruction>(X1);
926 auto *I2 = dyn_cast<Instruction>(X2);
964 IntegerType *T = dyn_cast<IntegerType>(Val->getType());
975 Instruction *In = dyn_cast<Instruction>(Val);
1011 if (PHINode *P = dyn_cast<PHINode>(In)) {
1028 } else if (ZExtInst *Z = dyn_cast<ZExtInst>(In)) {
1035 if (TruncInst *T = dyn_cast<TruncInst>(In)) {
1046 if (ConstantInt *CI = dyn_cast<ConstantInt>(In->getOperand(i)))
1069 IntegerType *T = dyn_cast<IntegerType>(P.getType());
1123 auto *I = dyn_cast<Instruction>(&*U);
1252 auto *T = dyn_cast<IntegerType>(V->getType());
1265 if (auto *C = dyn_cast<ConstantInt>(V))
1268 if (auto *I = dyn_cast<Instruction>(V)) {
1297 auto *CIVTy = dyn_cast<IntegerType>(CIV->getType());
1355 auto *R = dyn_cast<Instruction>(Internal[i]);
1359 auto *T = dyn_cast<Instruction>(Op);
1541 auto *QI = dyn_cast<ConstantInt>(PV.Q);
1564 if (const auto *CI = dyn_cast<const ConstantInt>(V))
1566 const Instruction *I = dyn_cast<const Instruction>(V);
1571 if (const auto SI = dyn_cast<const ConstantInt>(I->getOperand(1)))
1591 Instruction *T = dyn_cast<Instruction>(I->getOperand(0));
1612 Instruction *And0 = dyn_cast<Instruction>(I->getOperand(0));
1613 Instruction *And1 = dyn_cast<Instruction>(I->getOperand(1));
1629 BinaryOperator *BO = dyn_cast<BinaryOperator>(I);
1633 if (SelectInst *Sel = dyn_cast<SelectInst>(BO->getOperand(0))) {
1641 if (SelectInst *Sel = dyn_cast<SelectInst>(BO->getOperand(1))) {
1655 SelectInst *Sel = dyn_cast<SelectInst>(I);
1660 if (SelectInst *Sel0 = dyn_cast<SelectInst>(Sel->getTrueValue())) {
1664 if (SelectInst *Sel1 = dyn_cast<SelectInst>(Sel->getFalseValue())) {
1675 ConstantInt *Msb = dyn_cast<ConstantInt>(I->getOperand(1));
1687 BinaryOperator *BitOp = dyn_cast<BinaryOperator>(I->getOperand(0));
1716 BinaryOperator *BitOp1 = dyn_cast<BinaryOperator>(I);
1719 BinaryOperator *BitOp2 = dyn_cast<BinaryOperator>(BitOp1->getOperand(0));
1722 ConstantInt *CA = dyn_cast<ConstantInt>(BitOp2->getOperand(1));
1723 ConstantInt *CB = dyn_cast<ConstantInt>(BitOp1->getOperand(1));
1738 Instruction *Xor = dyn_cast<Instruction>(I->getOperand(0));
1739 ConstantInt *C0 = dyn_cast<ConstantInt>(I->getOperand(1));
1744 Instruction *And0 = dyn_cast<Instruction>(Xor->getOperand(0));
1745 Instruction *And1 = dyn_cast<Instruction>(Xor->getOperand(1));
1749 ConstantInt *C1 = dyn_cast<ConstantInt>(And0->getOperand(1));
1785 if (auto *CV = dyn_cast<SCEVConstant>(CT))
1806 if (const auto *P = dyn_cast<const PHINode>(U))
1813 SelectInst *SI = dyn_cast<SelectInst>(&In);
1848 SelectInst *SI = dyn_cast<SelectInst>(&In);
1870 SelectInst *SelI = dyn_cast<SelectInst>(&In);
1908 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(S->getOperand(1)))
1929 auto *StoreEv = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr));
1943 LoadInst *LI = dyn_cast<LoadInst>(SI->getValueOperand());
1951 auto *LoadEv = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(LoadPtr));
1978 if (const SCEVConstant *BECst = dyn_cast<SCEVConstant>(BECount))
2002 if (StoreInst *SI = dyn_cast<StoreInst>(&I))
2153 if (Instruction *In = dyn_cast<Instruction>(NumBytes))
2161 if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes)) {
2182 PHINode *PN = dyn_cast<PHINode>(&In);
2264 if (Instruction *In = dyn_cast<Instruction>(NumWords))
2318 Instruction *OpI = dyn_cast<Instruction>(I);
2339 Instruction *UseI = dyn_cast<Instruction>(K);
lib/Target/Hexagon/HexagonOptimizeSZextends.cpp 105 BinaryOperator *Ashr = dyn_cast<BinaryOperator>(&I);
109 ConstantInt *C = dyn_cast<ConstantInt>(AshrOp1);
115 Instruction *Shl = dyn_cast<Instruction>(Ashr->getOperand(0));
120 C = dyn_cast<ConstantInt>(ShlOp1);
126 if (IntrinsicInst *I = dyn_cast<IntrinsicInst>(Intr)) {
133 if (Instruction *J = dyn_cast<Instruction>(TheUse.getUser())) {
lib/Target/Hexagon/HexagonTargetObjectFile.cpp 208 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO);
251 if (StructType *ST = dyn_cast<StructType>(GType)) {
395 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GO);
432 auto *I = dyn_cast<Instruction>(U);
456 const auto *FuncObj = dyn_cast<GlobalObject>(Fn);
lib/Target/Hexagon/HexagonTargetTransformInfo.cpp 307 const LoadInst *LI = dyn_cast<const LoadInst>(CI->getOperand(0));
314 if (const CastInst *CI = dyn_cast<const CastInst>(U))
lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp 408 if (CallInst *C1 = dyn_cast<CallInst>(I1)) {
409 if (CallInst *C2 = dyn_cast<CallInst>(I2)) {
420 ConstantInt *C1 = dyn_cast<ConstantInt>(I1->getOperand(i));
421 ConstantInt *C2 = dyn_cast<ConstantInt>(I2->getOperand(i));
433 const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I);
517 CallInst *C1 = dyn_cast<CallInst>(I);
522 Instruction *OpInst = dyn_cast<Instruction>(Op);
526 Instruction *BEOpInst = dyn_cast<Instruction>(BEOp);
556 Instruction *OpInst = dyn_cast<Instruction>(Op);
566 Instruction *BEOpInst = dyn_cast<Instruction>(BEOp);
594 PHINode *PN = dyn_cast<PHINode>(Op);
616 Instruction *I = dyn_cast<Instruction>(Inst2Replace->getOperand(j));
683 PHINode *PN = dyn_cast<PHINode>(I);
701 Instruction *BEInst = dyn_cast<Instruction>(BEVal);
lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp 799 HexagonMCExpr const *HExpr = dyn_cast<HexagonMCExpr>(&Expr);
lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp 213 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Imm.Value);
230 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value)) {
236 if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value))
240 if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value))
242 dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS()))
252 const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value);
266 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value)) {
273 if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value))
277 if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value))
279 dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS()))
290 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value)) {
297 if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value))
301 if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value))
303 dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS()))
313 const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value);
326 const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value);
338 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value)) {
344 if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value))
347 dyn_cast<MCSymbolRefExpr>(Imm.Value)) {
352 if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value)) {
354 dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS()))
357 dyn_cast<MCSymbolRefExpr>(BinaryExpr->getLHS()))
368 const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value);
379 const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Imm.Value);
393 else if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Expr))
466 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(getImm()))
471 const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm());
478 const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm());
490 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(getImm()))
498 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(getImm()))
502 const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm());
509 const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm());
521 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(getImm()))
529 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(getImm()))
533 const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm());
541 dyn_cast<MCSymbolRefExpr>(getImm());
548 const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm());
845 if (const MCConstantExpr *ConstExpr = dyn_cast<MCConstantExpr>(Op.getImm())) {
851 if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Op.getImm()))
856 if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Op.getImm())) {
858 dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS());
1130 dyn_cast<MCConstantExpr>(PossibleAluOp->getImm()))
lib/Target/Lanai/LanaiISelLowering.cpp 611 const Function *CalleeFn = dyn_cast<Function>(G->getGlobal());
lib/Target/Lanai/LanaiTargetObjectFile.cpp 76 const auto *GVA = dyn_cast<GlobalVariable>(GO);
lib/Target/Lanai/MCTargetDesc/LanaiMCCodeEmitter.cpp 93 if (const LanaiMCExpr *McExpr = dyn_cast<LanaiMCExpr>(Expr)) {
lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp 136 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
lib/Target/Mips/AsmParser/MipsAsmParser.cpp 1012 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
1743 if (const MCSymbolRefExpr *SRExpr = dyn_cast<MCSymbolRefExpr>(Expr)) {
1747 if (const MCBinaryExpr *BExpr = dyn_cast<MCBinaryExpr>(Expr)) {
1760 if (const MCUnaryExpr *UExpr = dyn_cast<MCUnaryExpr>(Expr))
1770 if (const MCBinaryExpr *BExpr = dyn_cast<MCBinaryExpr>(Expr))
1774 if (const MCUnaryExpr *UExpr = dyn_cast<MCUnaryExpr>(Expr))
6228 if (const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(IdVal)) {
6447 const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(IdVal);
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp 577 if (const auto *ElfSym = dyn_cast<const MCSymbolELF>(Sym)) {
lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp 274 if (const MipsMCExpr *E = dyn_cast<const MipsMCExpr>(getSubExpr()))
292 if (const MipsMCExpr *S1 = dyn_cast<const MipsMCExpr>(getSubExpr())) {
293 if (const MipsMCExpr *S2 = dyn_cast<const MipsMCExpr>(S1->getSubExpr())) {
lib/Target/Mips/Mips16HardFloat.cpp 384 if (const ReturnInst *RI = dyn_cast<ReturnInst>(&I)) {
419 } else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
lib/Target/Mips/Mips16ISelLowering.cpp 385 } else if (StructType *SRetTy = dyn_cast<StructType>(RetTy)) {
lib/Target/Mips/MipsAsmPrinter.cpp 1253 if (auto *MipsExpr = dyn_cast<MipsMCExpr>(Value)) {
lib/Target/Mips/MipsCCState.cpp 75 dyn_cast<const GlobalAddressSDNode>(Callee)) {
lib/Target/Mips/MipsFastISel.cpp 322 if (const auto *C = dyn_cast<ConstantInt>(RHS))
417 const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
455 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
457 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
468 if (const Instruction *I = dyn_cast<Instruction>(Obj)) {
476 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
502 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
550 if (const auto *I = dyn_cast<Instruction>(V)) {
557 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
582 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
960 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
1992 if (const auto *C = dyn_cast<ConstantInt>(I->getOperand(1))) {
lib/Target/Mips/MipsISelLowering.cpp 3251 if (auto *F = dyn_cast<Function>(N->getGlobal())) {
lib/Target/Mips/MipsSEISelDAGToDAG.cpp 514 BuildVectorSDNode *Node = dyn_cast<BuildVectorSDNode>(N);
lib/Target/Mips/MipsSEISelLowering.cpp 534 BuildVectorSDNode *Node = dyn_cast<BuildVectorSDNode>(N.getNode());
lib/Target/Mips/MipsTargetObjectFile.cpp 105 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GO);
lib/Target/NVPTX/NVPTXAsmPrinter.cpp 101 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
104 if (const User *U = dyn_cast<User>(V)) {
348 if (auto *ITy = dyn_cast<IntegerType>(Ty)) {
620 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
625 if (const Constant *C = dyn_cast<Constant>(U))
633 if (const GlobalVariable *othergv = dyn_cast<GlobalVariable>(U)) {
638 if (const Instruction *instr = dyn_cast<Instruction>(U)) {
684 if (const Constant *cu = dyn_cast<Constant>(U)) {
687 } else if (const Instruction *I = dyn_cast<Instruction>(U)) {
720 if (const Constant *C = dyn_cast<Constant>(U)) {
760 const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
1053 CI = dyn_cast<ConstantInt>(Initializer);
1380 auto *ATy = dyn_cast<ArrayType>(Ty);
1384 auto *STy = dyn_cast<StructType>(Ty);
1398 auto *FTy = dyn_cast<FunctionType>(Ty);
1487 auto *PTy = dyn_cast<PointerType>(Ty);
1553 auto *PTy = dyn_cast<PointerType>(Ty);
1712 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) {
1716 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV)) {
1724 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1738 if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1740 PointerType *PTy = dyn_cast<PointerType>(Cexpr->getType());
1745 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
1812 if (const ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) {
1817 } else if (const auto *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1834 if (const ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) {
1839 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1883 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1885 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1920 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) {
1939 dyn_cast<ConstantDataSequential>(CPV)) {
1977 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV))
1980 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
1990 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
2145 if (const MCConstantExpr *RHSC = dyn_cast<MCConstantExpr>(BE.getRHS())) {
lib/Target/NVPTX/NVPTXAsmPrinter.h 161 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
163 PointerType *PTy = dyn_cast<PointerType>(v0->getType());
175 } else if (const ConstantExpr *CExpr = dyn_cast<ConstantExpr>(v0)) {
lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp 661 if (auto *PT = dyn_cast<PointerType>(Src->getType())) {
710 if (auto *A = dyn_cast<const Argument>(V))
712 if (auto *GV = dyn_cast<const GlobalVariable>(V))
842 LoadSDNode *PlainLoad = dyn_cast<LoadSDNode>(N);
1675 LoadSDNode *LdNode = dyn_cast<LoadSDNode>(N);
1707 StoreSDNode *PlainStore = dyn_cast<StoreSDNode>(N);
1708 AtomicSDNode *AtomicStore = dyn_cast<AtomicSDNode>(N);
3677 if (MemSDNode *mN = dyn_cast<MemSDNode>(N)) {
3684 if (auto *PT = dyn_cast<PointerType>(Src->getType()))
lib/Target/NVPTX/NVPTXISelLowering.cpp 183 if (StructType *STy = dyn_cast<StructType>(Ty)) {
1278 if (auto *ITy = dyn_cast<IntegerType>(retTy)) {
1356 auto *PTy = dyn_cast<PointerType>(Ty);
1580 auto *PTy = dyn_cast<PointerType>(Args[i].Ty);
1630 GlobalAddressSDNode *Func = dyn_cast<GlobalAddressSDNode>(Callee.getNode());
2446 auto *PTy = dyn_cast<PointerType>(Ty);
2454 auto *STy = dyn_cast<StructType>(PTy->getElementType());
2553 if (StructType *STy = dyn_cast<StructType>(Ty))
lib/Target/NVPTX/NVPTXImageOptimizer.cpp 170 if (ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(V)) {
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp 79 if (StoreInst *SI = dyn_cast<StoreInst>(LI->user_back())) {
87 if (ConstantInt *LenCI = dyn_cast<ConstantInt>(IntrCall->getLength())) {
127 if (MemCpyInst *Memcpy = dyn_cast<MemCpyInst>(MemCall)) {
129 } else if (MemMoveInst *Memmove = dyn_cast<MemMoveInst>(MemCall)) {
131 } else if (MemSetInst *Memset = dyn_cast<MemSetInst>(MemCall)) {
lib/Target/NVPTX/NVPTXLowerAlloca.cpp 71 if (auto allocaInst = dyn_cast<AllocaInst>(&I)) {
73 auto PTy = dyn_cast<PointerType>(allocaInst->getType());
91 auto LI = dyn_cast<LoadInst>(AllocaUse.getUser());
97 auto SI = dyn_cast<StoreInst>(AllocaUse.getUser());
103 auto GI = dyn_cast<GetElementPtrInst>(AllocaUse.getUser());
108 auto BI = dyn_cast<BitCastInst>(AllocaUse.getUser());
lib/Target/NVPTX/NVPTXLowerArgs.cpp 157 PointerType *PType = dyn_cast<PointerType>(Arg->getType());
184 if (Argument *Arg = dyn_cast<Argument>(Ptr)) {
213 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
217 if (Argument *Arg = dyn_cast<Argument>(UO)) {
lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp 73 if (const Argument *Arg = dyn_cast<Argument>(V))
76 if (const Instruction *I = dyn_cast<Instruction>(V)) {
79 if (const LoadInst *LI = dyn_cast<LoadInst>(I)) {
94 if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
lib/Target/NVPTX/NVPTXUtilities.cpp 134 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
145 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
158 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
165 if (const Argument *arg = dyn_cast<Argument>(&val)) {
177 if (const Argument *arg = dyn_cast<Argument>(&val)) {
189 if (const Argument *arg = dyn_cast<Argument>(&val)) {
201 if (const Argument *arg = dyn_cast<Argument>(&val)) {
217 if(const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
lib/Target/NVPTX/NVVMIntrRange.cpp 84 CallInst *Call = dyn_cast<CallInst>(&I);
lib/Target/NVPTX/NVVMReflect.cpp 115 CallInst *Call = dyn_cast<CallInst>(&I);
130 if (const CallInst *ConvCall = dyn_cast<CallInst>(Str)) {
143 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Operand)) {
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp 652 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Val))
655 if (const MCSymbolRefExpr *SRE = dyn_cast<MCSymbolRefExpr>(Val))
659 if (const PPCMCExpr *TE = dyn_cast<PPCMCExpr>(Val)) {
696 if (const MCUnaryExpr *UnExpr = dyn_cast<MCUnaryExpr>(Expr)) {
701 } else if (const MCBinaryExpr *BinExpr = dyn_cast<MCBinaryExpr>(Expr)) {
1494 if (const MCSymbolRefExpr *Ref = dyn_cast<MCSymbolRefExpr>(EVal))
1655 if (const auto *MCE = dyn_cast<MCConstantExpr>(Value)) {
lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp 154 if (const auto *S = dyn_cast<MCSymbolELF>(&A->getSymbol())) {
lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp 474 if (const MCBinaryExpr *BinExpr = dyn_cast<MCBinaryExpr>(Op.getExpr())) {
lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp 207 auto *Ref = dyn_cast<const MCSymbolRefExpr>(S);
lib/Target/PowerPC/PPCBoolRetToInt.cpp 80 auto *CurrUser = dyn_cast<User>(Curr);
96 if (auto *C = dyn_cast<Constant>(V))
98 if (auto *P = dyn_cast<PHINode>(V)) {
109 auto *A = dyn_cast<Argument>(V);
110 auto *I = dyn_cast<Instruction>(V);
133 if (const auto *P = dyn_cast<PHINode>(&I))
157 const auto *Phi = dyn_cast<PHINode>(V);
203 if (auto *R = dyn_cast<ReturnInst>(&I))
208 if (auto *CI = dyn_cast<CallInst>(&I))
235 if (const auto *P = dyn_cast<PHINode>(V))
252 auto *First = dyn_cast<User>(Pair.first);
253 auto *Second = dyn_cast<User>(Pair.second);
lib/Target/PowerPC/PPCFastISel.cpp 313 if (const Instruction *I = dyn_cast<Instruction>(Obj)) {
321 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
360 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
776 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
803 dyn_cast<ConstantInt>(BI->getCondition())) {
843 if (const ConstantInt *ConstInt = dyn_cast<ConstantInt>(SrcValue2)) {
1305 if (const ConstantInt *ConstInt = dyn_cast<ConstantInt>(I->getOperand(1))) {
1646 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
1717 if (const ConstantInt *CI = dyn_cast<ConstantInt>(RV)) {
2248 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
2250 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
2252 else if (const ConstantInt *CI = dyn_cast<ConstantInt>(C))
lib/Target/PowerPC/PPCISelDAGToDAG.cpp 4167 LoadSDNode *LDN = dyn_cast<LoadSDNode>(N);
4168 StoreSDNode *STN = dyn_cast<StoreSDNode>(N);
5641 MachineSDNode *MachineNode = dyn_cast<MachineSDNode>(&Node);
lib/Target/PowerPC/PPCISelLowering.cpp 1250 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
1255 } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
1260 } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
1450 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CP->getConstVal()))
2264 if (MemSDNode *Memop = dyn_cast<MemSDNode>(*UI)) {
2504 LoadSDNode *LD = dyn_cast<LoadSDNode>(N);
2553 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
2557 } else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
2618 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
4514 if (const auto *F = dyn_cast<Function>(GV)) {
8264 BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(Op.getNode());
11764 if (LSBaseSDNode *LS = dyn_cast<LSBaseSDNode>(N)) {
11890 if (MemSDNode *ChainLD = dyn_cast<MemSDNode>(ChainNext)) {
11921 if (MemSDNode *ChainLD = dyn_cast<MemSDNode>(LoadRoot))
12612 if (LoadSDNode *LD = dyn_cast<LoadSDNode>(Op.getNode()))
15453 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Mask)) {
lib/Target/PowerPC/PPCInstrInfo.cpp 4037 dyn_cast<Function>(CallMI.getOperand(0).getGlobal());
4041 dyn_cast<IntegerType>(CalleeFn->getReturnType());
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp 167 while (BitCastInst *BC = dyn_cast<BitCastInst>(StrippedBasePtr))
169 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(StrippedBasePtr))
184 if (LoadInst *LMemI = dyn_cast<LoadInst>(MemI)) {
186 } else if (StoreInst *SMemI = dyn_cast<StoreInst>(MemI)) {
188 } else if (IntrinsicInst *IMemI = dyn_cast<IntrinsicInst>(MemI)) {
225 if (const auto *CDiff = dyn_cast<SCEVConstant>(Diff)) {
249 if (LoadInst *LMemI = dyn_cast<LoadInst>(&J)) {
252 } else if (StoreInst *SMemI = dyn_cast<StoreInst>(&J)) {
255 } else if (IntrinsicInst *IMemI = dyn_cast<IntrinsicInst>(&J)) {
270 const SCEVAddRecExpr *LARSCEV = dyn_cast<SCEVAddRecExpr>(LSCEV);
297 if (auto *II = dyn_cast<IntrinsicInst>(BucketChain.Elements[j].Instr))
353 dyn_cast<SCEVConstant>(BasePtrSCEV->getStepRecurrence(*SE));
406 if (Instruction *IDel = dyn_cast<Instruction>(BasePtr))
427 Instruction *PtrIP = dyn_cast<Instruction>(Ptr);
445 if (Instruction *IDel = dyn_cast<Instruction>(Ptr))
506 PHINode *CurrentPHINode = dyn_cast<PHINode>(&CurrentPHI);
515 const SCEVAddRecExpr *PHIBasePtrSCEV = dyn_cast<SCEVAddRecExpr>(PHISCEV);
520 dyn_cast<SCEVConstant>(PHIBasePtrSCEV->getStepRecurrence(*SE));
582 const SCEVAddRecExpr *LARSCEV = dyn_cast<SCEVAddRecExpr>(LSCEV);
586 dyn_cast<SCEVConstant>(LARSCEV->getStepRecurrence(*SE))) {
lib/Target/PowerPC/PPCTargetObjectFile.cpp 41 const auto *GVar = dyn_cast<GlobalVariable>(GO);
lib/Target/PowerPC/PPCTargetTransformInfo.cpp 238 const auto *GV = dyn_cast<GlobalValue>(MemAddr);
241 if (const auto *CV = dyn_cast<Constant>(MemAddr))
257 if (IntegerType *ITy = dyn_cast<IntegerType>(Ty))
267 if (InlineAsm *IA = dyn_cast<InlineAsm>(CI->getCalledValue())) {
533 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp 263 if (auto *RE = dyn_cast<RISCVMCExpr>(Expr)) {
268 if (auto CE = dyn_cast<MCConstantExpr>(Expr)) {
334 auto *SVal = dyn_cast<MCSymbolRefExpr>(Val);
358 auto *SVal = dyn_cast<MCSymbolRefExpr>(Val);
1046 auto *CE = dyn_cast<MCConstantExpr>(Res);
1441 if (const RISCVMCExpr *RE = dyn_cast<RISCVMCExpr>(Expr)) {
1450 const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr);
1468 auto AddendExpr = dyn_cast<MCConstantExpr>(BE->getRHS());
lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp 152 const RISCVMCExpr *Expr = dyn_cast<RISCVMCExpr>(SrcSymbol.getExpr());
lib/Target/RISCV/RISCVTargetObjectFile.cpp 42 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GO);
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp 348 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
1237 if (const SparcMCExpr *SE = dyn_cast<SparcMCExpr>(Expr))
lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp 46 if (const SparcMCExpr *SExpr = dyn_cast<SparcMCExpr>(Fixup.getValue())) {
lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp 135 if (const SparcMCExpr *SExpr = dyn_cast<SparcMCExpr>(Expr)) {
162 const SparcMCExpr *SExpr = dyn_cast<SparcMCExpr>(MO.getExpr());
174 if (const SparcMCExpr *SExpr = dyn_cast<SparcMCExpr>(MO.getExpr())) {
lib/Target/Sparc/SparcISelLowering.cpp 701 CalleeFn = dyn_cast<Function>(G->getGlobal());
2728 LoadSDNode *LdNode = dyn_cast<LoadSDNode>(Op.getNode());
2782 StoreSDNode *StNode = dyn_cast<StoreSDNode>(Op.getNode());
3211 if (ConstantInt *C = dyn_cast<ConstantInt>(info.CallOperandVal)) {
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp 42 if (auto *CE = dyn_cast<MCConstantExpr>(Expr)) {
145 else if (auto *CE = dyn_cast<MCConstantExpr>(Expr))
640 if (auto *CE = dyn_cast<MCConstantExpr>(E))
642 else if (auto *UE = dyn_cast<MCUnaryExpr>(E))
644 else if (auto *BE = dyn_cast<MCBinaryExpr>(E))
646 else if (auto *SRE = dyn_cast<MCSymbolRefExpr>(E))
783 if (auto *CE = dyn_cast<MCConstantExpr>(Register)) {
1309 if (auto *CE = dyn_cast<MCConstantExpr>(Expr)) {
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp 726 auto *MaskNode = dyn_cast<ConstantSDNode>(Op.getOperand(1).getNode());
787 auto *MaskNode = dyn_cast<ConstantSDNode>(N.getOperand(1).getNode());
810 auto *MaskNode = dyn_cast<ConstantSDNode>(N.getOperand(1).getNode());
833 auto *CountNode = dyn_cast<ConstantSDNode>(N.getOperand(1).getNode());
878 auto *CountNode = dyn_cast<ConstantSDNode>(N.getOperand(1).getNode());
905 auto *CountNode = dyn_cast<ConstantSDNode>(N.getOperand(1).getNode());
1082 if (auto *Load = dyn_cast<LoadSDNode>(Op0.getNode()))
lib/Target/SystemZ/SystemZISelLowering.cpp 839 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
853 if (auto *C = dyn_cast<ConstantInt>(SingleUser->getOperand(1)))
862 } else if (auto *StoreI = dyn_cast<StoreInst>(I)) {
863 if (auto *LoadI = dyn_cast<LoadInst>(StoreI->getValueOperand()))
1020 if (auto *C = dyn_cast<ConstantInt>(CallOperandVal))
1026 if (auto *C = dyn_cast<ConstantInt>(CallOperandVal))
1032 if (auto *C = dyn_cast<ConstantInt>(CallOperandVal))
1038 if (auto *C = dyn_cast<ConstantInt>(CallOperandVal))
1044 if (auto *C = dyn_cast<ConstantInt>(CallOperandVal))
1962 auto *ConstOp1 = dyn_cast<ConstantSDNode>(C.Op1.getNode());
2052 auto *Load = dyn_cast<LoadSDNode>(Op.getNode());
3845 if (auto *SI = dyn_cast<StoreInst>(&I))
3848 if (auto *LI = dyn_cast<LoadInst>(&I))
3851 if (auto *AI = dyn_cast<AtomicRMWInst>(&I))
3854 if (auto *AI = dyn_cast<AtomicCmpXchgInst>(&I))
lib/Target/SystemZ/SystemZTDC.cpp 100 auto *LI = dyn_cast<BinaryOperator>(U);
123 auto *Const = dyn_cast<ConstantFP>(I.getOperand(1));
215 if (CallInst *CI = dyn_cast<CallInst>(Op0)) {
233 auto *Const = dyn_cast<ConstantInt>(I.getOperand(1));
238 if (auto *Cast = dyn_cast<BitCastInst>(Op0)) {
258 } else if (auto *CI = dyn_cast<CallInst>(Op0)) {
266 auto *MaskC = dyn_cast<ConstantInt>(CI->getArgOperand(1));
334 if (ConvertedInsts.count(dyn_cast<Instruction>(Op->getOperand(0))) &&
335 ConvertedInsts.count(dyn_cast<Instruction>(Op->getOperand(1))) &&
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp 382 if (const Constant *C = dyn_cast<Constant>(Args[1])) {
386 : dyn_cast<const ConstantInt>(C));
474 if (const Instruction *I = dyn_cast<Instruction>(A))
484 if (const Instruction *I = dyn_cast<Instruction>(A))
630 if (CmpInst *CI = dyn_cast<CmpInst>(I->getOperand(0)))
632 else if (Instruction *LogicI = dyn_cast<Instruction>(I->getOperand(0)))
634 if (CmpInst *CI0 = dyn_cast<CmpInst>(LogicI->getOperand(0)))
867 if (LoadInst *Ld = dyn_cast<LoadInst>(I->getOperand(0)))
868 if (const ConstantInt *C = dyn_cast<ConstantInt>(I->getOperand(1)))
979 if (ConstantInt *CI = dyn_cast<ConstantInt>(UserI->getOperand(1)))
989 if (const Instruction *I = dyn_cast<Instruction>(V))
990 if (auto *CI = dyn_cast<CallInst>(I))
1015 if (Instruction *OtherOp = dyn_cast<Instruction>(UserI->getOperand(i))){
1016 LoadInst *OtherLoad = dyn_cast<LoadInst>(OtherOp);
1020 OtherLoad = dyn_cast<LoadInst>(OtherOp->getOperand(0));
1043 else if (const StoreInst *SI = dyn_cast<StoreInst>(I)) {
lib/Target/TargetLoweringObjectFile.cpp 95 if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(C)) {
192 if (ArrayType *ATy = dyn_cast<ArrayType>(C->getType())) {
194 dyn_cast<IntegerType>(ATy->getElementType())) {
252 if (auto *GVar = dyn_cast<GlobalVariable>(GO)) {
262 if (auto *F = dyn_cast<Function>(GO)) {
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp 47 if (auto SyExp = dyn_cast<MCSymbolRefExpr>(Expr)) {
53 if (auto BinOp = dyn_cast<MCBinaryExpr>(Expr)) {
59 if (auto UnOp = dyn_cast<MCUnaryExpr>(Expr))
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp 95 if (auto *BC = dyn_cast<BitCastOperator>(U.getUser())) {
96 if (auto *DestType = dyn_cast<FunctionType>(
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp 147 const auto *Tuple = dyn_cast<MDTuple>(MD);
lib/Target/WebAssembly/WebAssemblyFastISel.cpp 212 if (const auto *I = dyn_cast<Instruction>(Obj)) {
220 } else if (const auto *C = dyn_cast<ConstantExpr>(Obj)) {
225 if (auto *Ty = dyn_cast<PointerType>(Obj->getType()))
231 if (const auto *GV = dyn_cast<GlobalValue>(Obj)) {
280 if (const auto *CI = dyn_cast<ConstantInt>(Op)) {
340 if (const auto *CI = dyn_cast<ConstantInt>(RHS)) {
360 if (const auto *CI = dyn_cast<ConstantInt>(RHS)) {
420 if (const auto *ICmp = dyn_cast<ICmpInst>(V))
421 if (const ConstantInt *C = dyn_cast<ConstantInt>(ICmp->getOperand(1)))
616 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) {
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp 71 if (auto *BC = dyn_cast<BitCastOperator>(U.getUser()))
73 else if (auto *A = dyn_cast<GlobalAlias>(U.getUser()))
280 auto *Ty = dyn_cast<FunctionType>(PTy->getElementType());
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp 1522 if (!(ShiftVec = dyn_cast<BuildVectorSDNode>(Op.getOperand(1).getNode())) ||
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp 298 if (const auto *F = dyn_cast<const Function>(V)) {
318 dyn_cast<GlobalVariable>(M.getOrInsertGlobal(Name, IRB.getInt32Ty()));
381 if (auto *F = dyn_cast<Function>(CI->getCalledValue()))
451 if (auto *F = dyn_cast<Function>(Callee))
455 CalleeFTy = dyn_cast<FunctionType>(CalleeTy);
477 if (auto *CalleeF = dyn_cast<Function>(Callee))
612 if (auto *UserPN = dyn_cast<PHINode>(User))
750 auto *II = dyn_cast<InvokeInst>(BB.getTerminator());
791 auto *RI = dyn_cast<ResumeInst>(&I);
810 auto *CI = dyn_cast<CallInst>(&I);
830 if (auto *LPI = dyn_cast<LandingPadInst>(I))
907 auto *CI = dyn_cast<CallInst>(U);
961 auto *CI = dyn_cast<CallInst>(&I);
987 if (auto *GV = dyn_cast<GlobalVariable>(LI->getPointerOperand()))
998 if (auto *GV = dyn_cast<GlobalVariable>(SI->getPointerOperand()))
1086 if (auto *I = dyn_cast<Instruction>(U.getUser()))
1094 if (auto *I = dyn_cast<Instruction>(U.getUser()))
lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp 67 const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
72 auto *ETy = dyn_cast<StructType>(InitList->getType()->getElementType());
83 auto *CS = dyn_cast<ConstantStruct>(O);
87 auto *Priority = dyn_cast<ConstantInt>(CS->getOperand(0));
lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp 52 if (const auto *FuncTy = dyn_cast<FunctionType>(Global->getValueType())) {
lib/Target/WebAssembly/WebAssemblyRegStackify.cpp 146 if (const auto *GA = dyn_cast<GlobalAlias>(GV))
150 if (const auto *F = dyn_cast<Function>(GV)) {
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp 54 if (auto *VTy = dyn_cast<VectorType>(Ty)) {
lib/Target/WebAssembly/WebAssemblyUtilities.cpp 68 const auto *F = dyn_cast<Function>(MO.getGlobal());
lib/Target/X86/AsmParser/X86AsmParser.cpp 604 if (auto *CE = dyn_cast<MCConstantExpr>(SymRef))
1994 if (auto *RE = dyn_cast<X86MCExpr>(Expr)) {
2850 if (auto *CE = dyn_cast<MCConstantExpr>(Op1.getImm()))
3405 const auto *CE = dyn_cast<MCConstantExpr>(X86Op->getImm());
lib/Target/X86/AsmParser/X86Operand.h 105 if (auto *SRE = dyn_cast<MCSymbolRefExpr>(Val)) {
212 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
226 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
240 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
254 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
267 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
276 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
490 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
555 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getMemDisp()))
575 if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getMemDisp()))
lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp 303 const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(Op.getExpr());
lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp 294 const MCSymbolRefExpr *Ref = dyn_cast<MCSymbolRefExpr>(Op.getExpr());
535 auto *Sym = dyn_cast<MCSymbolRefExpr>(Disp.getExpr());
lib/Target/X86/MCTargetDesc/X86MCExpr.h 62 if (auto *E = dyn_cast<X86MCExpr>(X))
lib/Target/X86/X86FastISel.cpp 664 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Val)) {
718 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
833 if (const Instruction *I = dyn_cast<Instruction>(V)) {
842 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
847 if (PointerType *Ty = dyn_cast<PointerType>(V->getType()))
887 if (const ConstantInt *CI = dyn_cast<ConstantInt>(U->getOperand(1))) {
921 if (const ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
960 dyn_cast<GetElementPtrInst>(U->getOperand(0))) {
992 const Instruction *I = dyn_cast<Instruction>(V);
1021 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
1050 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
1061 if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
1112 if (const Argument *Arg = dyn_cast<Argument>(PtrV)) {
1117 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(PtrV)) {
1303 if (const Argument *Arg = dyn_cast<Argument>(SV)) {
1308 if (const AllocaInst *Alloca = dyn_cast<AllocaInst>(SV)) {
1404 if (const ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) {
1467 const auto *RHSC = dyn_cast<ConstantFP>(RHS);
1635 if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
1655 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS);
1707 } else if (TruncInst *TI = dyn_cast<TruncInst>(BI->getCondition())) {
2031 const auto *CI = dyn_cast<CmpInst>(Cond);
2150 const auto *CI = dyn_cast<FCmpInst>(I->getOperand(0));
2167 const auto *CmpRHSC = dyn_cast<ConstantFP>(CmpRHS);
2302 const auto *CI = dyn_cast<CmpInst>(Cond);
2365 if (const auto *CI = dyn_cast<CmpInst>(I->getOperand(0))) {
2912 if (const auto *CI = dyn_cast<ConstantInt>(RHS)) {
3030 while (auto *IE = dyn_cast<InsertElementInst>(Op)) {
3189 CLI.CS ? dyn_cast<CallInst>(CLI.CS->getInstruction()) : nullptr;
3195 CLI.CS ? dyn_cast<InvokeInst>(CLI.CS->getInstruction()) : nullptr;
3257 if (auto *CI = dyn_cast<ConstantInt>(Val)) {
3269 auto *TI = dyn_cast<TruncInst>(Val);
3855 if (const auto *CI = dyn_cast<ConstantInt>(C))
3857 else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(C))
3859 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
lib/Target/X86/X86FrameLowering.cpp 2630 const Function *F = dyn_cast<Function>(MO.getGlobal());
lib/Target/X86/X86ISelDAGToDAG.cpp 480 if (auto *CN = dyn_cast<ConstantSDNode>(N))
759 LoadSDNode *LD = dyn_cast<LoadSDNode>(Callee.getNode());
lib/Target/X86/X86ISelLowering.cpp 2031 if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
2034 } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
2039 } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
2329 if (Function *F = dyn_cast<Function>(SecurityCheckCookie.getCallee())) {
6033 if (auto *CInt = dyn_cast<ConstantInt>(Cst)) {
6037 if (auto *CFP = dyn_cast<ConstantFP>(Cst)) {
7330 if (const ShuffleVectorSDNode *SV = dyn_cast<ShuffleVectorSDNode>(N)) {
20544 auto *BV = dyn_cast<BuildVectorSDNode>(V.getNode());
26535 if (auto *C = dyn_cast<ConstantInt>(AI->getValOperand()))
34139 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(N))
38971 LoadSDNode *Ld = dyn_cast<LoadSDNode>(N.getNode());
38982 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(MemOp)) {
38983 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0))) {
39001 dyn_cast<ConstantInt>(Init->getAggregateElement(j));
41433 if (auto SVOp = dyn_cast<ShuffleVectorSDNode>(Op.getNode())) {
42983 if (auto *Gather = dyn_cast<MaskedGatherSDNode>(GorS)) {
43012 if (auto *Gather = dyn_cast<MaskedGatherSDNode>(GorS)) {
43039 if (auto *Gather = dyn_cast<MaskedGatherSDNode>(GorS)) {
45247 IntegerType *Ty = dyn_cast<IntegerType>(CI->getType());
45510 if (ConstantInt *C = dyn_cast<ConstantInt>(info.CallOperandVal)) {
45516 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45522 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45528 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45534 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45540 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45552 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
45559 if (ConstantInt *C = dyn_cast<ConstantInt>(CallOperandVal)) {
lib/Target/X86/X86IndirectBranchTracking.cpp 90 auto *CalleeFn = dyn_cast<Function>(MOp.getGlobal());
lib/Target/X86/X86InterleavedAccess.cpp 180 if (auto *SVI = dyn_cast<ShuffleVectorInst>(VecInst)) {
lib/Target/X86/X86MCInstLower.cpp 373 if (const MCSymbolRefExpr *SRE = dyn_cast<MCSymbolRefExpr>(MCE))
1734 } else if (auto *CI = dyn_cast<ConstantInt>(COp)) {
1736 } else if (auto *CF = dyn_cast<ConstantFP>(COp)) {
2286 if (auto *CF = dyn_cast<ConstantFP>(C)) {
2367 if (auto *CDS = dyn_cast<ConstantDataSequential>(C)) {
2386 } else if (auto *CV = dyn_cast<ConstantVector>(C)) {
lib/Target/X86/X86TargetTransformInfo.cpp 2411 if (VectorType *VTy = dyn_cast<VectorType>(Src)) {
2457 VectorType *SrcVTy = dyn_cast<VectorType>(SrcTy);
3098 if (auto GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
3121 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
3221 PointerType *PtrTy = dyn_cast<PointerType>(Ptr->getType());
3223 PtrTy = dyn_cast<PointerType>(Ptr->getType()->getVectorElementType());
lib/Target/X86/X86WinEHState.cpp 155 dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts());
444 if (auto *GEP = dyn_cast<GetElementPtrInst>(Link)) {
524 dyn_cast<FuncletPadInst>(FuncletEntryBB->getFirstNonPHI())) {
537 if (auto *II = dyn_cast<InvokeInst>(CS.getInstruction())) {
lib/Target/XCore/MCTargetDesc/XCoreInstPrinter.cpp 54 if (const MCBinaryExpr *BE = dyn_cast<MCBinaryExpr>(Expr)) {
55 SRE = dyn_cast<MCSymbolRefExpr>(BE->getLHS());
56 const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(BE->getRHS());
60 SRE = dyn_cast<MCSymbolRefExpr>(Expr);
lib/Target/XCore/XCoreAsmPrinter.cpp 92 if (ArrayType *ATy = dyn_cast<ArrayType>(GV->getValueType())) {
lib/Target/XCore/XCoreISelLowering.cpp 256 const auto *GVar = dyn_cast<GlobalVariable>(GV);
378 dyn_cast<GlobalAddressSDNode>(Base.getNode())) {
1003 if (auto *SI = dyn_cast<StoreInst>(&I))
1006 if (auto *LI = dyn_cast<LoadInst>(&I))
1009 if (auto *AI = dyn_cast<AtomicRMWInst>(&I))
1012 if (auto *AI = dyn_cast<AtomicCmpXchgInst>(&I))
lib/Target/XCore/XCoreLowerThreadLocal.cpp 84 return dyn_cast<Instruction>(Builder.CreateInBoundsGEP(
103 return dyn_cast<Instruction>(
119 return dyn_cast<Instruction>(
175 ArrayType *AT = dyn_cast<ArrayType>(Ty);
lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp 80 auto *I = dyn_cast<Instruction>(Curr);
175 if (auto *IOp = dyn_cast<Instruction>(Operand))
190 if (auto *IOp = dyn_cast<Instruction>(Operand)) {
243 if (auto *UI = dyn_cast<Instruction>(U))
279 if (auto *VTy = dyn_cast<VectorType>(V->getType()))
286 if (auto *C = dyn_cast<Constant>(V)) {
335 if (auto *NewCI = dyn_cast<TruncInst>(Res))
339 } else if (auto *NewCI = dyn_cast<TruncInst>(Res))
359 if (auto *ResI = dyn_cast<Instruction>(Res))
368 if (auto *ResI = dyn_cast<Instruction>(Res))
396 if (auto *CI = dyn_cast<TruncInst>(&I))
lib/Transforms/CFGuard/CFGuard.cpp 208 if (CallInst *CI = dyn_cast<CallInst>(CB)) {
269 auto *CB = dyn_cast<CallBase>(&I);
lib/Transforms/Coroutines/CoroCleanup.cpp 62 if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
lib/Transforms/Coroutines/CoroEarly.cpp 149 if (auto *CB = dyn_cast<CoroBeginInst>(U))
lib/Transforms/Coroutines/CoroElide.cpp 81 if (auto *Call = dyn_cast<CallInst>(&I))
178 if (auto *CB = dyn_cast<CoroBeginInst>(DA->getFrame()))
200 if (auto *CB = dyn_cast<CoroBeginInst>(U))
202 else if (auto *CA = dyn_cast<CoroAllocInst>(U))
204 else if (auto *CF = dyn_cast<CoroFreeInst>(U))
214 if (auto *II = dyn_cast<CoroSubFnInst>(U))
259 if (auto *SubFn = dyn_cast<CoroSubFnInst>(&I))
306 if (auto *CII = dyn_cast<CoroIdInst>(&I))
lib/Transforms/Coroutines/CoroFrame.cpp 120 if (auto *PN = dyn_cast<PHINode>(I))
443 if (auto *AI = dyn_cast<AllocaInst>(CurrentDef)) {
453 if (auto *CI = dyn_cast<ConstantInt>(AI->getArraySize()))
624 if (auto *AI = dyn_cast<AllocaInst>(Orig)) {
625 if (auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) {
662 if (auto *AI = dyn_cast<AllocaInst>(CurrentValue)) {
673 if (auto Arg = dyn_cast<Argument>(CurrentValue)) {
684 } else if (auto *II = dyn_cast<InvokeInst>(CurrentValue)) {
692 if (auto *CSI = dyn_cast<CatchSwitchInst>(DefBlock->getTerminator()))
696 } else if (auto CSI = dyn_cast<AnyCoroSuspendInst>(CurrentValue)) {
731 if (auto *PN = dyn_cast<PHINode>(E.user())) {
797 if (auto *II = dyn_cast<InvokeInst>(TI))
799 else if (auto *CS = dyn_cast<CatchSwitchInst>(TI))
801 else if (auto *CR = dyn_cast<CleanupReturnInst>(TI))
855 if (auto *FuncletPad = dyn_cast<FuncletPadInst>(PadInst))
857 else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(PadInst))
915 PN = dyn_cast<PHINode>(PN->getNextNode());
931 if (auto *PN = dyn_cast<PHINode>(&BB.front()))
978 if (auto *PN = dyn_cast<PHINode>(E.user())) {
1048 if (auto FI = dyn_cast<CoroAllocaFreeInst>(User))
1081 auto FI = dyn_cast<CoroAllocaFreeInst>(U);
1307 auto Alloca = dyn_cast<AllocaInst>(&Inst);
1398 if (auto AI = dyn_cast<CoroAllocaAllocInst>(&I)) {
lib/Transforms/Coroutines/CoroInstr.h 86 if (auto *CA = dyn_cast<CoroAllocInst>(U))
93 if (auto *II = dyn_cast<IntrinsicInst>(U))
164 auto *GV = dyn_cast<GlobalVariable>(getRawInfo());
170 if ((Result.OutlinedParts = dyn_cast<ConstantStruct>(Initializer)))
378 if (auto *SI = dyn_cast<CoroSaveInst>(Arg))
398 if (auto Suspend = dyn_cast<CoroSuspendInst>(this))
lib/Transforms/Coroutines/CoroInternal.h 177 if (auto STy = dyn_cast<StructType>(FTy->getReturnType())) {
lib/Transforms/Coroutines/CoroSplit.cpp 200 auto RetStructTy = dyn_cast<StructType>(RetTy);
437 auto EVI = dyn_cast<ExtractValueInst>((UI++)->getUser());
917 if (auto *BR = dyn_cast<BranchInst>(I)) {
924 } else if (auto *SI = dyn_cast<SwitchInst>(I)) {
929 if (ConstantInt *Cond = dyn_cast<ConstantInt>(V)) {
952 if (auto *Call = dyn_cast<CallInst>(&I))
1091 auto *SubFn = dyn_cast<CoroSubFnInst>(Callee);
1113 if (auto *Invoke = dyn_cast<InvokeInst>(CallInstr)) {
1123 if (auto *I = dyn_cast<Instruction>(CalledValue))
1442 if (auto ConcreteFn = dyn_cast<Function>(Fn)) {
1456 auto *Cast = dyn_cast<BitCastInst>((UI++)->getUser());
1463 if (auto *CB = dyn_cast<CallBase>(Use.getUser())) {
1483 while (auto *Cast = dyn_cast<BitCastInst>(CastFn)) {
lib/Transforms/Coroutines/Coroutines.cpp 169 if (auto CF = dyn_cast<CoroFreeInst>(U))
193 if (auto *Call = dyn_cast<CallBase>(&I)) {
256 if (auto II = dyn_cast<IntrinsicInst>(&I)) {
293 auto Id = dyn_cast<CoroIdInst>(CB->getId());
361 auto Suspend = dyn_cast<CoroSuspendInst>(AnySuspend);
395 auto Suspend = dyn_cast<CoroSuspendRetconInst>(AnySuspend);
440 } else if (auto SResultStructTy = dyn_cast<StructType>(SResultTy)) {
555 auto F = dyn_cast<Function>(V->stripPointerCasts());
565 } else if (auto SRetTy = dyn_cast<StructType>(FT->getReturnType())) {
591 auto F = dyn_cast<Function>(V->stripPointerCasts());
606 auto F = dyn_cast<Function>(V->stripPointerCasts());
lib/Transforms/IPO/ArgumentPromotion.cpp 170 if (LoadInst *L = dyn_cast<LoadInst>(UI))
187 if (LoadInst *L = dyn_cast<LoadInst>(UI))
294 if (auto *ElPTy = dyn_cast<PointerType>(ElTy))
328 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
412 CallInst *Call = dyn_cast<CallInst>(U);
429 if (LoadInst *LI = dyn_cast<LoadInst>(I->user_back())) {
628 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
630 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
669 if (LoadInst *LI = dyn_cast<LoadInst>(UR)) {
679 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) {
703 if (LoadInst *LI = dyn_cast<LoadInst>(GEPU)) {
791 if (SequentialType *seqTy = dyn_cast<SequentialType>(type))
831 } else if (StoreInst *Store = dyn_cast<StoreInst>(V)) {
957 if (StructType *STy = dyn_cast<StructType>(AgTy)) {
989 if (StructType *STy = dyn_cast<StructType>(AgTy)) {
lib/Transforms/IPO/Attributor.cpp 209 if (auto *SI = dyn_cast<SelectInst>(V)) {
216 if (auto *PHI = dyn_cast<PHINode>(V)) {
286 if (auto *LI = dyn_cast<LoadInst>(I))
290 if (auto *SI = dyn_cast<StoreInst>(I))
294 if (auto *CXI = dyn_cast<AtomicCmpXchgInst>(I))
298 if (auto *RMWI = dyn_cast<AtomicRMWInst>(I))
732 if (const Instruction *UserI = dyn_cast<Instruction>(U->getUser())) {
989 if (auto *UniqueRVArg = dyn_cast<Argument>(UniqueRV.getValue())) {
992 } else if (auto *RVC = dyn_cast<Constant>(UniqueRV.getValue())) {
995 if (Function *F = dyn_cast<Function>(&AnchorValue)) {
997 if (CallBase *CB = dyn_cast<CallBase>(U.getUser()))
1067 CallBase *CB = dyn_cast<CallBase>(RV);
1132 CallBase *CB = dyn_cast<CallBase>(It.first);
1199 if (Argument *Arg = dyn_cast<Argument>(RetVal)) {
1340 if (auto *II = dyn_cast<IntrinsicInst>(I)) {
2038 if (Constant *C = dyn_cast<Constant>(&RV))
2160 if (auto *II = dyn_cast<InvokeInst>(I)) {
2350 if (auto *Invoke = dyn_cast<InvokeInst>(I)) {
2704 if (auto *SI = dyn_cast<StoreInst>(U.getUser())) {
2712 } else if (auto *LI = dyn_cast<LoadInst>(U.getUser())) {
3373 if (auto *C = dyn_cast<Constant>(SimplifiedAssociatedValue.getValue())) {
3575 auto *SizeT = dyn_cast<ConstantInt>(MallocCall->getOperand(1));
3593 if (auto *II = dyn_cast<InvokeInst>(MallocCall)) {
3651 if (auto *SI = dyn_cast<StoreInst>(UserI)) {
3665 if (auto *CB = dyn_cast<CallBase>(UserI)) {
3719 if (auto *Size = dyn_cast<ConstantInt>(I.getOperand(0)))
3727 if (auto *Num = dyn_cast<ConstantInt>(I.getOperand(0)))
3728 if (auto *Size = dyn_cast<ConstantInt>(I.getOperand(1)))
3796 if (auto *I = dyn_cast<Instruction>(&IRP.getAnchorValue())) {
lib/Transforms/IPO/BlockExtractor.cpp 204 if (const InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
lib/Transforms/IPO/CalledValuePropagation.cpp 127 } else if (auto *A = dyn_cast<Argument>(Key.getPointer())) {
130 } else if (auto *C = dyn_cast<Constant>(Key.getPointer())) {
136 if (auto *GV = dyn_cast<GlobalVariable>(Key.getPointer())) {
233 if (auto *F = dyn_cast<Function>(C->stripPointerCasts()))
318 if (auto *GV = dyn_cast<GlobalVariable>(I.getPointerOperand())) {
333 auto *GV = dyn_cast<GlobalVariable>(I.getPointerOperand());
lib/Transforms/IPO/DeadArgumentElimination.cpp 141 CallInst *CI = dyn_cast<CallInst>(&I);
146 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI)) {
199 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
331 else if (StructType *STy = dyn_cast<StructType>(RetTy))
333 else if (ArrayType *ATy = dyn_cast<ArrayType>(RetTy))
346 if (StructType *STy = dyn_cast<StructType>(RetTy))
348 else if (ArrayType *ATy = dyn_cast<ArrayType>(RetTy))
381 if (const ReturnInst *RI = dyn_cast<ReturnInst>(V)) {
406 if (const InsertValueInst *IV = dyn_cast<InsertValueInst>(V)) {
519 if (const ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator())) {
584 if (ExtractValueInst *Ext = dyn_cast<ExtractValueInst>(U.getUser())) {
814 if (StructType *STy = dyn_cast<StructType>(RetTy)) {
937 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
970 if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
1034 if (ReturnInst *RI = dyn_cast<ReturnInst>(BB.getTerminator())) {
lib/Transforms/IPO/ExtractGV.cpp 135 if (FunctionType *FTy = dyn_cast<FunctionType>(Ty)) {
lib/Transforms/IPO/FunctionAttrs.cpp 135 if (auto *Call = dyn_cast<CallBase>(I)) {
185 } else if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
192 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
199 } else if (VAArgInst *VI = dyn_cast<VAArgInst>(I)) {
594 if (auto *Ret = dyn_cast<ReturnInst>(BB.getTerminator())) {
649 auto *FArg = dyn_cast<Argument>(CS.getArgOperand(CSArg.getArgNo()));
864 if (ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator()))
870 if (Constant *C = dyn_cast<Constant>(RetVal)) {
880 if (Instruction *RVI = dyn_cast<Instruction>(RetVal))
977 if (auto *Ret = dyn_cast<ReturnInst>(BB.getTerminator()))
991 Instruction *RVI = dyn_cast<Instruction>(RetVal);
1235 if (const auto *CI = dyn_cast<CallInst>(&I)) {
1574 auto *I = dyn_cast<Instruction>(U);
lib/Transforms/IPO/FunctionImport.cpp 547 dyn_cast<FunctionSummary>(GVSummary.second->getBaseObject());
581 FS = dyn_cast<FunctionSummary>(
823 if (auto *AS = dyn_cast<AliasSummary>(Summary.get())) {
834 if (auto *FS = dyn_cast<FunctionSummary>(Summary.get()))
862 if (auto *GVS = dyn_cast<GlobalVarSummary>(S.get())) {
913 if (Function *F = dyn_cast<Function>(&GV)) {
917 } else if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) {
lib/Transforms/IPO/GlobalDCE.cpp 91 if (auto *RI = dyn_cast<ReturnInst>(&I))
102 if (auto *I = dyn_cast<Instruction>(V)) {
105 } else if (auto *GV = dyn_cast<GlobalValue>(V)) {
107 } else if (auto *CE = dyn_cast<Constant>(V)) {
191 if (auto GO = dyn_cast<GlobalObject>(&GV)) {
218 auto Callee = dyn_cast<Function>(Ptr->stripPointerCasts());
240 auto CI = dyn_cast<CallInst>(U);
244 auto *Offset = dyn_cast<ConstantInt>(CI->getArgOperand(1));
lib/Transforms/IPO/GlobalOpt.cpp 174 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
210 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
215 } else if (Instruction *I = dyn_cast<Instruction>(V)) {
219 } else if (MemSetInst *MSI = dyn_cast<MemSetInst>(U)) {
223 } else if (Instruction *I = dyn_cast<Instruction>(MSI->getValue())) {
227 } else if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(U)) {
228 GlobalVariable *MemSrc = dyn_cast<GlobalVariable>(MTI->getSource());
232 } else if (Instruction *I = dyn_cast<Instruction>(MemSrc)) {
236 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
241 } else if (Constant *C = dyn_cast<Constant>(U)) {
259 Instruction *J = dyn_cast<Instruction>(I->getOperand(0));
291 if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
298 } else if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
302 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
319 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
342 } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(U)) { // memset/cpy/mv
348 } else if (Constant *C = dyn_cast<Constant>(U)) {
386 ConstantInt *IdxVal = dyn_cast<ConstantInt>(GEPI.getOperand());
400 if (Constant *C = dyn_cast<Constant>(V))
403 Instruction *I = dyn_cast<Instruction>(V);
410 if (StoreInst *SI = dyn_cast<StoreInst>(I))
479 if (StructType *STy = dyn_cast<StructType>(Ty)) {
509 } else if (SequentialType *STy = dyn_cast<SequentialType>(Ty)) {
569 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) {
588 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP))
617 if (const Instruction *I = dyn_cast<Instruction>(U)) {
625 } else if (const StoreInst *SI = dyn_cast<StoreInst>(U)) {
630 } else if (const CallInst *CI = dyn_cast<CallInst>(U)) {
635 } else if (const InvokeInst *II = dyn_cast<InvokeInst>(U)) {
640 } else if (const BitCastInst *CI = dyn_cast<BitCastInst>(U)) {
642 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
644 } else if (const PHINode *PN = dyn_cast<PHINode>(U)) {
665 if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {
687 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
690 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
714 } else if (CastInst *CI = dyn_cast<CastInst>(I)) {
722 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
762 if (LoadInst *LI = dyn_cast<LoadInst>(GlobalUser)) {
818 if (Instruction *I = dyn_cast<Instruction>(*UI++))
863 if (BitCastInst *BCI = dyn_cast<BitCastInst>(User)) {
892 if (StoreInst *SI = dyn_cast<StoreInst>(GV->user_back())) {
903 ICmpInst *ICI = dyn_cast<ICmpInst>(LoadUse.getUser());
975 if (const StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
988 if (const PHINode *PN = dyn_cast<PHINode>(Inst)) {
997 if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Inst)) {
1017 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
1023 } else if (PHINode *PN = dyn_cast<PHINode>(U)) {
1032 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
1036 if (StoreInst *SI = dyn_cast<StoreInst>(GEPI->user_back()))
1065 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UI)) {
1072 if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) {
1081 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1112 if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {
1131 if (const PHINode *InPN = dyn_cast<PHINode>(InVal)) {
1139 if (const LoadInst *LI = dyn_cast<LoadInst>(InVal))
1168 if (LoadInst *LI = dyn_cast<LoadInst>(V)) {
1201 if (ICmpInst *SCI = dyn_cast<ICmpInst>(LoadUser)) {
1217 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(LoadUser)) {
1311 if (StructType *ST = dyn_cast<StructType>(FieldTy))
1403 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1444 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1446 else if (LoadInst *LI = dyn_cast<LoadInst>(I->first))
1454 if (PHINode *PN = dyn_cast<PHINode>(I->first))
1456 else if (LoadInst *LI = dyn_cast<LoadInst>(I->first))
1505 if (ConstantInt *NElements = dyn_cast<ConstantInt>(NElems))
1524 if (ArrayType *AT = dyn_cast<ArrayType>(AllocTy))
1527 StructType *AllocSTy = dyn_cast<StructType>(AllocTy);
1538 if (ArrayType *AT = dyn_cast<ArrayType>(getMallocAllocatedType(CI, TLI))) {
1551 if (BitCastInst *BCI = dyn_cast<BitCastInst>(Malloc))
1583 if (Constant *SOVC = dyn_cast<Constant>(StoredOnceVal)) {
1649 auto *CI = dyn_cast<ConstantInt>(OtherVal);
1653 auto *CIInit = dyn_cast<ConstantInt>(GV->getInitializer());
1698 if (StoreInst *SI = dyn_cast<StoreInst>(UI)) {
1715 if (LoadInst *LI = dyn_cast<LoadInst>(StoredVal)) {
1772 if (auto *F = dyn_cast<Function>(&GV))
1804 if (auto *LI = dyn_cast<LoadInst>(UU))
1806 else if (auto *SI = dyn_cast<StoreInst>(UU))
1814 Instruction *I = dyn_cast<Instruction>(U);
1819 if (auto *LI = dyn_cast<LoadInst>(I))
1821 else if (auto *SI = dyn_cast<StoreInst>(I))
2023 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
2049 if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue)) {
2091 auto *GVar = dyn_cast<GlobalVariable>(&GV);
2148 CallInst* CI = dyn_cast<CallInst>(U);
2219 if (CallInst *CI = dyn_cast<CallInst>(&I)) {
2365 if (auto *C = dyn_cast<Constant>(GV->getInitializer())) {
2397 if (StructType *STy = dyn_cast<StructType>(Init->getType())) {
2432 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Addr)) {
2491 if (auto *GV = dyn_cast<GlobalVariable>(I.first)) {
2532 if (StructType *STy = dyn_cast<StructType>(CurrentInitTy))
2534 else if (ArrayType *ArrTy = dyn_cast<ArrayType>(CurrentInitTy))
2545 if (auto *STy = dyn_cast<StructType>(Ty))
2778 GlobalValue *Target = dyn_cast<GlobalValue>(Aliasee->stripPointerCasts());
2890 CallInst *CI = dyn_cast<CallInst>(*I++);
2895 dyn_cast<Function>(CI->getArgOperand(0)->stripPointerCasts());
lib/Transforms/IPO/GlobalSplit.cpp 59 auto *GEP = dyn_cast<GEPOperator>(U);
lib/Transforms/IPO/IPConstantPropagation.cpp 170 StructType *STy = dyn_cast<StructType>(F.getReturnType());
179 if (ReturnInst *RI = dyn_cast<ReturnInst>(BB.getTerminator())) {
240 if (Argument *A = dyn_cast<Argument>(New))
256 if (ExtractValueInst *EV = dyn_cast<ExtractValueInst>(Ins))
265 if (Argument *A = dyn_cast<Argument>(New))
lib/Transforms/IPO/Inliner.cpp 190 ArrayType *ATy = dyn_cast<ArrayType>(AI->getAllocatedType());
227 if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(U))
lib/Transforms/IPO/Internalize.cpp 119 if (auto GO = dyn_cast<GlobalObject>(&GV))
lib/Transforms/IPO/LowerTypeTests.cpp 363 dyn_cast<Function>(GIS.getIndirectSymbol()->stripPointerCasts()))
689 if (auto GV = dyn_cast<GlobalObject>(V)) {
705 if (auto GEP = dyn_cast<GEPOperator>(V)) {
714 if (auto Op = dyn_cast<Operator>(V)) {
780 if (auto *Br = dyn_cast<BranchInst>(*CI->user_begin()))
966 if (auto *GV = dyn_cast<GlobalVariable>(C))
1027 auto TypeIdMDVal = dyn_cast<MetadataAsValue>(CI->getArgOperand(1));
1031 auto TypeIdStr = dyn_cast<MDString>(TypeIdMDVal->getMetadata());
1085 if (auto *A = dyn_cast<GlobalAlias>(U.getUser())) {
1116 if (auto MDS = dyn_cast<MDString>(TypeId))
1185 auto OffsetInt = dyn_cast<ConstantInt>(OffsetConstMD->getValue());
1278 if (auto *GV = dyn_cast<GlobalVariable>(U))
1280 else if (auto *C2 = dyn_cast<Constant>(U))
1703 auto *Usr = dyn_cast<CallInst>(U.getUser());
1730 if (auto *C = dyn_cast<Constant>(U.getUser())) {
1951 if (Function *F = dyn_cast<Function>(&GO)) {
2002 auto TypeIdMDVal = dyn_cast<MetadataAsValue>(CI->getArgOperand(1));
2025 auto *Base = dyn_cast<GlobalObject>(GetPointerBaseWithConstantOffset(
2051 if (auto *TypeId = dyn_cast<MDString>(P.first))
2060 if (auto *FS = dyn_cast<FunctionSummary>(S->getBaseObject()))
lib/Transforms/IPO/MergeFunctions.cpp 557 if (auto *DVI = dyn_cast<DbgValueInst>(&*BI)) {
572 } else if (auto *DDI = dyn_cast<DbgDeclareInst>(&*BI)) {
585 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
587 if (dyn_cast<Argument>(Arg)) {
950 if (auto *I = dyn_cast<Instruction>(U))
lib/Transforms/IPO/PartialInlining.cpp 307 if (CallInst *CI = dyn_cast<CallInst>(U))
309 else if (InvokeInst *II = dyn_cast<InvokeInst>(U))
558 BranchInst *BR = dyn_cast<BranchInst>(EntryBlock->getTerminator());
710 BranchInst *BR = dyn_cast<BranchInst>(E->getTerminator());
871 if (CallInst *CI = dyn_cast<CallInst>(&I)) {
876 if (InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
881 if (SwitchInst *SI = dyn_cast<SwitchInst>(&I)) {
1470 if (Instruction *I = dyn_cast<Instruction>(U))
lib/Transforms/IPO/PruneEH.cpp 125 if (const auto *CI = dyn_cast<CallInst>(&I)) {
138 if (const auto *IA = dyn_cast<InlineAsm>(ICS.getCalledValue()))
191 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
245 if (auto *Call = dyn_cast<CallBase>(&*I)) {
lib/Transforms/IPO/SampleProfile.cpp 776 if (const CallInst *CI = dyn_cast<CallInst>(&Inst))
1730 Function *F = dyn_cast<Function>(N_F.getValue());
lib/Transforms/IPO/StripSymbols.cpp 146 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
199 dyn_cast<GlobalValue>(Inits->getOperand(i)->stripPointerCasts()))
264 if (Constant *C = dyn_cast<Constant>(Arg1))
270 if (Constant *C = dyn_cast<Constant>(Arg2))
279 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp 188 if (auto *F = dyn_cast<Function>(C))
231 if (auto *AssocGO = dyn_cast<GlobalObject>(AssocVM->getValue()))
258 auto *RT = dyn_cast<IntegerType>(F->getReturnType());
263 auto *ArgT = dyn_cast<IntegerType>(Arg.getType());
279 if (auto *F = dyn_cast<Function>(GV))
lib/Transforms/IPO/WholeProgramDevirt.cpp 338 if (auto II = dyn_cast<InvokeInst>(CS.getInstruction())) {
423 auto *CI = dyn_cast<IntegerType>(CS.getType());
824 auto Fn = dyn_cast<Function>(Ptr->stripPointerCasts());
1175 auto *ArgTy = dyn_cast<IntegerType>(
1263 auto *GV = dyn_cast<GlobalVariable>(C);
1394 auto RetType = dyn_cast<IntegerType>(TargetsForSlot[0].Fn->getReturnType());
1561 auto CI = dyn_cast<CallInst>(I->getUser());
1604 auto CI = dyn_cast<CallInst>(I->getUser());
1679 auto *TypeId = dyn_cast<MDString>(Slot.TypeID);
1814 if (auto *TypeId = dyn_cast<MDString>(P.first))
1821 auto *FS = dyn_cast<FunctionSummary>(S.get());
1942 auto *FS = dyn_cast<FunctionSummary>(S.get());
lib/Transforms/InstCombine/InstCombineAddSub.cpp 349 if (!Val || !(I = dyn_cast<Instruction>(Val)))
358 if ((C0 = dyn_cast<ConstantFP>(Opnd0)) && C0->isZero())
361 if ((C1 = dyn_cast<ConstantFP>(Opnd1)) && C1->isZero())
392 if (ConstantFP *C = dyn_cast<ConstantFP>(V0)) {
397 if (ConstantFP *C = dyn_cast<ConstantFP>(V1)) {
660 if (Instruction *I = dyn_cast<Instruction>(V))
668 if (Instruction *I = dyn_cast<Instruction>(NewV))
675 if (Instruction *I = dyn_cast<Instruction>(V))
682 if (Instruction *I = dyn_cast<Instruction>(V))
1069 if (auto *BOp = dyn_cast<BinaryOperator>(NotMask)) {
1227 if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
1322 if (ConstantInt *CRHS = dyn_cast<ConstantInt>(RHS)) {
1349 SelectInst *SI = dyn_cast<SelectInst>(LHS);
1352 SI = dyn_cast<SelectInst>(RHS);
1516 if (SIToFPInst *LHSConv = dyn_cast<SIToFPInst>(LHS)) {
1539 if (ConstantFP *CFP = dyn_cast<ConstantFP>(RHS))
1553 if (SIToFPInst *RHSConv = dyn_cast<SIToFPInst>(RHS)) {
1598 if (GEPOperator *LHSGEP = dyn_cast<GEPOperator>(LHS)) {
1603 } else if (GEPOperator *RHSGEP = dyn_cast<GEPOperator>(RHS)) {
1614 if (GEPOperator *RHSGEP = dyn_cast<GEPOperator>(RHS)) {
1619 } else if (GEPOperator *LHSGEP = dyn_cast<GEPOperator>(LHS)) {
1690 if (const auto *BO = dyn_cast<BinaryOperator>(Op1)) {
1729 if (Constant *C = dyn_cast<Constant>(Op0)) {
1752 if (SelectInst *SI = dyn_cast<SelectInst>(Op1))
1757 if (PHINode *PN = dyn_cast<PHINode>(Op1))
2128 if (SelectInst *SI = dyn_cast<SelectInst>(Op1))
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp 232 ConstantInt *ACst = dyn_cast<ConstantInt>(A);
233 ConstantInt *BCst = dyn_cast<ConstantInt>(B);
234 ConstantInt *CCst = dyn_cast<ConstantInt>(C);
456 ConstantInt *BCst = dyn_cast<ConstantInt>(B);
459 ConstantInt *CCst = dyn_cast<ConstantInt>(C);
462 ConstantInt *DCst = dyn_cast<ConstantInt>(D);
465 ConstantInt *ECst = dyn_cast<ConstantInt>(E);
677 ConstantInt *BCst = dyn_cast<ConstantInt>(B);
680 ConstantInt *DCst = dyn_cast<ConstantInt>(D);
722 ConstantInt *CCst = dyn_cast<ConstantInt>(C);
725 ConstantInt *ECst = dyn_cast<ConstantInt>(E);
756 ConstantInt *RangeStart = dyn_cast<ConstantInt>(Cmp0->getOperand(1));
872 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
873 ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS->getOperand(1));
1200 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
1201 ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS->getOperand(1));
1447 if (auto *NewFCmpInst = dyn_cast<FCmpInst>(NewFCmp)) {
1488 if (const auto *PrecedingCI = dyn_cast<CastInst>(CastSrc))
1498 Constant *C = dyn_cast<Constant>(Logic.getOperand(1));
1540 CastInst *Cast0 = dyn_cast<CastInst>(Op0);
1554 CastInst *Cast1 = dyn_cast<CastInst>(Op1);
1580 ICmpInst *ICmp0 = dyn_cast<ICmpInst>(Cast0Src);
1581 ICmpInst *ICmp1 = dyn_cast<ICmpInst>(Cast1Src);
1592 FCmpInst *FCmp0 = dyn_cast<FCmpInst>(Cast0Src);
1593 FCmpInst *FCmp1 = dyn_cast<FCmpInst>(Cast1Src);
1656 if (auto *ScalarC = dyn_cast<ConstantInt>(C))
1668 auto *CI = dyn_cast<ConstantInt>(Elt);
1808 if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(Op1)) {
1812 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) {
1845 if (ConstantInt *Op0CI = dyn_cast<ConstantInt>(Op0I->getOperand(1)))
1915 ICmpInst *LHS = dyn_cast<ICmpInst>(Op0);
1916 ICmpInst *RHS = dyn_cast<ICmpInst>(Op1);
1925 if (auto *Cmp = dyn_cast<ICmpInst>(X))
1928 if (auto *Cmp = dyn_cast<ICmpInst>(Y))
1933 if (auto *Cmp = dyn_cast<ICmpInst>(X))
1936 if (auto *Cmp = dyn_cast<ICmpInst>(Y))
1942 if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
1943 if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
1984 if (Instruction *Ext = dyn_cast<ZExtInst>(Op0))
1987 if (Instruction *Ext = dyn_cast<ZExtInst>(Op1))
2198 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1));
2199 ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS->getOperand(1));
2499 ConstantInt *C1 = dyn_cast<ConstantInt>(C);
2500 ConstantInt *C2 = dyn_cast<ConstantInt>(D);
2626 if (BinaryOperator *B = dyn_cast<BinaryOperator>(A))
2640 ICmpInst *LHS = dyn_cast<ICmpInst>(Op0);
2641 ICmpInst *RHS = dyn_cast<ICmpInst>(Op1);
2650 if (auto *Cmp = dyn_cast<ICmpInst>(X))
2653 if (auto *Cmp = dyn_cast<ICmpInst>(Y))
2658 if (auto *Cmp = dyn_cast<ICmpInst>(X))
2661 if (auto *Cmp = dyn_cast<ICmpInst>(Y))
2667 if (FCmpInst *LHS = dyn_cast<FCmpInst>(I.getOperand(0)))
2668 if (FCmpInst *RHS = dyn_cast<FCmpInst>(I.getOperand(1)))
3125 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(Op1)) {
3126 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) {
3127 if (ConstantInt *Op0CI = dyn_cast<ConstantInt>(Op0I->getOperand(1))) {
3134 (E1 = dyn_cast<BinaryOperator>(Op0I->getOperand(0))) &&
3136 (C1 = dyn_cast<ConstantInt>(E1->getOperand(1)))) {
3207 if (auto *LHS = dyn_cast<ICmpInst>(I.getOperand(0)))
3208 if (auto *RHS = dyn_cast<ICmpInst>(I.getOperand(1)))
lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp 24 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand()))
34 auto C = dyn_cast<ConstantInt>(RMWI.getValOperand());
62 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand()))
71 auto C = dyn_cast<ConstantInt>(RMWI.getValOperand());
lib/Transforms/InstCombine/InstCombineCalls.cpp 86 if (IntegerType* ITy = dyn_cast<IntegerType>(Ty)) {
136 ConstantInt *MemOpLength = dyn_cast<ConstantInt>(MI->getLength());
211 if (auto *MT = dyn_cast<MemTransferInst>(MI)) {
245 ConstantInt *LenC = dyn_cast<ConstantInt>(MI->getLength());
246 ConstantInt *FillC = dyn_cast<ConstantInt>(MI->getValue());
358 auto CAZ = dyn_cast<ConstantAggregateZero>(Arg1);
359 auto CDV = dyn_cast<ConstantDataVector>(Arg1);
360 auto CInt = dyn_cast<ConstantInt>(Arg1);
467 auto *CShift = dyn_cast<Constant>(II.getArgOperand(1));
669 auto *CInt = dyn_cast<ConstantInt>(II.getArgOperand(2));
737 Constant *C0 = dyn_cast<Constant>(Op0);
875 Constant *C0 = dyn_cast<Constant>(Op0);
876 Constant *C1 = dyn_cast<Constant>(Op1);
917 Constant *V = dyn_cast<Constant>(II.getArgOperand(1));
964 Constant *V = dyn_cast<Constant>(II.getArgOperand(1));
1014 auto *V = dyn_cast<Constant>(II.getArgOperand(1));
1077 auto *ConstMask = dyn_cast<Constant>(II.getArgOperand(3));
1123 auto *ConstMask = dyn_cast<Constant>(II.getArgOperand(3));
1245 auto *IT = dyn_cast<IntegerType>(Op0->getType());
1271 auto *IT = dyn_cast<IntegerType>(Op0->getType());
1308 auto *ConstMask = dyn_cast<ConstantDataVector>(Mask);
1351 auto *ConstMask = dyn_cast<ConstantDataVector>(Mask);
1403 auto *C = dyn_cast<Constant>(II.getArgOperand(1));
1442 auto *IntrAlign = dyn_cast<ConstantInt>(II.getArgOperand(1));
1796 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI);
1801 if (auto *MI = dyn_cast<AnyMemIntrinsic>(II)) {
1805 if (Constant *NumBytes = dyn_cast<Constant>(MI->getLength())) {
1809 if (ConstantInt *CI = dyn_cast<ConstantInt>(NumBytes))
1818 if (auto *M = dyn_cast<MemIntrinsic>(MI))
1825 if (auto *MMI = dyn_cast<AnyMemMoveInst>(MI)) {
1826 if (GlobalVariable *GVSrc = dyn_cast<GlobalVariable>(MMI->getSource()))
1841 if (AnyMemTransferInst *MTI = dyn_cast<AnyMemTransferInst>(MI)) {
1849 if (auto *MTI = dyn_cast<AnyMemTransferInst>(MI)) {
1852 } else if (auto *MSI = dyn_cast<AnyMemSetInst>(MI)) {
1919 if (ConstantInt *Power = dyn_cast<ConstantInt>(II->getArgOperand(1))) {
2121 if (auto *Other = dyn_cast<IntrinsicInst>(Arg0)) {
2193 if (auto *M = dyn_cast<IntrinsicInst>(Arg0)) {
2415 if (auto *C = dyn_cast<ConstantInt>(II->getArgOperand(1))) {
2424 if (auto *InC = dyn_cast<ConstantInt>(II->getArgOperand(0))) {
2439 if (auto *C = dyn_cast<ConstantInt>(II->getArgOperand(1))) {
2447 if (auto *InC = dyn_cast<ConstantInt>(II->getArgOperand(0))) {
2634 if (auto *R = dyn_cast<ConstantInt>(II->getArgOperand(2))) {
2675 if (auto *R = dyn_cast<ConstantInt>(II->getArgOperand(4))) {
2706 auto *C = dyn_cast<ConstantInt>(Mask);
2860 if (auto *C = dyn_cast<ConstantInt>(II->getArgOperand(2))) {
2913 Constant *C1 = dyn_cast<Constant>(Op1);
2950 ConstantInt *CILength = dyn_cast<ConstantInt>(II->getArgOperand(1));
2951 ConstantInt *CIIndex = dyn_cast<ConstantInt>(II->getArgOperand(2));
2976 Constant *C1 = dyn_cast<Constant>(Op1);
3012 ConstantInt *CILength = dyn_cast<ConstantInt>(II->getArgOperand(2));
3013 ConstantInt *CIIndex = dyn_cast<ConstantInt>(II->getArgOperand(3));
3057 if (auto *ConstantMask = dyn_cast<ConstantDataVector>(Mask)) {
3164 if (Constant *Mask = dyn_cast<Constant>(II->getArgOperand(2))) {
3240 ConstantInt *IntrAlign = dyn_cast<ConstantInt>(II->getArgOperand(AlignArg));
3272 if (Constant *CV0 = dyn_cast<Constant>(Arg0)) {
3273 if (Constant *CV1 = dyn_cast<Constant>(Arg1)) {
3285 if (Constant *CV1 = dyn_cast<Constant>(Arg1))
3331 if (const ConstantFP *C = dyn_cast<ConstantFP>(Src)) {
3355 if (const ConstantFP *C = dyn_cast<ConstantFP>(Src)) {
3396 const ConstantInt *CMask = dyn_cast<ConstantInt>(Src1);
3438 const ConstantFP *CVal = dyn_cast<ConstantFP>(Src0);
3475 if (const ConstantFP *C0 = dyn_cast<ConstantFP>(Src0)) {
3476 if (const ConstantFP *C1 = dyn_cast<ConstantFP>(Src1)) {
3520 ConstantInt *CWidth = dyn_cast<ConstantInt>(II->getArgOperand(2));
3535 ConstantInt *COffset = dyn_cast<ConstantInt>(II->getArgOperand(1));
3648 if (const ConstantFP *C0 = dyn_cast<ConstantFP>(Src0)) {
3649 if (const ConstantFP *C1 = dyn_cast<ConstantFP>(Src1)) {
3650 if (const ConstantFP *C2 = dyn_cast<ConstantFP>(Src2)) {
3676 if (auto *CSrc0 = dyn_cast<Constant>(Src0)) {
3677 if (auto *CSrc1 = dyn_cast<Constant>(Src1)) {
3753 if (auto *CmpType = dyn_cast<IntegerType>(Ty)) {
3805 const ConstantInt *C = dyn_cast<ConstantInt>(II->getArgOperand(0));
3831 if (Constant *C = dyn_cast<Constant>(II->getArgOperand(0)))
3837 Instruction *SrcInst = dyn_cast<Instruction>(Src);
3862 if (IntrinsicInst *SS = dyn_cast<IntrinsicInst>(II->getArgOperand(0))) {
3882 if (auto *II2 = dyn_cast<IntrinsicInst>(BCI)) {
4008 if (auto *PT = dyn_cast<PointerType>(II->getType())) {
4071 if (auto *NFI = dyn_cast<FenceInst>(Next))
4153 IntrinsicInst *II = dyn_cast<IntrinsicInst>(U);
4203 IntrinsicInst *AdjustTramp = dyn_cast<IntrinsicInst>(Callee);
4219 ConstantInt *Op0C = dyn_cast<ConstantInt>(Call.getOperand(0));
4221 (NumArgs == 1) ? nullptr : dyn_cast<ConstantInt>(Call.getOperand(1));
4303 if (Function *CalleeF = dyn_cast<Function>(Callee)) {
4393 if (CallInst *CI = dyn_cast<CallInst>(&Call)) {
4409 auto *Callee = dyn_cast<Function>(Call.getCalledValue()->stripPointerCasts());
4463 if (InvokeInst *II = dyn_cast<InvokeInst>(Caller))
4465 if (PHINode *PN = dyn_cast<PHINode>(U))
4508 PointerType *ParamPTy = dyn_cast<PointerType>(ParamTy);
4628 if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) {
4631 } else if (CallBrInst *CBI = dyn_cast<CallBrInst>(Caller)) {
4659 if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) {
4662 } else if (CallBrInst *CBI = dyn_cast<CallBrInst>(Caller)) {
4807 if (InvokeInst *II = dyn_cast<InvokeInst>(&Call)) {
4813 } else if (CallBrInst *CBI = dyn_cast<CallBrInst>(&Call)) {
lib/Transforms/InstCombine/InstCombineCasts.cpp 32 if (ConstantInt *CI = dyn_cast<ConstantInt>(Val)) {
38 if (BinaryOperator *I = dyn_cast<BinaryOperator>(Val)) {
40 OverflowingBinaryOperator *OBI = dyn_cast<OverflowingBinaryOperator>(Val);
47 if (ConstantInt *RHS = dyn_cast<ConstantInt>(I->getOperand(1))) {
163 if (Constant *C = dyn_cast<Constant>(V)) {
264 if (auto *CSrc = dyn_cast<CastInst>(Src)) { // A->B->C cast
277 if (auto *Sel = dyn_cast<SelectInst>(Src)) {
282 auto *Cmp = dyn_cast<CmpInst>(Sel->getCondition());
291 if (auto *PN = dyn_cast<PHINode>(Src)) {
639 auto *Shuf = dyn_cast<ShuffleVectorInst>(Trunc.getOperand(0));
663 auto *InsElt = dyn_cast<InsertElementInst>(Trunc.getOperand(0));
714 if (SelectInst *SI = dyn_cast<SelectInst>(CI.getOperand(0)))
928 if (IntegerType *ITy = dyn_cast<IntegerType>(CI.getType())) {
1117 if (auto *SrcOp = dyn_cast<Instruction>(Src))
1141 if (TruncInst *CSrc = dyn_cast<TruncInst>(Src)) { // A->B->C cast
1175 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Src))
1178 BinaryOperator *SrcI = dyn_cast<BinaryOperator>(Src);
1183 ICmpInst *LHS = dyn_cast<ICmpInst>(SrcI->getOperand(0));
1184 ICmpInst *RHS = dyn_cast<ICmpInst>(SrcI->getOperand(1));
1194 if (auto *LZExt = dyn_cast<ZExtInst>(LCast))
1196 if (auto *RZExt = dyn_cast<ZExtInst>(RCast))
1247 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) {
1413 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Src))
1477 auto *CV = dyn_cast<Constant>(V);
1505 if (auto *FPExt = dyn_cast<FPExtInst>(V))
1511 if (auto *CFP = dyn_cast<ConstantFP>(V))
1534 auto *BO = dyn_cast<BinaryOperator>(FPT.getOperand(0));
1622 Instruction *Op = dyn_cast<Instruction>(FPT.getOperand(0));
1635 if (auto *II = dyn_cast<IntrinsicInst>(FPT.getOperand(0))) {
1653 FPExtInst *FPExtSrc = dyn_cast<FPExtInst>(Src);
1728 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
1739 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
1782 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Src)) {
1910 if (Constant *C = dyn_cast<Constant>(V))
1926 if (Constant *C = dyn_cast<Constant>(V)) {
1959 Instruction *I = dyn_cast<Instruction>(V);
1980 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1));
2038 auto *ExtElt = dyn_cast<ExtractElementInst>(BitCast.getOperand(0));
2186 if (auto *LI = dyn_cast<LoadInst>(IncValue)) {
2201 if (auto *PNode = dyn_cast<PHINode>(IncValue)) {
2207 auto *BCI = dyn_cast<BitCastInst>(IncValue);
2234 if (auto *C = dyn_cast<Constant>(V)) {
2236 } else if (auto *LI = dyn_cast<LoadInst>(V)) {
2240 } else if (auto *BCI = dyn_cast<BitCastInst>(V)) {
2242 } else if (auto *PrevPN = dyn_cast<PHINode>(V)) {
2263 if (auto *SI = dyn_cast<StoreInst>(V)) {
2273 else if (auto *BCI = dyn_cast<BitCastInst>(V)) {
2301 if (PointerType *DstPTy = dyn_cast<PointerType>(DestTy)) {
2316 if (AllocaInst *AI = dyn_cast<AllocaInst>(Src))
2361 if (VectorType *DestVTy = dyn_cast<VectorType>(DestTy)) {
2375 if (BitCastInst *BCIn = dyn_cast<BitCastInst>(SrcCast->getOperand(0)))
2390 if (VectorType *SrcVTy = dyn_cast<VectorType>(SrcTy)) {
2404 if (auto *InsElt = dyn_cast<InsertElementInst>(Src))
2409 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(Src)) {
2423 if (((Tmp = dyn_cast<BitCastInst>(ShufOp0)) &&
2425 ((Tmp = dyn_cast<BitCastInst>(ShufOp1)) &&
2453 if (PHINode *PN = dyn_cast<PHINode>(Src))
2482 if (VectorType *VT = dyn_cast<VectorType>(CI.getType())) {
lib/Transforms/InstCombine/InstCombineCompares.cpp 175 ConstantInt *Idx = dyn_cast<ConstantInt>(GEP->getOperand(i));
181 if (StructType *STy = dyn_cast<StructType>(EltTy))
183 else if (ArrayType *ATy = dyn_cast<ArrayType>(EltTy)) {
437 if (ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(i))) {
465 ConstantInt *CI = dyn_cast<ConstantInt>(GEP->getOperand(i));
554 auto *CI = dyn_cast<CastInst>(V);
562 if (auto *GEP = dyn_cast<GEPOperator>(V)) {
580 if (auto *PN = dyn_cast<PHINode>(V)) {
602 auto *PHI = dyn_cast<PHINode>(Use);
603 auto *Inst = dyn_cast<Instruction>(Val);
620 if (auto *PHI = dyn_cast<PHINode>(V)) {
624 if (auto *I = dyn_cast<Instruction>(V)) {
630 if (auto *A = dyn_cast<Argument>(V)) {
665 if (auto *PHI = dyn_cast<PHINode>(Val))
677 if (auto *CI = dyn_cast<CastInst>(Val)) {
684 if (auto *GEP = dyn_cast<GEPOperator>(Val)) {
717 if (auto *PHI = dyn_cast<PHINode>(Val)) {
769 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
784 if (auto *CI = dyn_cast<IntToPtrInst>(V)) {
790 if (auto *CI = dyn_cast<PtrToIntInst>(V)) {
906 } else if (GEPOperator *GEPRHS = dyn_cast<GEPOperator>(RHS)) {
1065 } else if (const auto *SI = dyn_cast<StoreInst>(V)) {
1074 } else if (const auto *Intrin = dyn_cast<IntrinsicInst>(V)) {
1306 TruncInst *TI = dyn_cast<TruncInst>(U);
1635 BinaryOperator *Shift = dyn_cast<BinaryOperator>(And->getOperand(0));
1804 if (auto *C = dyn_cast<Constant>(B)) {
1836 if (auto *LI = dyn_cast<LoadInst>(X))
1837 if (auto *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0)))
1838 if (auto *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0)))
2727 auto *Bitcast = dyn_cast<BitCastInst>(Cmp.getOperand(0));
2774 if (auto *BC2 = dyn_cast<BitCastInst>(Op1))
2824 if (auto *BO = dyn_cast<BinaryOperator>(Cmp.getOperand(0))) {
2881 if (auto *SI = dyn_cast<SelectInst>(Cmp.getOperand(0))) {
2885 if (ConstantInt *ConstRHS = dyn_cast<ConstantInt>(Cmp.getOperand(1)))
2890 if (auto *TI = dyn_cast<TruncInst>(Cmp.getOperand(0))) {
2895 if (auto *II = dyn_cast<IntrinsicInst>(Cmp.getOperand(0)))
2954 if (Constant *BOC = dyn_cast<Constant>(BOp1)) {
3170 Constant *RHSC = dyn_cast<Constant>(Op1);
3171 Instruction *LHSI = dyn_cast<Instruction>(Op0);
3198 if (Constant *C = dyn_cast<Constant>(LHSI->getOperand(1))) {
3200 CI = dyn_cast<ConstantInt>(Op1);
3202 if (Constant *C = dyn_cast<Constant>(LHSI->getOperand(2))) {
3204 CI = dyn_cast<ConstantInt>(Op2);
3252 dyn_cast<GetElementPtrInst>(LHSI->getOperand(0))) {
3253 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0)))
3552 if (auto *C = dyn_cast<Constant>(NarrowestShift->getOperand(0))) {
3563 if (auto *C = dyn_cast<Constant>(WidestShift->getOperand(0))) {
3672 BinaryOperator *BO0 = dyn_cast<BinaryOperator>(Op0);
3673 BinaryOperator *BO1 = dyn_cast<BinaryOperator>(Op1);
3822 if (ConstantInt *C1 = dyn_cast<ConstantInt>(B))
3823 if (ConstantInt *C2 = dyn_cast<ConstantInt>(D)) {
3891 if (Constant *RHSC = dyn_cast<Constant>(Op1))
4308 if (auto *CastOp1 = dyn_cast<CastInst>(ICmp.getOperand(1))) {
4346 auto *C = dyn_cast<Constant>(ICmp.getOperand(1));
4392 auto *CastOp0 = dyn_cast<CastInst>(ICmp.getOperand(0));
4414 if (auto *PtrToIntOp1 = dyn_cast<PtrToIntOperator>(ICmp.getOperand(1))) {
4423 } else if (auto *RHSC = dyn_cast<Constant>(ICmp.getOperand(1))) {
4501 if (auto *Inst = dyn_cast<Instruction>(Result)) {
4536 auto *MulInstr = dyn_cast<Instruction>(MulVal);
4568 if (TruncInst *TI = dyn_cast<TruncInst>(U)) {
4573 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) {
4577 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) {
4600 if (ZExtInst *Zext = dyn_cast<ZExtInst>(OtherVal))
4603 if (TruncInst *Trunc = dyn_cast<TruncInst>(ZextArg))
4629 if (ConstantInt *CI = dyn_cast<ConstantInt>(OtherVal)) {
4641 if (ConstantInt *CI = dyn_cast<ConstantInt>(OtherVal)) {
4652 if (ConstantInt *CI = dyn_cast<ConstantInt>(OtherVal)) {
4664 if (ConstantInt *CI = dyn_cast<ConstantInt>(OtherVal)) {
4698 if (TruncInst *TI = dyn_cast<TruncInst>(U)) {
4703 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) {
4851 auto *IC = dyn_cast<ICmpInst>(BI->getCondition());
5170 if (auto *CI = dyn_cast<ConstantInt>(C)) {
5186 auto *CI = dyn_cast<ConstantInt>(Elt);
5215 auto *Op1C = dyn_cast<Constant>(Op1);
5443 if (SelectInst *SI = dyn_cast<SelectInst>(I.user_back())) {
5487 if (GEPOperator *GEP = dyn_cast<GEPOperator>(Op0))
5490 if (GEPOperator *GEP = dyn_cast<GEPOperator>(Op1))
5498 if (auto *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Op0, DL)))
5501 if (auto *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Op1, DL)))
5575 if (auto *EVI = dyn_cast<ExtractValueInst>(Op0))
5576 if (auto *ACXI = dyn_cast<AtomicCmpXchgInst>(EVI->getAggregateOperand()))
6022 if (SelectInst *SI = dyn_cast<SelectInst>(I.user_back())) {
6059 if (auto *GEP = dyn_cast<GetElementPtrInst>(LHSI->getOperand(0)))
6060 if (auto *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0)))
lib/Transforms/InstCombine/InstCombineInternal.h 162 if (auto *BitCast = dyn_cast<BitCastInst>(V))
202 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V))
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp 39 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
42 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
73 if (auto *LI = dyn_cast<LoadInst>(I)) {
84 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
91 if (auto *Call = dyn_cast<CallBase>(I)) {
126 MemTransferInst *MI = dyn_cast<MemTransferInst>(I);
196 if (const ConstantInt *C = dyn_cast<ConstantInt>(AI.getArraySize())) {
269 auto *Inst = dyn_cast<Instruction>(&*U);
298 if (auto *LT = dyn_cast<LoadInst>(I)) {
306 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
316 } else if (auto *BC = dyn_cast<BitCastInst>(I)) {
370 AllocaInst *EntryAI = dyn_cast<AllocaInst>(FirstInst);
595 auto *SI = dyn_cast<StoreInst>(U);
620 if (auto* CI = dyn_cast<CastInst>(LI.user_back()))
647 if (auto *ST = dyn_cast<StructType>(T)) {
697 if (auto *AT = dyn_cast<ArrayType>(T)) {
769 if (SelectInst *SI = dyn_cast<SelectInst>(P)) {
775 if (PHINode *PN = dyn_cast<PHINode>(P)) {
781 if (GlobalAlias *GA = dyn_cast<GlobalAlias>(P)) {
790 if (AllocaInst *AI = dyn_cast<AllocaInst>(P)) {
794 ConstantInt *CS = dyn_cast<ConstantInt>(AI->getArraySize());
806 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(P)) {
848 if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
909 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) {
929 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr))
936 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
1021 if (SelectInst *SI = dyn_cast<SelectInst>(Op)) {
1078 while (auto *IV = dyn_cast<InsertValueInst>(V)) {
1079 auto *E = dyn_cast<ExtractElementInst>(IV->getInsertedValueOperand());
1087 auto *CI = dyn_cast<ConstantInt>(E->getIndexOperand());
1102 if (auto *AT = dyn_cast<ArrayType>(VT)) {
1150 if (auto *BC = dyn_cast<BitCastInst>(V)) {
1181 if (auto *ST = dyn_cast<StructType>(T)) {
1227 if (auto *AT = dyn_cast<ArrayType>(T)) {
1302 if (Instruction *BI = dyn_cast<Instruction>(B))
1329 auto *SI = dyn_cast<StoreInst>(U);
1392 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
1457 if (Instruction *U = dyn_cast<Instruction>(Val))
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 69 BinaryOperator *I = dyn_cast<BinaryOperator>(V);
232 if (ConstantInt *CI = dyn_cast<ConstantInt>(Op1)) {
302 BinaryOperator *Div = dyn_cast<BinaryOperator>(Op0);
306 Div = dyn_cast<BinaryOperator>(Op1);
580 SelectInst *SI = dyn_cast<SelectInst>(I.getOperand(1));
906 if (SelectInst *SI = dyn_cast<SelectInst>(Op1))
1219 if (SelectInst *SI = dyn_cast<SelectInst>(Op1))
1224 if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
1319 if (Instruction *Op0I = dyn_cast<Instruction>(Op0)) {
1320 if (SelectInst *SI = dyn_cast<SelectInst>(Op0I)) {
1323 } else if (auto *PN = dyn_cast<PHINode>(Op0I)) {
1445 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Elt))
1454 if (ConstantInt *RHS = dyn_cast<ConstantInt>(Elts[i])) {
lib/Transforms/InstCombine/InstCombinePHI.cpp 101 auto *IntToPtr = dyn_cast<IntToPtrInst>(PN.user_back());
109 if (LoadInst *LoadI = dyn_cast<LoadInst>(U)) {
111 } else if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
113 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) {
135 if (auto *PI = dyn_cast<PtrToIntInst>(Arg)) {
164 auto *LoadI = dyn_cast<LoadInst>(Arg);
224 auto *Inst = dyn_cast<Instruction>(V);
244 LoadInst *LoadI = dyn_cast<LoadInst>(IncomingVal);
262 if (auto *IncomingI = dyn_cast<Instruction>(IncomingVal)) {
295 Instruction *I = dyn_cast<Instruction>(PN.getIncomingValue(i));
304 if (CmpInst *CI = dyn_cast<CmpInst>(I))
356 if (CmpInst *CIOp = dyn_cast<CmpInst>(FirstInst)) {
394 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i));
502 if (AllocaInst *AI = dyn_cast<AllocaInst>(L->getOperand(0))) {
506 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
523 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0)))
524 if (AllocaInst *AI = dyn_cast<AllocaInst>(GEP->getOperand(0)))
563 LoadInst *LI = dyn_cast<LoadInst>(PN.getIncomingValue(i));
667 if (auto *Zext = dyn_cast<ZExtInst>(V)) {
681 if (auto *Zext = dyn_cast<ZExtInst>(V)) {
687 } else if (auto *C = dyn_cast<Constant>(V)) {
757 ConstantOp = dyn_cast<Constant>(FirstInst->getOperand(1));
766 Instruction *I = dyn_cast<Instruction>(PN.getIncomingValue(i));
806 if (CastInst *FirstCI = dyn_cast<CastInst>(FirstInst)) {
813 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(FirstInst)) {
845 if (PHINode *PU = dyn_cast<PHINode>(PN->user_back()))
867 if (PHINode *OpPN = dyn_cast<PHINode>(Op)) {
882 if (auto *ConstVA = dyn_cast<ConstantInt>(V))
974 InvokeInst *II = dyn_cast<InvokeInst>(PN->getIncomingValue(i));
989 if (PHINode *UserPN = dyn_cast<PHINode>(UserI)) {
1073 if (PHINode *InPHI = dyn_cast<PHINode>(PN)) {
1097 if (PHINode *OldInVal = dyn_cast<PHINode>(PN->getIncomingValue(i)))
1154 if (PHINode *PU = dyn_cast<PHINode>(PHIUser)) {
1180 auto *CmpInst = dyn_cast<ICmpInst>(PHIUser);
lib/Transforms/InstCombine/InstCombineSelect.cpp 398 if (auto *BO = dyn_cast<BinaryOperator>(TI)) {
404 if (auto *TGEP = dyn_cast<GetElementPtrInst>(TI)) {
428 if (auto *TVI = dyn_cast<BinaryOperator>(TrueVal)) {
459 if (auto *FVI = dyn_cast<BinaryOperator>(FalseVal)) {
909 auto *SelEltTy = dyn_cast<IntegerType>(SelTy->getScalarType());
1111 if (auto *BO = dyn_cast<BinaryOperator>(V)) {
1157 if (auto *FalseInst = dyn_cast<Instruction>(FalseVal))
1512 const Instruction *I = dyn_cast<Instruction>(V);
1519 if (const PHINode *VP = dyn_cast<PHINode>(I))
1670 auto *TI = dyn_cast<Instruction>(TrueVal);
1671 auto *FI = dyn_cast<Instruction>(FalseVal);
1704 if (Instruction *NegInst = dyn_cast<Instruction>(NegVal)) {
1755 auto *Cmp = dyn_cast<CmpInst>(Cond);
1934 auto *Extract = dyn_cast<ExtractValueInst>(V);
1939 return dyn_cast<AtomicCmpXchgInst>(Extract->getAggregateOperand());
1945 if (auto *Select = dyn_cast<SelectInst>(SI.user_back()))
2203 ICmpInst *CI = dyn_cast<ICmpInst>(U);
2305 if (FCmpInst *FCI = dyn_cast<FCmpInst>(CondVal)) {
2395 if (ICmpInst *ICI = dyn_cast<ICmpInst>(CondVal))
2403 auto *TI = dyn_cast<Instruction>(TrueVal);
2404 auto *FI = dyn_cast<Instruction>(FalseVal);
2524 if (auto *PN = dyn_cast<PHINode>(SI.getCondition()))
2531 if (SelectInst *TrueSI = dyn_cast<SelectInst>(TrueVal)) {
2551 if (SelectInst *FalseSI = dyn_cast<SelectInst>(FalseVal)) {
2589 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(0))) {
2596 if (auto *TrueBOSI = dyn_cast<SelectInst>(TrueBO->getOperand(1))) {
2609 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(0))) {
2616 if (auto *FalseBOSI = dyn_cast<SelectInst>(FalseBO->getOperand(1))) {
2634 if (VectorType *VecTy = dyn_cast<VectorType>(SelType)) {
lib/Transforms/InstCombine/InstCombineShifts.cpp 146 if (auto *CV = dyn_cast<ConstantVector>(C)) {
303 if (SelectInst *SI = dyn_cast<SelectInst>(Op1))
307 if (Constant *CUI = dyn_cast<Constant>(Op1))
401 Instruction *I = dyn_cast<Instruction>(V);
512 if (auto *AndI = dyn_cast<Instruction>(And)) {
534 if (Constant *C = dyn_cast<Constant>(V)) {
540 if (auto *C = dyn_cast<Constant>(V))
634 if (TruncInst *TI = dyn_cast<TruncInst>(Op0)) {
635 Instruction *TrOp = dyn_cast<Instruction>(TI->getOperand(0));
679 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) {
703 if (VectorType *VT = dyn_cast<VectorType>(X->getType()))
738 if (VectorType *VT = dyn_cast<VectorType>(X->getType()))
984 auto *II = dyn_cast<IntrinsicInst>(Op0);
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp 140 Instruction *I = dyn_cast<Instruction>(V);
290 if (Instruction *LHSInst = dyn_cast<Instruction>(I->getOperand(0)))
378 if (VectorType *DstVTy = dyn_cast<VectorType>(I->getType())) {
380 dyn_cast<VectorType>(I->getOperand(0)->getType())) {
470 if (Instruction *Shr = dyn_cast<Instruction>(I->getOperand(0)))
601 if (ConstantInt *Rem = dyn_cast<ConstantInt>(I->getOperand(1))) {
656 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
1110 if (auto *C = dyn_cast<Constant>(V)) {
1163 Instruction *I = dyn_cast<Instruction>(V);
1169 auto *II = dyn_cast<IntrinsicInst>(Inst);
1221 ConstantInt *Idx = dyn_cast<ConstantInt>(I->getOperand(2));
1318 if (auto *CV = dyn_cast<ConstantVector>(Shuffle->getOperand(0))) {
1325 if (auto *CV = dyn_cast<ConstantVector>(Shuffle->getOperand(1))) {
1370 if (auto *CV = dyn_cast<ConstantVector>(Sel->getCondition())) {
1397 VectorType *VTy = dyn_cast<VectorType>(I->getOperand(0)->getType());
1461 IntrinsicInst *II = dyn_cast<IntrinsicInst>(I);
1471 if (auto *CV = dyn_cast<ConstantVector>(II->getOperand(2)))
lib/Transforms/InstCombine/InstCombineVectorOps.cpp 54 if (auto *C = dyn_cast<Constant>(V))
92 if (ExtractElementInst *EU = dyn_cast<ExtractElementInst>(U)) {
142 Instruction *pos = dyn_cast<Instruction>(PHIInVal);
267 ConstantInt *EEIIndexC = dyn_cast<ConstantInt>(EEI->getIndexOperand());
305 if (Instruction *I = dyn_cast<Instruction>(U.getUser())) {
328 auto *IndexC = dyn_cast<ConstantInt>(Index);
371 if (auto *Phi = dyn_cast<PHINode>(SrcVec))
395 if (auto *I = dyn_cast<Instruction>(SrcVec)) {
396 if (auto *IE = dyn_cast<InsertElementInst>(I)) {
407 } else if (auto *SVI = dyn_cast<ShuffleVectorInst>(I)) {
410 if (auto *Elt = dyn_cast<ConstantInt>(Index)) {
429 } else if (auto *CI = dyn_cast<CastInst>(I)) {
469 if (InsertElementInst *IEI = dyn_cast<InsertElementInst>(V)) {
487 } else if (ExtractElementInst *EI = dyn_cast<ExtractElementInst>(ScalarOp)){
547 auto *ExtVecOpInst = dyn_cast<Instruction>(ExtVecOp);
587 ExtractElementInst *OldExt = dyn_cast<ExtractElementInst>(U);
624 if (InsertElementInst *IEI = dyn_cast<InsertElementInst>(V)) {
630 if (ExtractElementInst *EI = dyn_cast<ExtractElementInst>(ScalarOp)) {
709 auto UserInsInst = dyn_cast<InsertValueInst>(U);
769 auto *Idx = dyn_cast<ConstantInt>(CurrIE->getOperand(2));
773 auto *NextIE = dyn_cast<InsertElementInst>(CurrIE->getOperand(0));
818 auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0));
852 auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0));
908 auto *InsElt1 = dyn_cast<InsertElementInst>(InsElt2.getOperand(0));
930 auto *Inst = dyn_cast<Instruction>(InsElt.getOperand(0));
935 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0))) {
982 } else if (auto *IEI = dyn_cast<InsertElementInst>(Inst)) {
1074 auto *InsertUser = dyn_cast<InsertElementInst>(Insert.user_back());
1133 Instruction *I = dyn_cast<Instruction>(V);
1191 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(2));
1301 if (Constant *C = dyn_cast<Constant>(V)) {
1825 auto *Shuffle0 = dyn_cast<ShuffleVectorInst>(Shuf.getOperand(0));
1826 auto *Shuffle1 = dyn_cast<ShuffleVectorInst>(Shuf.getOperand(1));
2007 if (BitCastInst *BC = dyn_cast<BitCastInst>(U))
2099 ShuffleVectorInst* LHSShuffle = dyn_cast<ShuffleVectorInst>(LHS);
2100 ShuffleVectorInst* RHSShuffle = dyn_cast<ShuffleVectorInst>(RHS);
lib/Transforms/InstCombine/InstructionCombining.cpp 204 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
227 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
232 auto *OBO = dyn_cast<OverflowingBinaryOperator>(&I);
240 FPMathOperator *FPMO = dyn_cast<FPMathOperator>(&I);
256 auto *Cast = dyn_cast<CastInst>(BinOp1->getOperand(0));
270 auto *BinOp2 = dyn_cast<BinaryOperator>(Cast->getOperand(0));
325 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(I.getOperand(0));
326 BinaryOperator *Op1 = dyn_cast<BinaryOperator>(I.getOperand(1));
598 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SimplifiedInst)) {
607 if (auto *LOBO = dyn_cast<OverflowingBinaryOperator>(LHS)) {
612 if (auto *ROBO = dyn_cast<OverflowingBinaryOperator>(RHS)) {
648 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(LHS);
649 BinaryOperator *Op1 = dyn_cast<BinaryOperator>(RHS);
802 if (ConstantInt *C = dyn_cast<ConstantInt>(V))
805 if (ConstantDataVector *C = dyn_cast<ConstantDataVector>(V))
809 if (ConstantVector *CV = dyn_cast<ConstantVector>(V)) {
829 if (auto *Cast = dyn_cast<CastInst>(&I))
838 if (auto *SOC = dyn_cast<Constant>(SO)) {
851 auto *FPInst = dyn_cast<Instruction>(RI);
873 if (auto *BC = dyn_cast<BitCastInst>(&Op)) {
874 VectorType *DestTy = dyn_cast<VectorType>(BC->getDestTy());
875 VectorType *SrcTy = dyn_cast<VectorType>(BC->getSrcTy());
893 if (auto *CI = dyn_cast<CmpInst>(SI->getCondition())) {
912 if (auto *InC = dyn_cast<Constant>(InV)) {
923 auto *FPInst = dyn_cast<Instruction>(RI);
981 BranchInst *BI = dyn_cast<BranchInst>(NonConstBB->getTerminator());
996 if (SelectInst *SI = dyn_cast<SelectInst>(&I)) {
1009 Constant *InC = dyn_cast<Constant>(PN->getIncomingValue(i));
1031 } else if (CmpInst *CI = dyn_cast<CmpInst>(&I)) {
1035 if (Constant *InC = dyn_cast<Constant>(PN->getIncomingValue(i)))
1045 } else if (auto *BO = dyn_cast<BinaryOperator>(&I)) {
1056 if (Constant *InC = dyn_cast<Constant>(PN->getIncomingValue(i)))
1078 if (auto *Sel = dyn_cast<SelectInst>(I.getOperand(0))) {
1081 } else if (auto *PN = dyn_cast<PHINode>(I.getOperand(0))) {
1124 if (StructType *STy = dyn_cast<StructType>(Ty)) {
1135 } else if (ArrayType *AT = dyn_cast<ArrayType>(Ty)) {
1211 if (ConstantInt *CI = dyn_cast<ConstantInt>(Op)) {
1224 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) {
1237 if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS)) {
1295 if (CastInst *Cast = dyn_cast<CastInst>(Op)) {
1373 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Ancestor)) {
1427 if (auto *BO = dyn_cast<BinaryOperator>(NewBO0))
1430 if (auto *BO = dyn_cast<BinaryOperator>(NewBO1))
1443 if (auto *BO = dyn_cast<BinaryOperator>(XY))
1609 if (auto *NewBinOp = dyn_cast<BinaryOperator>(NarrowBO)) {
1687 if (auto *PN = dyn_cast<PHINode>(PtrOp)) {
1688 auto *Op1 = dyn_cast<GetElementPtrInst>(PN->getOperand(0));
1746 } else if (auto *CT = dyn_cast<CompositeType>(CurTy)) {
1796 if (auto *Src = dyn_cast<GEPOperator>(PtrOp)) {
1853 if (auto *SrcGEP = dyn_cast<GEPOperator>(Src->getOperand(0)))
1968 if (auto *C = dyn_cast<ConstantInt>(GEP.getOperand(1)))
1979 if (auto *CATy = dyn_cast<ArrayType>(GEPEltType)) {
1998 if (auto *XATy = dyn_cast<ArrayType>(StrippedPtrEltTy)) {
2139 if (auto *ASC = dyn_cast<AddrSpaceCastInst>(PtrOp)) {
2144 if (auto *BC = dyn_cast<BitCastInst>(ASC->getOperand(0)))
2148 if (auto *BCI = dyn_cast<BitCastInst>(ASCStrippedPtrOp)) {
2242 if (auto *AI = dyn_cast<AllocaInst>(UnderlyingPtrOp)) {
2262 if (auto *LI = dyn_cast<LoadInst>(V))
2310 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
2384 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
2400 if (ICmpInst *C = dyn_cast<ICmpInst>(I)) {
2407 } else if (auto *SI = dyn_cast<StoreInst>(I)) {
2414 if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
2473 auto *Cast = dyn_cast<CastInst>(&Inst);
2654 if (InsertValueInst *IV = dyn_cast<InsertValueInst>(Agg)) {
2705 if (WithOverflowInst *WO = dyn_cast<WithOverflowInst>(Agg)) {
2724 if (ConstantInt *CI = dyn_cast<ConstantInt>(WO->getRHS()))
2729 if (LoadInst *L = dyn_cast<LoadInst>(Agg))
3002 ArrayType *FTy = dyn_cast<ArrayType>(Filter->getType());
3011 ArrayType *LTy = dyn_cast<ArrayType>(LFilter->getType());
3139 if (auto *CI = dyn_cast<CallInst>(I)) {
3267 if (PHINode *PN = dyn_cast<PHINode>(UserInst))
3293 if (Instruction *OpI = dyn_cast<Instruction>(U.get()))
3446 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
3453 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
3454 if (ConstantInt *Cond = dyn_cast<ConstantInt>(SI->getCondition())) {
lib/Transforms/Instrumentation/AddressSanitizer.cpp 602 const ConstantInt *CI = dyn_cast<ConstantInt>(AI.getArraySize());
1080 if (CallInst *CI = dyn_cast<CallInst>(I)) {
1137 auto *GV = dyn_cast<GlobalVariable>(StrippedV);
1357 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
1363 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
1369 } else if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(I)) {
1375 } else if (AtomicCmpXchgInst *XCHG = dyn_cast<AtomicCmpXchgInst>(I)) {
1381 } else if (auto CI = dyn_cast<CallInst>(I)) {
1382 auto *F = dyn_cast<Function>(CI->getCalledValue());
1402 dyn_cast<ConstantInt>(CI->getOperand(1 + OpOffset)))
1445 if (ICmpInst *Cmp = dyn_cast<ICmpInst>(I)) {
1459 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) {
1522 if (auto *Vector = dyn_cast<ConstantVector>(Mask)) {
1524 if (auto *Masked = dyn_cast<ConstantInt>(Vector->getOperand(Idx))) {
1574 GlobalVariable *G = dyn_cast<GlobalVariable>(GetUnderlyingObject(Addr, DL));
1772 if (ReturnInst *RI = dyn_cast<ReturnInst>(BB.getTerminator()))
1782 ConstantArray *CA = dyn_cast<ConstantArray>(GV->getInitializer());
1791 if (Function *F = dyn_cast<Function>(CS->getOperand(1))) {
2303 auto Seq = dyn_cast<ConstantDataSequential>(G->getInitializer());
2597 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&I);
2601 AllocaInst *AI = dyn_cast<AllocaInst>(Arg->stripPointerCasts());
2691 if (CallInst *CI = dyn_cast<CallInst>(&Inst))
2752 CallInst *CI = dyn_cast<CallInst>(I);
lib/Transforms/Instrumentation/BoundsChecking.cpp 73 ConstantInt *SizeCI = dyn_cast<ConstantInt>(Size);
155 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
158 } else if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
161 } else if (AtomicCmpXchgInst *AI = dyn_cast<AtomicCmpXchgInst>(&I)) {
164 } else if (AtomicRMWInst *AI = dyn_cast<AtomicRMWInst>(&I)) {
lib/Transforms/Instrumentation/ControlHeightReduction.cpp 522 if (auto *I = dyn_cast<Instruction>(V)) {
560 if (auto *I = dyn_cast<Instruction>(V)) {
775 auto *BI = dyn_cast<BranchInst>(Entry->getTerminator());
826 if (auto *SI = dyn_cast<SelectInst>(&I)) {
1457 if (auto *I = dyn_cast<Instruction>(V)) {
1462 if (auto *PN = dyn_cast<PHINode>(I))
1538 if (auto *BI = dyn_cast<BranchInst>(U)) {
1548 if (auto *SI = dyn_cast<SelectInst>(U)) {
1593 if (auto *UI = dyn_cast<Instruction>(U)) {
1671 if (auto *I = dyn_cast<Instruction>(V)) {
1685 if (auto *I = dyn_cast<Instruction>(V)) {
1963 if (auto *ICmp = dyn_cast<ICmpInst>(Cond))
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp 167 if (StructType *SGType = dyn_cast<StructType>(GType)) {
519 if (isa<PointerType>(param_type) && (FT = dyn_cast<FunctionType>(
684 Function *F = dyn_cast<Function>(C.getCallee());
719 if (GlobalVariable *G = dyn_cast<GlobalVariable>(ArgTLS))
724 if (GlobalVariable *G = dyn_cast<GlobalVariable>(RetvalTLS))
803 if (auto F = dyn_cast<Function>(GA->getBaseObject())) {
856 BlockAddress *BA = dyn_cast<BlockAddress>(*UI);
977 if (Instruction *I = dyn_cast<Instruction>(V))
1028 if (Argument *A = dyn_cast<Argument>(V)) {
1185 if (AllocaInst *AI = dyn_cast<AllocaInst>(Addr)) {
1329 if (AllocaInst *AI = dyn_cast<AllocaInst>(Addr)) {
1444 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
1572 if (CallInst *CI = dyn_cast<CallInst>(CS.getInstruction())) {
1579 if (Function *CustomFn = dyn_cast<Function>(CustomF.getCallee())) {
1596 (ParamFT = dyn_cast<FunctionType>(
1683 if (InvokeInst *II = dyn_cast<InvokeInst>(CS.getInstruction())) {
1737 if (InvokeInst *II = dyn_cast<InvokeInst>(CS.getInstruction())) {
lib/Transforms/Instrumentation/GCOVProfiling.cpp 636 if (CallInst *CI = dyn_cast<CallInst>(&I)) {
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp 520 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
526 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
532 } else if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(I)) {
538 } else if (AtomicCmpXchgInst *XCHG = dyn_cast<AtomicCmpXchgInst>(I)) {
565 if (LoadInst *LI = dyn_cast<LoadInst>(I))
567 if (StoreInst *SI = dyn_cast<StoreInst>(I))
569 if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(I))
571 if (AtomicCmpXchgInst *XCHG = dyn_cast<AtomicCmpXchgInst>(I))
765 const ConstantInt *CI = dyn_cast<ConstantInt>(AI.getArraySize());
1120 if (AllocaInst *AI = dyn_cast<AllocaInst>(&Inst)) {
1130 if (auto *DDI = dyn_cast<DbgDeclareInst>(&Inst))
1213 if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&Inst))
1232 if (auto *AI = dyn_cast<AllocaInst>(I))
lib/Transforms/Instrumentation/InstrProfiling.cpp 403 InstrProfIncrementInst *Inc = dyn_cast<InstrProfIncrementInstStep>(Instr);
406 return dyn_cast<InstrProfIncrementInst>(Instr);
lib/Transforms/Instrumentation/MemorySanitizer.cpp 1343 if (IntegerType *IT = dyn_cast<IntegerType>(OrigTy))
1346 if (VectorType *VT = dyn_cast<VectorType>(OrigTy)) {
1351 if (ArrayType *AT = dyn_cast<ArrayType>(OrigTy)) {
1355 if (StructType *ST = dyn_cast<StructType>(OrigTy)) {
1369 if (VectorType *vt = dyn_cast<VectorType>(ty))
1546 if (ArrayType *AT = dyn_cast<ArrayType>(ShadowTy)) {
1551 if (StructType *ST = dyn_cast<StructType>(ShadowTy)) {
1579 if (Instruction *I = dyn_cast<Instruction>(V)) {
1591 if (UndefValue *U = dyn_cast<UndefValue>(V)) {
1597 if (Argument *A = dyn_cast<Argument>(V)) {
1685 if (Instruction *I = dyn_cast<Instruction>(V)) {
1905 if (auto *CI = dyn_cast<CallInst>(I.getOperand(0)))
2026 Constant *ConstOrigin = dyn_cast<Constant>(OpOrigin);
2145 dyn_cast<ConstantInt>(ConstArg->getAggregateElement(Idx))) {
2155 if (ConstantInt *Elt = dyn_cast<ConstantInt>(ConstArg)) {
2171 Constant *constOp0 = dyn_cast<Constant>(I.getOperand(0));
2172 Constant *constOp1 = dyn_cast<Constant>(I.getOperand(1));
2319 if ((constOp = dyn_cast<Constant>(I.getOperand(1)))) {
2322 } else if ((constOp = dyn_cast<Constant>(I.getOperand(0)))) {
3333 Constant *Cst = dyn_cast<Constant>(ArgShadow);
3390 if (auto *I = dyn_cast<BitCastInst>(RetVal)) {
3393 if (auto *I = dyn_cast<CallInst>(RetVal)) {
3604 if (CallInst *CI = dyn_cast<CallInst>(&I)) {
3656 auto *ST = dyn_cast<StructType>(RetTy);
lib/Transforms/Instrumentation/PGOInstrumentation.cpp 261 BranchInst *BI = dyn_cast<BranchInst>(TI);
266 ICmpInst *CI = dyn_cast<ICmpInst>(Cond);
276 ConstantInt *CV = dyn_cast<ConstantInt>(RHS);
662 if (dyn_cast<GlobalAlias>(CM.second))
664 Function *FM = dyn_cast<Function>(CM.second);
703 if (GlobalAlias *GA = dyn_cast<GlobalAlias>(CM.second)) {
705 assert(dyn_cast<Function>(GA->getAliasee()->stripPointerCasts()) == &F);
712 Function *CF = dyn_cast<Function>(CM.second);
lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp 166 if (dyn_cast<ConstantInt>(Length))
378 auto *SizeType = dyn_cast<IntegerType>(MemI->getLength()->getType());
lib/Transforms/Instrumentation/PoisonChecking.cpp 86 if (auto *CI = dyn_cast<ConstantInt>(V))
239 if (auto *CI = dyn_cast<ConstantInt>(Cond))
285 if (auto *RI = dyn_cast<ReturnInst>(&I))
lib/Transforms/Instrumentation/SanitizerCoverage.cpp 431 SanCovLowestStack = dyn_cast<GlobalVariable>(SanCovLowestStackConstant);
560 if (auto BR = dyn_cast<BranchInst>(CMP->user_back()))
614 if (ICmpInst *CMP = dyn_cast<ICmpInst>(&Inst))
621 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(&Inst))
626 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Inst))
747 if (SwitchInst *SI = dyn_cast<SwitchInst>(I)) {
815 if (ICmpInst *ICMP = dyn_cast<ICmpInst>(I)) {
lib/Transforms/Instrumentation/ThreadSanitizer.cpp 311 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Addr)) {
340 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Addr))
343 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Addr)) {
349 } else if (LoadInst *L = dyn_cast<LoadInst>(Addr)) {
377 if (StoreInst *Store = dyn_cast<StoreInst>(I)) {
415 if (LoadInst *LI = dyn_cast<LoadInst>(I))
417 if (StoreInst *SI = dyn_cast<StoreInst>(I))
461 if (CallInst *CI = dyn_cast<CallInst>(&Inst))
602 if (MemSetInst *M = dyn_cast<MemSetInst>(I)) {
609 } else if (MemTransferInst *M = dyn_cast<MemTransferInst>(I)) {
630 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
645 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
659 } else if (AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(I)) {
676 } else if (AtomicCmpXchgInst *CASI = dyn_cast<AtomicCmpXchgInst>(I)) {
709 } else if (FenceInst *FI = dyn_cast<FenceInst>(I)) {
lib/Transforms/Instrumentation/ValueProfilePlugins.inc 41 if (dyn_cast<ConstantInt>(Length))
lib/Transforms/ObjCARC/DependencyAnalysis.cpp 92 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(Inst)) {
108 } else if (const StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
lib/Transforms/ObjCARC/ObjCARC.h 79 if (const auto *C = dyn_cast<CallInst>(Opnd))
81 return dyn_cast<InvokeInst>(Opnd);
lib/Transforms/ObjCARC/ObjCARCAPElim.cpp 161 Function *F = dyn_cast<Function>(cast<ConstantStruct>(Op)->getOperand(1));
lib/Transforms/ObjCARC/ObjCARCContract.cpp 265 Store = dyn_cast<StoreInst>(Inst);
374 auto *Load = dyn_cast<LoadInst>(GetArgRCIdentityRoot(Release));
650 if (PHINode *PHI = dyn_cast<PHINode>(U.getUser())) {
699 if (const BitCastInst *BI = dyn_cast<BitCastInst>(Arg))
710 if (PHINode *PN = dyn_cast<PHINode>(Arg)) {
725 if (auto *BC = dyn_cast<BitCastInst>(U))
732 if (auto *B = dyn_cast<BitCastInst>(U))
lib/Transforms/ObjCARC/ObjCARCOpts.cpp 93 if (const BitCastInst *BC = dyn_cast<BitCastInst>(Arg))
95 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Arg))
607 } else if (const InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
624 if (const PHINode *PN = dyn_cast<PHINode>(Arg)) {
686 if (const PHINode *PN = dyn_cast<PHINode>(Ptr))
767 if (auto *GV = dyn_cast<GlobalVariable>(Opnd->stripPointerCasts()))
945 const PHINode *PN = dyn_cast<PHINode>(Arg);
1320 if (InvokeInst *II = dyn_cast<InvokeInst>(&Pred->back()))
1849 if (const LoadInst *LI = dyn_cast<LoadInst>(Arg))
1851 dyn_cast<GlobalVariable>(
2003 if (AllocaInst *Alloca = dyn_cast<AllocaInst>(Arg)) {
2158 ReturnInst *Ret = dyn_cast<ReturnInst>(&BB.back());
lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp 46 if (const SelectInst *SB = dyn_cast<SelectInst>(B))
62 if (const PHINode *PNB = dyn_cast<PHINode>(B))
150 if (const PHINode *PN = dyn_cast<PHINode>(A))
152 if (const PHINode *PN = dyn_cast<PHINode>(B))
154 if (const SelectInst *S = dyn_cast<SelectInst>(A))
156 if (const SelectInst *S = dyn_cast<SelectInst>(B))
lib/Transforms/Scalar/ADCE.cpp 210 auto *BR = dyn_cast<BranchInst>(Term);
345 if (CallInst *CI = dyn_cast<CallInst>(&I))
366 if (auto *PN = dyn_cast<PHINode>(LiveInst))
515 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(&I)) {
524 if (Instruction *II = dyn_cast<Instruction>(V))
540 if (auto *DII = dyn_cast<DbgInfoIntrinsic>(&I)) {
lib/Transforms/Scalar/AlignmentFromAssumptions.cpp 102 dyn_cast<SCEVConstant>(DiffUnitsSCEV)) {
149 dyn_cast<SCEVAddRecExpr>(DiffSCEV)) {
203 ICmpInst *ICI = dyn_cast<ICmpInst>(I->getArgOperand(0));
221 BinaryOperator *CmpBO = dyn_cast<BinaryOperator>(CmpLHS);
236 const SCEVConstant *MaskSCEV = dyn_cast<SCEVConstant>(AndRHSSCEV);
260 if (PtrToIntInst *PToI = dyn_cast<PtrToIntInst>(AndLHS)) {
264 dyn_cast<SCEVAddExpr>(AndLHSSCEV)) {
268 if (const SCEVUnknown *OpUnk = dyn_cast<SCEVUnknown>(*J))
269 if (PtrToIntInst *PToI = dyn_cast<PtrToIntInst>(OpUnk->getValue())) {
311 if (Instruction *K = dyn_cast<Instruction>(J))
319 if (LoadInst *LI = dyn_cast<LoadInst>(J)) {
327 } else if (StoreInst *SI = dyn_cast<StoreInst>(J)) {
335 } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(J)) {
347 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) {
lib/Transforms/Scalar/BDCE.cpp 49 auto *J = dyn_cast<Instruction>(JU);
80 auto *K = dyn_cast<Instruction>(KU);
lib/Transforms/Scalar/CallSiteSplitting.cpp 132 auto *BI = dyn_cast<BranchInst>(From->getTerminator());
246 BitCastInst* BCI = dyn_cast<BitCastInst>(&*II);
250 ReturnInst* RI = dyn_cast<ReturnInst>(&*II);
426 if (PHINode *PN = dyn_cast<PHINode>(&BI)) {
lib/Transforms/Scalar/ConstantHoisting.cpp 175 if (auto CastInst = dyn_cast<Instruction>(Opnd))
363 if (auto IntrInst = dyn_cast<IntrinsicInst>(Inst))
399 GlobalVariable *BaseGV = dyn_cast<GlobalVariable>(ConstExpr->getOperand(0));
439 if (auto ConstInt = dyn_cast<ConstantInt>(Opnd)) {
445 if (auto CastInst = dyn_cast<Instruction>(Opnd)) {
451 if (auto *ConstInt = dyn_cast<ConstantInt>(CastInst->getOperand(0))) {
460 if (auto ConstExpr = dyn_cast<ConstantExpr>(Opnd)) {
469 if (auto ConstInt = dyn_cast<ConstantInt>(ConstExpr->getOperand(0))) {
665 if (LoadInst *LI = dyn_cast<LoadInst>(UI)) {
668 } else if (StoreInst *SI = dyn_cast<StoreInst>(UI)) {
705 if (auto PHI = dyn_cast<PHINode>(Inst)) {
772 if (auto CastInst = dyn_cast<Instruction>(Opnd)) {
794 if (auto ConstExpr = dyn_cast<ConstantExpr>(Opnd)) {
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp 132 ConstantInt *CI = dyn_cast<ConstantInt>(C);
166 if (auto *IncomingConstant = dyn_cast<Constant>(Incoming)) {
182 if (auto *CommonInst = dyn_cast<Instruction>(CommonValue))
203 if (auto *CommonInst = dyn_cast<Instruction>(CommonValue))
227 SelectInst *SI = dyn_cast<SelectInst>(Incoming);
249 Constant *C = dyn_cast<Constant>(SI->getFalseValue());
283 if (LoadInst *L = dyn_cast<LoadInst>(I))
304 auto *C = dyn_cast<Constant>(Cmp->getOperand(1));
313 auto *I = dyn_cast<Instruction>(Op0);
472 auto *Inst = dyn_cast<Instruction>(V);
514 if (auto *BO = dyn_cast<BinaryOperator>(NewOp))
532 if (auto *BO = dyn_cast<BinaryOperator>(BinOp))
541 if (auto *WO = dyn_cast<WithOverflowInst>(CS.getInstruction())) {
548 if (auto *SI = dyn_cast<SaturatingInst>(CS.getInstruction())) {
580 PointerType *Type = dyn_cast<PointerType>(V->getType());
650 if (auto *BinOp = dyn_cast<BinaryOperator>(BO))
791 ConstantInt *RHS = dyn_cast<ConstantInt>(BinOp->getOperand(1));
812 auto *C = dyn_cast<CmpInst>(V);
816 Constant *Op1 = dyn_cast<Constant>(C->getOperand(1));
lib/Transforms/Scalar/DCE.cpp 104 if (Instruction *OpI = dyn_cast<Instruction>(OpV))
lib/Transforms/Scalar/DeadStoreElimination.cpp 132 if (Instruction *OpI = dyn_cast<Instruction>(Op))
155 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
191 if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
194 if (auto *MI = dyn_cast<AnyMemIntrinsic>(Inst)) {
200 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
227 if (auto *MTI = dyn_cast<AnyMemTransferInst>(Inst))
236 if (StoreInst *SI = dyn_cast<StoreInst>(I))
239 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
275 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
838 if (auto *Call = dyn_cast<CallBase>(&*BBI)) {
926 if (auto *AMI = dyn_cast<AtomicMemIntrinsic>(EarlierWrite)) {
1033 StoreInst *SI = dyn_cast<StoreInst>(Inst);
1039 if (LoadInst *DepLoad = dyn_cast<LoadInst>(SI->getValueOperand())) {
1054 Constant *StoredConstant = dyn_cast<Constant>(SI->getValueOperand());
1057 dyn_cast<Instruction>(GetUnderlyingObject(SI->getPointerOperand(), DL));
1211 auto *Earlier = dyn_cast<StoreInst>(DepWrite);
1212 auto *Later = dyn_cast<StoreInst>(Inst);
lib/Transforms/Scalar/EarlyCSE.cpp 109 if (CallInst *CI = dyn_cast<CallInst>(Inst))
157 if (auto *CmpI = dyn_cast<ICmpInst>(Cond))
168 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Inst)) {
177 if (CmpInst *CI = dyn_cast<CmpInst>(Inst)) {
230 if (CastInst *CI = dyn_cast<CastInst>(Inst))
233 if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(Inst))
237 if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(Inst))
277 if (BinaryOperator *LHSBinOp = dyn_cast<BinaryOperator>(LHSI)) {
289 if (CmpInst *LHSCmp = dyn_cast<CmpInst>(LHSI)) {
388 CallInst *CI = dyn_cast<CallInst>(Inst);
606 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
631 if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
633 } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
644 if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
646 } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
654 if (auto *LI = dyn_cast<LoadInst>(Inst))
702 if (auto *LI = dyn_cast<LoadInst>(Inst))
704 if (auto *SI = dyn_cast<StoreInst>(Inst))
793 if (auto *LI = dyn_cast<LoadInst>(I))
821 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(I))
883 auto *BI = dyn_cast<BranchInst>(Pred->getTerminator());
885 auto *CondInst = dyn_cast<Instruction>(BI->getCondition());
924 dyn_cast<Instruction>(cast<CallInst>(Inst)->getArgOperand(0));
967 dyn_cast<Instruction>(cast<CallInst>(Inst)->getArgOperand(0))) {
1033 if (auto *I = dyn_cast<Instruction>(V))
1157 if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
lib/Transforms/Scalar/Float2Int.cpp 225 if (Instruction *OI = dyn_cast<Instruction>(O)) {
299 if (Instruction *OI = dyn_cast<Instruction>(O)) {
303 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) {
379 Instruction *UI = dyn_cast<Instruction>(U);
446 } else if (Instruction *VI = dyn_cast<Instruction>(V)) {
448 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
lib/Transforms/Scalar/GVN.cpp 290 if (CmpInst *C = dyn_cast<CmpInst>(I)) {
299 } else if (InsertValueInst *E = dyn_cast<InsertValueInst>(I)) {
334 WithOverflowInst *WO = dyn_cast<WithOverflowInst>(EI->getAggregateOperand());
371 if (PHINode *PN = dyn_cast<PHINode>(V))
438 CallInst *NonLocalDepCall = dyn_cast<CallInst>(I->getResult().getInst());
820 if (const IntrinsicInst* II = dyn_cast<IntrinsicInst>(Inst))
871 if (StoreInst *DepSI = dyn_cast<StoreInst>(DepInst)) {
887 if (LoadInst *DepLI = dyn_cast<LoadInst>(DepInst)) {
904 if (MemIntrinsic *DepMI = dyn_cast<MemIntrinsic>(DepInst)) {
940 if (StoreInst *S = dyn_cast<StoreInst>(DepInst)) {
956 if (LoadInst *LD = dyn_cast<LoadInst>(DepInst)) {
1281 if (Instruction *I = dyn_cast<Instruction>(V))
1337 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0))) {
1341 if (Instruction *I = dyn_cast<Instruction>(OI->get()))
1369 if (Instruction *I = dyn_cast<Instruction>(V))
1403 if (ConstantInt *Cond = dyn_cast<ConstantInt>(V)) {
1453 if (auto *CmpI = dyn_cast<CmpInst>(V)) {
1611 Call = dyn_cast<CallInst>(Vals->Val);
1853 ConstantInt *CI = dyn_cast<ConstantInt>(RHS);
1874 if (CmpInst *Cmp = dyn_cast<CmpInst>(LHS)) {
1968 if (IntrinsicInst *IntrinsicI = dyn_cast<IntrinsicInst>(I))
1972 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
1983 if (BranchInst *BI = dyn_cast<BranchInst>(I)) {
2012 if (SwitchInst *SI = dyn_cast<SwitchInst>(I)) {
2268 if (auto *CallB = dyn_cast<CallBase>(CurInst))
2304 if (auto *Inst = dyn_cast<Instruction>(U.get()))
2621 ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition());
lib/Transforms/Scalar/GVNHoist.cpp 316 else if (auto *A = dyn_cast<Argument>(V))
396 if (const MemoryUse *MU = dyn_cast<MemoryUse>(&MA)) {
535 if (auto *UD = dyn_cast<MemoryUseOrDef>(D))
820 if (const auto *Inst = dyn_cast<Instruction>(&Op))
831 if (const auto *Inst = dyn_cast<Instruction>(&Op))
834 dyn_cast<GetElementPtrInst>(Inst)) {
856 if (Instruction *Op = dyn_cast<Instruction>(Gep->getOperand(i))) {
863 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op))
878 if (auto *OtherLd = dyn_cast<LoadInst>(OtherInst))
891 if (auto *ReplacementLoad = dyn_cast<LoadInst>(Repl)) {
895 } else if (auto *ReplacementStore = dyn_cast<StoreInst>(Repl)) {
900 } else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) {
940 if (MemoryPhi *Phi = dyn_cast<MemoryPhi>(U))
979 if (auto *Ld = dyn_cast<LoadInst>(Repl)) {
980 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand());
981 } else if (auto *St = dyn_cast<StoreInst>(Repl)) {
982 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand());
983 Val = dyn_cast<Instruction>(St->getValueOperand());
1103 if (auto *Load = dyn_cast<LoadInst>(&I1))
1105 else if (auto *Store = dyn_cast<StoreInst>(&I1))
1107 else if (auto *Call = dyn_cast<CallInst>(&I1)) {
1108 if (auto *Intr = dyn_cast<IntrinsicInst>(Call)) {
lib/Transforms/Scalar/GVNSink.cpp 400 if (CmpInst *C = dyn_cast<CmpInst>(I)) {
545 CallInst *CI = dyn_cast<CallInst>(&*I);
548 InvokeInst *II = dyn_cast<InvokeInst>(&*I);
lib/Transforms/Scalar/GuardWidening.cpp 95 if (IntrinsicInst *GI = dyn_cast<IntrinsicInst>(I)) {
110 if (IntrinsicInst *GI = dyn_cast<IntrinsicInst>(I)) {
334 if (auto *BI = dyn_cast<BranchInst>(BB->getTerminator()))
500 auto *Inst = dyn_cast<Instruction>(V);
520 auto *Inst = dyn_cast<Instruction>(V);
630 auto *IC = dyn_cast<ICmpInst>(CheckCond);
661 auto *BaseInst = dyn_cast<Instruction>(Check.getBase());
lib/Transforms/Scalar/IndVarSimplify.cpp 196 if (auto *GEP = dyn_cast<GEPOperator>(FromVal)) {
199 if (auto *GEP = dyn_cast<GEPOperator>(ToVal)) {
239 PHINode *PHI = dyn_cast<PHINode>(User);
266 auto *DefI = dyn_cast<Instruction>(Def);
312 auto *InitValueVal = dyn_cast<ConstantFP>(PN->getIncomingValue(IncomingEdge));
320 auto *Incr = dyn_cast<BinaryOperator>(PN->getIncomingValue(BackEdge));
325 ConstantFP *IncValueVal = dyn_cast<ConstantFP>(Incr->getOperand(1));
341 FCmpInst *Compare = dyn_cast<FCmpInst>(U1);
343 Compare = dyn_cast<FCmpInst>(U2);
362 ConstantFP *ExitValueVal = dyn_cast<ConstantFP>(Compare->getOperand(1));
654 if (auto *AddRec = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Inst)))
689 if (auto *ExitInsn = dyn_cast<Instruction>(ExitVal))
778 if (auto *BI = dyn_cast<BranchInst>(TermInst)) {
782 } else if (auto *SI = dyn_cast<SwitchInst>(TermInst))
790 auto *ExitVal = dyn_cast<PHINode>(PN.getIncomingValue(IncomingValIdx));
854 if (!found && (I = dyn_cast<Instruction>(Incoming)))
1294 dyn_cast<SCEVAddRecExpr>(getSCEVByOpCode(lhs, rhs, OpCode));
1336 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(WideExpr);
1359 ICmpInst *Cmp = dyn_cast<ICmpInst>(DU.NarrowUse);
1447 auto *I = dyn_cast<Instruction>(NarrowUse->getOperand(ExtendOperIdx));
1453 const SCEVAddRecExpr *AddRecOp1 = dyn_cast<SCEVAddRecExpr>(Op1);
1467 SExtInst *User = dyn_cast<SExtInst>(U.getUser());
1473 ZExtInst *User = dyn_cast<ZExtInst>(U.getUser());
1518 SExtInst *User = dyn_cast<SExtInst>(U.getUser());
1529 ZExtInst *User = dyn_cast<ZExtInst>(U.getUser());
1548 if (PHINode *UsePhi = dyn_cast<PHINode>(DU.NarrowUse)) {
1727 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(OrigPhi));
1740 AddRec = dyn_cast<SCEVAddRecExpr>(WideIVExpr);
1878 auto *BI = dyn_cast<BranchInst>(TI);
2021 Instruction *IncI = dyn_cast<Instruction>(IncV);
2038 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0));
2048 Phi = dyn_cast<PHINode>(IncI->getOperand(1));
2060 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition());
2083 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition());
2101 PHINode *Phi = dyn_cast<PHINode>(LHS);
2173 Instruction *I = dyn_cast<Instruction>(V);
2227 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Phi));
2231 const SCEV *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(*SE));
2464 if (auto *BO = dyn_cast<BinaryOperator>(IncVar)) {
2490 if (auto *Cond = dyn_cast<Instruction>(BI->getCondition()))
2612 if (PHINode *P = dyn_cast<PHINode>(User)) {
2696 BranchInst *BI = dyn_cast<BranchInst>(ExitingBB->getTerminator());
2845 BranchInst *BI = dyn_cast<BranchInst>(ExitingBB->getTerminator());
3082 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(ExitCount);
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp 352 ICmpInst *ICI = dyn_cast<ICmpInst>(Condition);
361 const auto *IndexAddRec = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(Index));
764 BranchInst *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator());
782 ICmpInst *ICI = dyn_cast<ICmpInst>(LatchBr->getCondition());
823 dyn_cast<SCEVAddRecExpr>(SE.getSignExtendExpr(AR, WideTy));
1599 const SCEVConstant *B = dyn_cast<SCEVConstant>(
1606 const SCEVConstant *D = dyn_cast<SCEVConstant>(getStep());
1801 if (BranchInst *TBI = dyn_cast<BranchInst>(BBI->getTerminator()))
lib/Transforms/Scalar/InferAddressSpaces.cpp 314 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
329 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) {
357 if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
360 } else if (auto *LI = dyn_cast<LoadInst>(&I))
362 else if (auto *SI = dyn_cast<StoreInst>(&I))
364 else if (auto *RMW = dyn_cast<AtomicRMWInst>(&I))
366 else if (auto *CmpX = dyn_cast<AtomicCmpXchgInst>(&I))
368 else if (auto *MI = dyn_cast<MemIntrinsic>(&I)) {
373 if (auto *MTI = dyn_cast<MemTransferInst>(MI))
375 } else if (auto *II = dyn_cast<IntrinsicInst>(&I))
377 else if (ICmpInst *Cmp = dyn_cast<ICmpInst>(&I)) {
383 } else if (auto *ASC = dyn_cast<AddrSpaceCastInst>(&I)) {
422 if (Constant *C = dyn_cast<Constant>(Operand))
551 if (auto CExpr = dyn_cast<ConstantExpr>(Operand))
591 if (Instruction *I = dyn_cast<Instruction>(V)) {
594 if (Instruction *NewI = dyn_cast<Instruction>(NewV)) {
715 auto *C0 = dyn_cast<Constant>(Src0);
716 auto *C1 = dyn_cast<Constant>(Src1);
761 if (auto *I = dyn_cast<Instruction>(Inst))
764 if (auto *LI = dyn_cast<LoadInst>(Inst))
768 if (auto *SI = dyn_cast<StoreInst>(Inst))
772 if (auto *RMW = dyn_cast<AtomicRMWInst>(Inst))
776 if (auto *CmpX = dyn_cast<AtomicCmpXchgInst>(Inst))
793 if (auto *MSI = dyn_cast<MemSetInst>(MI)) {
798 } else if (auto *MTI = dyn_cast<MemTransferInst>(MI)) {
847 if (auto *Op = dyn_cast<Operator>(C)) {
914 if (Constant *C = dyn_cast<Constant>(V)) {
944 if (auto *MI = dyn_cast<MemIntrinsic>(CurUser)) {
949 if (auto *II = dyn_cast<IntrinsicInst>(CurUser)) {
955 if (ICmpInst *Cmp = dyn_cast<ICmpInst>(CurUser)) {
976 if (auto *KOtherSrc = dyn_cast<Constant>(OtherSrc)) {
986 if (AddrSpaceCastInst *ASC = dyn_cast<AddrSpaceCastInst>(CurUser)) {
1001 if (Instruction *Inst = dyn_cast<Instruction>(V)) {
1018 if (Instruction *I = dyn_cast<Instruction>(V))
lib/Transforms/Scalar/JumpThreading.cpp 211 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator());
229 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator());
249 ConstantInt *CI = dyn_cast<ConstantInt>(PhiOpnd);
264 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator());
420 auto *BI = dyn_cast<BranchInst>(BB.getTerminator());
578 if (UndefValue *U = dyn_cast<UndefValue>(Val))
582 return dyn_cast<BlockAddress>(Val->stripPointerCasts());
584 return dyn_cast<ConstantInt>(Val);
615 Instruction *I = dyn_cast<Instruction>(V);
647 if (PHINode *PN = dyn_cast<PHINode>(I)) {
670 if (CastInst *CI = dyn_cast<CastInst>(I)) {
746 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) {
749 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) {
768 if (CmpInst *Cmp = dyn_cast<CmpInst>(I)) {
775 PHINode *PN = dyn_cast<PHINode>(CmpLHS);
777 PN = dyn_cast<PHINode>(CmpRHS);
802 auto LHSInst = dyn_cast<Instruction>(LHS);
911 if (SelectInst *SI = dyn_cast<SelectInst>(I)) {
925 if (ConstantInt *CI = dyn_cast<ConstantInt>(Cond)) {
1063 if (BranchInst *BI = dyn_cast<BranchInst>(Terminator)) {
1067 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(Terminator)) {
1069 } else if (IndirectBrInst *IB = dyn_cast<IndirectBrInst>(Terminator)) {
1080 if (Instruction *I = dyn_cast<Instruction>(Condition)) {
1127 Instruction *CondInst = dyn_cast<Instruction>(Condition);
1137 if (CmpInst *CondCmp = dyn_cast<CmpInst>(CondInst)) {
1142 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator());
1143 Constant *CondConst = dyn_cast<Constant>(CondCmp->getOperand(1));
1193 if (SwitchInst *SI = dyn_cast<SwitchInst>(BB->getTerminator()))
1202 if (CmpInst *CondCmp = dyn_cast<CmpInst>(SimplifyValue))
1208 if (LoadInst *LoadI = dyn_cast<LoadInst>(SimplifyValue))
1213 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1225 if (PHINode *PN = dyn_cast<PHINode>(CondInst))
1243 auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
1255 auto *PBI = dyn_cast<BranchInst>(CurrentPred->getTerminator());
1283 if (Instruction *OpInst = dyn_cast<Instruction>(Op))
1636 else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
1639 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB->getTerminator())) {
1700 if (auto *CondInst = dyn_cast<Instruction>(Cond)) {
1781 if (BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator()))
1913 if (Instruction *Inst = dyn_cast<Instruction>(IV)) {
2017 if (Instruction *Inst = dyn_cast<Instruction>(New->getOperand(i))) {
2061 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2305 BranchInst *OldPredBranch = dyn_cast<BranchInst>(PredBB->getTerminator());
2330 if (Instruction *Inst = dyn_cast<Instruction>(New->getOperand(i))) {
2356 if (BasicBlock *SuccBB = dyn_cast<BasicBlock>(New->getOperand(i)))
2380 if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
2460 PHINode *CondPHI = dyn_cast<PHINode>(SI->getCondition());
2467 SelectInst *PredSI = dyn_cast<SelectInst>(CondPHI->getIncomingValue(I));
2475 BranchInst *PredTerm = dyn_cast<BranchInst>(Pred->getTerminator());
2498 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator());
2499 PHINode *CondLHS = dyn_cast<PHINode>(CondCmp->getOperand(0));
2508 SelectInst *SI = dyn_cast<SelectInst>(CondLHS->getIncomingValue(I));
2515 BranchInst *PredTerm = dyn_cast<BranchInst>(Pred->getTerminator());
2585 if (ICmpInst *Cmp = dyn_cast<ICmpInst>(U.getUser())) {
2590 if (SelectInst *SelectI = dyn_cast<SelectInst>(Cmp->user_back()))
2595 } else if (SelectInst *SelectI = dyn_cast<SelectInst>(U.getUser())) {
2675 if (auto *BI = dyn_cast<BranchInst>(Parent->getTerminator()))
lib/Transforms/Scalar/LICM.cpp 910 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
927 if (BranchInst *BI = dyn_cast<BranchInst>(&I))
995 auto *BC = dyn_cast<BitCastInst>(Addr);
1009 IntrinsicInst *II = dyn_cast<IntrinsicInst>(U);
1095 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
1131 } else if (CallInst *CI = dyn_cast<CallInst>(&I)) {
1182 } else if (auto *FI = dyn_cast<FenceInst>(&I)) {
1200 } else if (auto *SI = dyn_cast<StoreInst>(&I)) {
1240 if (const auto *MU = dyn_cast<MemoryUse>(&MA)) {
1251 } else if (const auto *MD = dyn_cast<MemoryDef>(&MA)) {
1252 if (auto *LI = dyn_cast<LoadInst>(MD->getMemoryInst())) {
1258 if (auto *CI = dyn_cast<CallInst>(MD->getMemoryInst())) {
1301 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
1333 if (const PHINode *PN = dyn_cast<PHINode>(UI)) {
1362 if (auto *CI = dyn_cast<CallInst>(&I)) {
1401 if (auto *MemDef = dyn_cast<MemoryDef>(NewMemAcc))
1719 auto *LI = dyn_cast<LoadInst>(&Inst);
1750 if (Instruction *I = dyn_cast<Instruction>(V))
1782 if (LoadInst *LI = dyn_cast<LoadInst>(I))
1962 Instruction *UI = dyn_cast<Instruction>(U);
1968 if (LoadInst *Load = dyn_cast<LoadInst>(UI)) {
1990 } else if (const StoreInst *Store = dyn_cast<StoreInst>(UI)) {
2323 if (const auto *MD = dyn_cast<MemoryDef>(&MA))
lib/Transforms/Scalar/LoopDataPrefetch.cpp 146 const auto *ConstStride = dyn_cast<SCEVConstant>(AR->getStepRecurrence(*SE));
228 if (CallInst *CI = dyn_cast<CallInst>(&I))
256 if (LoadInst *LMemI = dyn_cast<LoadInst>(&I)) {
259 } else if (StoreInst *SMemI = dyn_cast<StoreInst>(&I)) {
273 const SCEVAddRecExpr *LSCEVAddRec = dyn_cast<SCEVAddRecExpr>(LSCEV);
289 dyn_cast<SCEVConstant>(PtrDiff)) {
lib/Transforms/Scalar/LoopDeletion.cpp 68 if (Instruction *I = dyn_cast<Instruction>(incoming))
lib/Transforms/Scalar/LoopDistribute.cpp 173 auto *I = dyn_cast<Instruction>(V);
lib/Transforms/Scalar/LoopFuse.cpp 192 if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
199 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
907 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(S);
1069 dyn_cast<Instruction>(FC0.GuardBranch->getCondition()))
1071 dyn_cast<Instruction>(FC1.GuardBranch->getCondition()))
1091 if (auto *CmpInst = dyn_cast<Instruction>(FC.GuardBranch->getCondition())) {
1215 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
1457 while (PHINode *PHI = dyn_cast<PHINode>(&FC1.Header->front())) {
lib/Transforms/Scalar/LoopIdiomRecognize.cpp 390 if (const SCEVConstant *BECst = dyn_cast<SCEVConstant>(BECount))
440 Constant *C = dyn_cast<Constant>(V);
501 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr));
547 LoadInst *LI = dyn_cast<LoadInst>(SI->getValueOperand());
560 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(LI->getPointerOperand()));
582 StoreInst *SI = dyn_cast<StoreInst>(&I);
645 if (MemSetInst *MSI = dyn_cast<MemSetInst>(Inst)) {
821 const SCEVAddRecExpr *Ev = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Pointer));
832 const SCEVConstant *ConstStride = dyn_cast<SCEVConstant>(Ev->getOperand(1));
869 if (const SCEVConstant *BECst = dyn_cast<SCEVConstant>(BECount))
1228 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition());
1232 ConstantInt *CmpZero = dyn_cast<ConstantInt>(Cond->getOperand(1));
1253 auto *PhiX = dyn_cast<PHINode>(VarX);
1302 dyn_cast<BranchInst>(LoopEntry->getTerminator()), LoopEntry))
1303 DefX2 = dyn_cast<Instruction>(T);
1315 if ((SubOneOp = dyn_cast<BinaryOperator>(DefX2->getOperand(0))))
1319 SubOneOp = dyn_cast<BinaryOperator>(DefX2->getOperand(1));
1324 ConstantInt *Dec = dyn_cast<ConstantInt>(SubOneOp->getOperand(1));
1348 ConstantInt *Inc = dyn_cast<ConstantInt>(Inst->getOperand(1));
1379 auto *PreCondBr = dyn_cast<BranchInst>(PreCondBB->getTerminator());
1433 dyn_cast<BranchInst>(LoopEntry->getTerminator()), LoopEntry))
1434 DefX = dyn_cast<Instruction>(T);
1443 ConstantInt *Shft = dyn_cast<ConstantInt>(DefX->getOperand(1));
1473 ConstantInt *Inc = dyn_cast<ConstantInt>(Inst->getOperand(1));
1545 auto *PreCondBI = dyn_cast<BranchInst>(PreCondBB->getTerminator());
1611 auto *EntryBI = dyn_cast<BranchInst>(PH->getTerminator());
1620 auto *PreCondBI = dyn_cast<BranchInst>(PreCondBB->getTerminator());
1738 ConstantInt *InitConst = dyn_cast<ConstantInt>(CntInitVal);
1810 ConstantInt *InitConst = dyn_cast<ConstantInt>(CntInitVal);
2003 dyn_cast<Instruction>(PHI.getIncomingValueForBlock(LoopBB));
2039 const auto *ScevForSrcA = dyn_cast<SCEVAddRecExpr>(
2041 const auto *ScevForSrcB = dyn_cast<SCEVAddRecExpr>(
2613 if (const auto *I = dyn_cast<Instruction>(Load->getPointerOperand()))
lib/Transforms/Scalar/LoopInstSimplify.cpp 87 if (auto *PI = dyn_cast<PHINode>(&I))
116 if (auto *UserPI = dyn_cast<PHINode>(UserI))
lib/Transforms/Scalar/LoopInterchange.cpp 97 if (auto *Ld = dyn_cast<LoadInst>(&I)) {
101 } else if (auto *St = dyn_cast<StoreInst>(&I)) {
308 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(PhiVar));
605 dyn_cast<BranchInst>(OuterLoopHeader->getTerminator());
634 Instruction *I = dyn_cast<Instruction>(Val);
653 PHINode *PHI = dyn_cast<PHINode>(SV);
665 if (PHINode *PHI = dyn_cast<PHINode>(User)) {
724 Instruction *Ins = dyn_cast<Instruction>(PHI.getIncomingValue(0));
861 dyn_cast<Instruction>(InnerInductionVar->getIncomingValue(1));
864 dyn_cast<Instruction>(InnerInductionVar->getIncomingValue(0));
939 Instruction *IncomingI = dyn_cast<Instruction>(PHI.getIncomingValue(i));
978 if (CallInst *CI = dyn_cast<CallInst>(&I)) {
1034 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Ins)) {
1040 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(OperandVal);
1235 InnerIndexVar = dyn_cast<Instruction>(InductionPHI->getIncomingValue(1));
1237 InnerIndexVar = dyn_cast<Instruction>(InductionPHI->getIncomingValue(0));
1273 Instruction *OpI = dyn_cast<Instruction>(Op);
1284 Instruction *CondI = dyn_cast<Instruction>(
1407 auto I = dyn_cast<Instruction>(P.getIncomingValue(0));
1412 PHINode *NewPhi = dyn_cast<PHINode>(P.clone());
1460 dyn_cast<BranchInst>(OuterLoopLatch->getTerminator());
1462 dyn_cast<BranchInst>(InnerLoopLatch->getTerminator());
1464 dyn_cast<BranchInst>(OuterLoopHeader->getTerminator());
1466 dyn_cast<BranchInst>(InnerLoopHeader->getTerminator());
1474 dyn_cast<BranchInst>(InnerLoopLatchPredecessor->getTerminator());
1476 dyn_cast<BranchInst>(OuterLoopPredecessor->getTerminator());
lib/Transforms/Scalar/LoopLoadElimination.cpp 209 auto *Store = dyn_cast<StoreInst>(Source);
212 auto *Load = dyn_cast<LoadInst>(Destination);
365 if (auto *S = dyn_cast<StoreInst>(I))
lib/Transforms/Scalar/LoopPredication.cpp 382 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHSS);
437 auto *Limit = dyn_cast<SCEVConstant>(LatchCheck.Limit);
438 auto *Start = dyn_cast<SCEVConstant>(LatchCheck.IV->getStart());
477 NewLatchCheck.IV = dyn_cast<SCEVAddRecExpr>(
542 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S))
543 if (const auto *LI = dyn_cast<LoadInst>(U->getValue()))
760 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Condition)) {
843 auto *BI = dyn_cast<BranchInst>(LoopLatch->getTerminator());
853 auto *ICI = dyn_cast<ICmpInst>(BI->getCondition());
lib/Transforms/Scalar/LoopRerollPass.cpp 540 if (auto *BO = dyn_cast<BinaryOperator>(User)) {
545 if (PHINode *PN = dyn_cast<PHINode>(UU)) {
551 Instruction *UUser = dyn_cast<Instruction>(UU);
556 UUser = dyn_cast<Instruction>(*(UUser->user_begin()));
583 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(&*I))) {
588 auto IncSCEV = dyn_cast<SCEVConstant>(PHISCEV->getStepRecurrence(*SE));
696 if (PHINode *PN = dyn_cast<PHINode>(User)) {
730 if (LoadInst *LI = dyn_cast<LoadInst>(I))
732 if (StoreInst *SI = dyn_cast<StoreInst>(I))
734 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I))
743 if (Instruction *I = dyn_cast<Instruction>(IVU)) {
763 BinaryOperator *BO = dyn_cast<BinaryOperator>(U);
770 PHINode *PN = dyn_cast<PHINode>(UU);
790 if (auto *BO = dyn_cast<BinaryOperator>(I)) {
793 CI = dyn_cast<ConstantInt>(BO->getOperand(1));
794 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
796 CI = dyn_cast<ConstantInt>(LastOperand);
800 if (Instruction *II = dyn_cast<Instruction>(I)) {
891 const auto *ADR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(DRS.BaseInst));
916 const auto *IVU_ADR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(IVU));
1119 const IntrinsicInst* II = dyn_cast<IntrinsicInst>(I);
1170 Instruction *IVUser = dyn_cast<Instruction>(U);
1174 Instruction *UUser = dyn_cast<Instruction>(UU);
1179 UUser = dyn_cast<Instruction>(*(UUser->user_begin()));
1184 Instruction *BI = dyn_cast<BranchInst>(*UUser->user_begin());
1355 if (Instruction *Op2I = dyn_cast<Instruction>(Op2))
lib/Transforms/Scalar/LoopSimplifyCFG.cpp 58 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
63 ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition());
69 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
70 auto *CI = dyn_cast<ConstantInt>(SI->getCondition());
lib/Transforms/Scalar/LoopSink.cpp 184 if (dyn_cast<PHINode>(UI))
lib/Transforms/Scalar/LoopStrengthReduce.cpp 400 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
407 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S))
419 if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(S))
475 const SCEVAddRecExpr *SAR = dyn_cast<const SCEVAddRecExpr>(ScaledReg);
513 const SCEVAddRecExpr *SAR = dyn_cast<const SCEVAddRecExpr>(ScaledReg);
666 const SCEVConstant *RC = dyn_cast<SCEVConstant>(RHS);
679 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(LHS)) {
690 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS)) {
707 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(LHS)) {
721 if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(LHS)) {
746 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S)) {
751 } else if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
757 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
772 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
773 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue())) {
777 } else if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
783 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
800 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
803 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
826 } else if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(Inst)) {
829 } else if (AtomicCmpXchgInst *CmpX = dyn_cast<AtomicCmpXchgInst>(Inst)) {
840 if (const StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
843 } else if (const LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
845 } else if (const AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(Inst)) {
847 } else if (const AtomicCmpXchgInst *CmpX = dyn_cast<AtomicCmpXchgInst>(Inst)) {
849 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
875 if (PointerType *PTy = dyn_cast<PointerType>(AccessTy.MemTy))
925 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
933 if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(S)) {
941 if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(Mul->getOperand(1))) {
945 Instruction *UI = dyn_cast<Instruction>(UR);
955 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
1220 if (const auto *S = dyn_cast<SCEVAddRecExpr>(Reg))
1222 if (auto S = dyn_cast<SCEVCastExpr>(Reg))
1224 if (auto S = dyn_cast<SCEVNAryExpr>(Reg))
1229 if (auto S = dyn_cast<SCEVUDivExpr>(Reg))
1238 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Reg)) {
1266 if (auto *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(*SE)))
1472 if (const PHINode *PN = dyn_cast<PHINode>(UserInst)) {
1487 if (StoreInst *Store = dyn_cast<StoreInst>(UserInst)) {
2095 if (UIToFPInst *UCast = dyn_cast<UIToFPInst>(CandidateUI->getUser())) {
2099 else if (SIToFPInst *SCast = dyn_cast<SIToFPInst>(CandidateUI->getUser())) {
2109 PHINode *PH = dyn_cast<PHINode>(ShadowUse->getOperand(0));
2116 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(PH));
2136 ConstantInt *Init = dyn_cast<ConstantInt>(PH->getIncomingValue(Entry));
2143 dyn_cast<BinaryOperator>(PH->getIncomingValue(Latch));
2152 C = dyn_cast<ConstantInt>(Incr->getOperand(1));
2154 C = dyn_cast<ConstantInt>(Incr->getOperand(0));
2253 SelectInst *Sel = dyn_cast<SelectInst>(Cond->getOperand(1));
2270 if (const SCEVSMaxExpr *S = dyn_cast<SCEVSMaxExpr>(BackedgeTakenCount)) {
2273 } else if (const SCEVSMaxExpr *S = dyn_cast<SCEVSMaxExpr>(IterationCount)) {
2276 } else if (const SCEVUMaxExpr *U = dyn_cast<SCEVUMaxExpr>(IterationCount)) {
2301 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(IV);
2315 if (AddOperator *BO = dyn_cast<AddOperator>(Sel->getOperand(1)))
2316 if (ConstantInt *BO1 = dyn_cast<ConstantInt>(BO->getOperand(1)))
2319 if (AddOperator *BO = dyn_cast<AddOperator>(Sel->getOperand(2)))
2320 if (ConstantInt *BO1 = dyn_cast<ConstantInt>(BO->getOperand(1)))
2329 else if (const SCEVUnknown *SU = dyn_cast<SCEVUnknown>(MaxRHS))
2391 BranchInst *TermBr = dyn_cast<BranchInst>(ExitingBlock->getTerminator());
2666 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
2670 } else if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
2726 dyn_cast<SCEVAddRecExpr>(SE.getSCEV(Oper))) {
2738 if (TruncInst *Trunc = dyn_cast<TruncInst>(Oper))
2988 Instruction *OtherUse = dyn_cast<Instruction>(U);
3085 dyn_cast<Instruction>(PN.getIncomingValueForBlock(L->getLoopLatch()));
3120 const SCEVConstant *IncConst = dyn_cast<SCEVConstant>(IncExpr);
3222 Instruction *PostIncV = dyn_cast<Instruction>(
3271 if (ICmpInst *CI = dyn_cast<ICmpInst>(UserInst)) {
3274 if (SaveCmp && CI == dyn_cast<ICmpInst>(ExitBranch->getCondition()))
3400 if (const SCEVNAryExpr *N = dyn_cast<SCEVNAryExpr>(S))
3402 else if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(S))
3404 else if (const SCEVUDivExpr *D = dyn_cast<SCEVUDivExpr>(S)) {
3407 } else if (const SCEVUnknown *US = dyn_cast<SCEVUnknown>(S)) {
3409 if (const Instruction *Inst = dyn_cast<Instruction>(V)) {
3416 const Instruction *UserInst = dyn_cast<Instruction>(U.getUser());
3451 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) {
3494 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
3502 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
3524 } else if (const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(S)) {
3529 dyn_cast<SCEVConstant>(Mul->getOperand(0))) {
3549 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S);
3621 const SCEVConstant *InnerSumSC = dyn_cast<SCEVConstant>(InnerSum);
3637 const SCEVConstant *SC = dyn_cast<SCEVConstant>(*J);
3814 if (auto *GAR = dyn_cast<SCEVAddRecExpr>(G)) {
3816 dyn_cast<SCEVConstant>(GAR->getStepRecurrence(SE))) {
3993 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Base.BaseRegs[i]);
4219 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(NewF.ScaledReg))
4252 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(NewReg))
4447 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(*I)) {
4463 } else if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(*I)) {
4464 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue()))
5071 if (Instruction *I = dyn_cast<Instruction>(LF.OperandValToReplace))
5075 dyn_cast<Instruction>(cast<ICmpInst>(LF.UserInst)->getOperand(1)))
5425 if (PHINode *PN = dyn_cast<PHINode>(LF.UserInst)) {
5473 if (PHINode *PN = dyn_cast<PHINode>(Chain.tailUserInst()))
5522 if (auto *PN = dyn_cast<PHINode>(U.getUser())) {
lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp 259 if (auto *Ld = dyn_cast<LoadInst>(&I)) {
lib/Transforms/Scalar/LoopUnrollPass.cpp 410 if (auto *PhiI = dyn_cast<PHINode>(I))
420 if (auto *OpI = dyn_cast<Instruction>(
441 auto *OpI = dyn_cast<Instruction>(Op);
479 auto *PHI = dyn_cast<PHINode>(&I);
491 Constant *C = dyn_cast<Constant>(V);
539 if (auto *CI = dyn_cast<CallInst>(&I)) {
567 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
575 dyn_cast<ConstantInt>(SimpleCond))
579 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
586 dyn_cast<ConstantInt>(SimpleCond))
621 auto *PN = dyn_cast<PHINode>(&I);
626 if (auto *OpI = dyn_cast<Instruction>(Op))
lib/Transforms/Scalar/LoopUnswitch.cpp 448 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Cond))
563 BranchInst *BInst = dyn_cast<BranchInst>(DomBB->getTerminator());
594 ICmpInst *CI = dyn_cast<ICmpInst>(&LoopCond);
610 PHINode *LPHI = dyn_cast<PHINode>(LHS);
611 PHINode *RPHI = dyn_cast<PHINode>(RHS);
621 SelectInst *LSI = dyn_cast<SelectInst>(LHS);
622 SelectInst *RSI = dyn_cast<SelectInst>(RHS);
688 if (auto *II = dyn_cast<InvokeInst>(&I))
691 if (auto *II = dyn_cast<IntrinsicInst>(&I))
728 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
749 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
1031 auto *OldBranch = dyn_cast<BranchInst>(loopPreheader->getTerminator());
1093 if (BranchInst *BI = dyn_cast<BranchInst>(CurrentTerm)) {
1104 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(CurrentTerm)) {
1107 ConstantInt *Cond = dyn_cast<ConstantInt>(SI->getCondition());
1125 if (BranchInst *BI = dyn_cast<BranchInst>(CurrentTerm)) {
1163 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(CurrentTerm)) {
1346 if (auto *II = dyn_cast<IntrinsicInst>(&I))
1422 if (Instruction *Use = dyn_cast<Instruction>(I->getOperand(i)))
1471 Instruction *UI = dyn_cast<Instruction>(U);
1488 Instruction *UI = dyn_cast<Instruction>(U);
1513 SwitchInst *SI = dyn_cast<SwitchInst>(UI);
1593 if (Instruction *Use = dyn_cast<Instruction>(I->getOperand(i)))
1614 if (BranchInst *BI = dyn_cast<BranchInst>(I)) {
1632 if (Instruction *Use = dyn_cast<Instruction>(PN->getOperand(It)))
1658 ICmpInst *CI = dyn_cast<ICmpInst>(Inst);
lib/Transforms/Scalar/LoopVersioningLICM.cpp 332 if (auto *Call = dyn_cast<CallBase>(I)) {
352 LoadInst *Ld = dyn_cast<LoadInst>(I);
366 StoreInst *St = dyn_cast<StoreInst>(I);
lib/Transforms/Scalar/LowerAtomic.cpp 121 if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
123 else if (AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(Inst))
125 else if (AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(Inst))
127 else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
130 } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
lib/Transforms/Scalar/LowerConstantIntrinsics.cpp 56 BranchInst *BI = dyn_cast<BranchInst>(I);
93 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&I);
112 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&*VH);
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp 58 CallInst *CI = dyn_cast<CallInst>(SI.getCondition());
67 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1));
101 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(Expect->getArgOperand(1));
119 if (ZExtInst *ZExt = dyn_cast<ZExtInst>(V)) {
125 if (SExtInst *SExt = dyn_cast<SExtInst>(V)) {
131 BinaryOperator *BinOp = dyn_cast<BinaryOperator>(V);
135 ConstantInt *CInt = dyn_cast<ConstantInt>(BinOp->getOperand(1));
170 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator());
176 BI = dyn_cast<BranchInst>(BB->getTerminator());
188 ConstantInt *CI = dyn_cast<ConstantInt>(PhiOpnd);
251 ICmpInst *CmpI = dyn_cast<ICmpInst>(BSI.getCondition());
255 CI = dyn_cast<CallInst>(BSI.getCondition());
262 CmpConstOperand = dyn_cast<ConstantInt>(CmpI->getOperand(1));
265 CI = dyn_cast<CallInst>(CmpI->getOperand(0));
283 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1));
326 if (BranchInst *BI = dyn_cast<BranchInst>(BB.getTerminator())) {
329 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB.getTerminator())) {
339 CallInst *CI = dyn_cast<CallInst>(Inst);
341 if (SelectInst *SI = dyn_cast<SelectInst>(Inst)) {
lib/Transforms/Scalar/MemCpyOptimizer.cpp 166 if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
454 if (auto *Ptr = dyn_cast<Instruction>(SI->getPointerOperand()))
496 else if (const auto *Call = dyn_cast<CallBase>(C)) {
516 if (auto *A = dyn_cast<Instruction>(C->getOperand(k))) {
549 if (LoadInst *LI = dyn_cast<LoadInst>(SI->getOperand(0))) {
623 C = dyn_cast<CallInst>(ldep.getInst());
749 AllocaInst *srcAlloca = dyn_cast<AllocaInst>(cpySrc);
753 ConstantInt *srcArraySize = dyn_cast<ConstantInt>(srcAlloca->getArraySize());
767 if (AllocaInst *A = dyn_cast<AllocaInst>(cpyDest)) {
769 ConstantInt *destArraySize = dyn_cast<ConstantInt>(A->getArraySize());
778 } else if (Argument *A = dyn_cast<Argument>(cpyDest)) {
829 if (GetElementPtrInst *G = dyn_cast<GetElementPtrInst>(U)) {
837 if (const IntrinsicInst *IT = dyn_cast<IntrinsicInst>(U))
854 if (Instruction *cpyDestInst = dyn_cast<Instruction>(cpyDest))
944 ConstantInt *MDepLen = dyn_cast<ConstantInt>(MDep->getLength());
945 ConstantInt *MLen = dyn_cast<ConstantInt>(M->getLength());
1039 if (ConstantInt *SrcSizeC = dyn_cast<ConstantInt>(SrcSize))
1073 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
1075 if (ConstantInt *LTSize = dyn_cast<ConstantInt>(II->getArgOperand(0)))
1106 ConstantInt *MemSetSize = dyn_cast<ConstantInt>(MemSet->getLength());
1150 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(M->getSource()))
1168 if (MemSetInst *MDep = dyn_cast<MemSetInst>(DepInfo.getInst()))
1173 ConstantInt *CopySize = dyn_cast<ConstantInt>(M->getLength());
1184 if (CallInst *C = dyn_cast<CallInst>(DepInfo.getInst())) {
1203 if (MemCpyInst *MDep = dyn_cast<MemCpyInst>(SrcDepInfo.getInst()))
1215 if (MemSetInst *MDep = dyn_cast<MemSetInst>(SrcDepInfo.getInst()))
1273 MemCpyInst *MDep = dyn_cast<MemCpyInst>(DepInfo.getInst());
1279 ConstantInt *C1 = dyn_cast<ConstantInt>(MDep->getLength());
1353 if (StoreInst *SI = dyn_cast<StoreInst>(I))
1355 else if (MemSetInst *M = dyn_cast<MemSetInst>(I))
1357 else if (MemCpyInst *M = dyn_cast<MemCpyInst>(I))
1359 else if (MemMoveInst *M = dyn_cast<MemMoveInst>(I))
lib/Transforms/Scalar/MergeICmps.cpp 70 if (const LoadInst *LI = dyn_cast<LoadInst>(I))
72 if (const StoreInst *SI = dyn_cast<StoreInst>(I))
142 auto *const LoadI = dyn_cast<LoadInst>(Val);
156 auto *const GEP = dyn_cast<GetElementPtrInst>(Addr);
356 auto *const BranchI = dyn_cast<BranchInst>(Block->getTerminator());
364 auto *const CmpI = dyn_cast<ICmpInst>(Val);
374 const auto *const Const = dyn_cast<ConstantInt>(Val);
378 auto *const CmpI = dyn_cast<ICmpInst>(BranchI->getCondition());
883 if (auto *const Phi = dyn_cast<PHINode>(&*BBIt->begin()))
lib/Transforms/Scalar/MergedLoadStoreMotion.cpp 142 auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
191 auto *Store1 = dyn_cast<StoreInst>(&Inst);
230 auto *A0 = dyn_cast<Instruction>(S0->getPointerOperand());
231 auto *A1 = dyn_cast<Instruction>(S1->getPointerOperand());
245 auto *A0 = dyn_cast<Instruction>(S0->getPointerOperand());
246 auto *A1 = dyn_cast<Instruction>(S1->getPointerOperand());
313 auto *S0 = dyn_cast<StoreInst>(I);
lib/Transforms/Scalar/NaryReassociate.cpp 334 if (SExtInst *SExt = dyn_cast<SExtInst>(IndexToSplit)) {
336 } else if (ZExtInst *ZExt = dyn_cast<ZExtInst>(IndexToSplit)) {
342 if (AddOperator *AO = dyn_cast<AddOperator>(IndexToSplit)) {
lib/Transforms/Scalar/NewGVN.cpp 885 if (const auto *S = dyn_cast<StoreExpression>(&Other))
917 if (auto *I = dyn_cast<Instruction>(V)) {
926 auto *MP = dyn_cast<MemoryPhi>(V);
943 if (auto *II = dyn_cast<IntrinsicInst>(V))
996 if (auto *PHIOp = dyn_cast<PHINode>(I))
1019 if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
1070 if (auto *C = dyn_cast<Constant>(V)) {
1138 if (auto *CI = dyn_cast<CmpInst>(I)) {
1171 } else if (auto *CI = dyn_cast<CastInst>(I)) {
1202 if (auto *II = dyn_cast<InsertValueInst>(I)) {
1209 } else if (auto *EI = dyn_cast<ExtractValueInst>(I)) {
1233 if (auto *C = dyn_cast<Constant>(V))
1397 if (auto *LI = dyn_cast<LoadInst>(LastStore->getStoredValue()))
1419 if (auto *DepSI = dyn_cast<StoreInst>(DepInst)) {
1428 if (auto *C = dyn_cast<Constant>(
1436 } else if (auto *DepLI = dyn_cast<LoadInst>(DepInst)) {
1443 if (auto *C = dyn_cast<Constant>(lookupOperandLeader(DepLI)))
1451 } else if (auto *DepMI = dyn_cast<MemIntrinsic>(DepInst)) {
1477 else if (auto *II = dyn_cast<IntrinsicInst>(DepInst)) {
1507 if (auto *MD = dyn_cast<MemoryDef>(DefiningAccess)) {
1540 auto *PWC = dyn_cast<PredicateWithCondition>(PI);
1554 if (auto *PBranch = dyn_cast<PredicateBranch>(PI)) {
1559 if (auto *PSwitch = dyn_cast<PredicateSwitch>(PI))
1573 auto *Cmp = dyn_cast<CmpInst>(Cond);
1601 if (const auto *PBranch = dyn_cast<PredicateBranch>(PI)) {
1630 if (auto *II = dyn_cast<IntrinsicInst>(I)) {
1677 if (auto *MP = dyn_cast<MemoryPhi>(From)) {
1727 if (auto *MemberPhi = dyn_cast<PHINode>(Member))
1800 if (auto *AllSameInst = dyn_cast<Instruction>(AllSameValue))
1821 if (auto *EI = dyn_cast<ExtractValueInst>(I)) {
1822 auto *WO = dyn_cast<WithOverflowInst>(EI->getAggregateOperand());
1904 auto *BranchCond = dyn_cast<CmpInst>(PBranch->Condition);
1959 if (auto *C = dyn_cast<Constant>(V))
2103 if (auto *PBranch = dyn_cast<PredicateBranch>(PB))
2105 else if (auto *PAssume = dyn_cast<PredicateAssume>(PB))
2124 if (auto *I = dyn_cast<Instruction>(M))
2251 if (auto *SI = dyn_cast<StoreInst>(I)) {
2263 if (auto *SE = dyn_cast<StoreExpression>(E)) {
2342 if (const auto *VE = dyn_cast<VariableExpression>(E)) {
2357 if (const auto *CE = dyn_cast<ConstantExpression>(E)) {
2359 } else if (const auto *SE = dyn_cast<StoreExpression>(E)) {
2407 if (auto *CI = dyn_cast<CmpInst>(I))
2477 if (auto *I = dyn_cast<Instruction>(Cond)) {
2479 if (const auto *CE = dyn_cast<ConstantExpression>(E)) {
2487 if (CondEvaluated && (CI = dyn_cast<ConstantInt>(CondEvaluated))) {
2501 } else if (auto *SI = dyn_cast<SwitchInst>(TI)) {
2571 if (auto *UI = dyn_cast<Instruction>(U))
2679 if (auto *SI = dyn_cast<StoreInst>(FoundVal))
2882 auto *MD = dyn_cast<MemoryDef>(&Def);
2900 if (auto *UInst = dyn_cast<Instruction>(U))
3199 if (auto *MemDef = dyn_cast<MemoryDef>(Pair.first))
3204 if (auto *MemPHI = dyn_cast<MemoryPhi>(Pair.first)) {
3206 if (auto *I = dyn_cast<Instruction>(&*U)) {
3219 if (auto *FirstMUD = dyn_cast<MemoryUseOrDef>(KV.first)) {
3220 auto *SecondMUD = dyn_cast<MemoryUseOrDef>(KV.second->getMemoryLeader());
3230 } else if (auto *FirstMP = dyn_cast<MemoryPhi>(KV.first)) {
3271 if (auto *I = dyn_cast<Instruction>(KV.first))
3284 if (auto *I = dyn_cast<Instruction>(KV.first))
3317 if (auto *SE = dyn_cast<StoreExpression>(KV.first)) {
3389 if (auto *MP = dyn_cast<MemoryPhi>(V)) {
3392 } else if (auto *I = dyn_cast<Instruction>(V)) {
3576 if (auto *SI = dyn_cast<StoreInst>(D)) {
3607 if (auto *I = dyn_cast<Instruction>(U.getUser())) {
3614 if (auto *P = dyn_cast<PHINode>(I)) {
3665 if (auto *I = dyn_cast<Instruction>(D))
3763 if (auto *VE = dyn_cast<VariableExpression>(E))
3776 if (auto *CE = dyn_cast<ConstantExpression>(E))
3778 if (auto *VE = dyn_cast<VariableExpression>(E)) {
3791 auto *MemberInst = dyn_cast<Instruction>(Member);
3860 auto *PHI = dyn_cast<PHINode>(Inst);
4044 auto *II = dyn_cast<IntrinsicInst>(DominatingLeader);
4149 else if (auto *A = dyn_cast<Argument>(V))
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp 99 CallInst *Call = dyn_cast<CallInst>(&*II);
lib/Transforms/Scalar/PlaceSafepoints.cpp 186 if (auto *CI = dyn_cast<CallInst>(Call)) {
217 if (auto *Call = dyn_cast<CallBase>(&I))
272 if (CallInst *CI = dyn_cast<CallInst>(&*BBI))
361 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Call)) {
423 if (auto *Call = dyn_cast<CallBase>(Cursor)) {
lib/Transforms/Scalar/Reassociate.cpp 120 Instruction *I = dyn_cast<Instruction>(V);
148 auto *I = dyn_cast<Instruction>(V);
157 auto *I = dyn_cast<Instruction>(V);
190 Instruction *I = dyn_cast<Instruction>(V);
581 if (Instruction *Tmp = dyn_cast<Instruction>(Op))
817 if (auto *C = dyn_cast<Constant>(V))
873 if (Instruction *InstInput = dyn_cast<Instruction>(V)) {
874 if (InvokeInst *II = dyn_cast<InvokeInst>(InstInput)) {
1009 if (Instruction *I1 = dyn_cast<Instruction>(Ops[j].Op))
1010 if (Instruction *I2 = dyn_cast<Instruction>(X))
1018 if (Instruction *I1 = dyn_cast<Instruction>(Ops[j].Op))
1019 if (Instruction *I2 = dyn_cast<Instruction>(X))
1066 if (ConstantInt *FC1 = dyn_cast<ConstantInt>(Factor)) {
1067 if (ConstantInt *FC2 = dyn_cast<ConstantInt>(Factors[i].Op))
1073 } else if (ConstantFP *FC1 = dyn_cast<ConstantFP>(Factor)) {
1074 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) {
1223 if (Instruction *T = dyn_cast<Instruction>(Opnd1->getValue()))
1300 if (Instruction *T = dyn_cast<Instruction>(Opnd1->getValue()))
1302 if (Instruction *T = dyn_cast<Instruction>(Opnd2->getValue()))
1558 if (ConstantInt *CI = dyn_cast<ConstantInt>(Factor)) {
1569 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(Factor)) {
1634 if (Instruction *VI = dyn_cast<Instruction>(V))
1770 if (Instruction *MI = dyn_cast<Instruction>(M))
1821 if (auto FPI = dyn_cast<FPMathOperator>(I))
1903 if (Instruction *OpInst = dyn_cast<Instruction>(Op))
1921 if (Instruction *Op = dyn_cast<Instruction>(Ops[i])) {
2042 return dyn_cast<Instruction>(NewInst);
2130 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U))
2157 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U))
2229 if (Instruction *VI = dyn_cast<Instruction>(V))
2268 if (Instruction *OI = dyn_cast<Instruction>(Ops[0].Op))
2343 Instruction *OpI = dyn_cast<Instruction>(Op);
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp 313 if (auto *PT = dyn_cast<PointerType>(T))
331 if (auto VT = dyn_cast<VectorType>(T))
343 if (VectorType *VT = dyn_cast<VectorType>(Ty))
345 if (ArrayType *AT = dyn_cast<ArrayType>(Ty))
347 if (StructType *ST = dyn_cast<StructType>(Ty))
467 if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
472 if (auto *BC = dyn_cast<BitCastInst>(I))
519 if (CastInst *CI = dyn_cast<CastInst>(I)) {
537 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
541 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
825 if (PHINode *PN = dyn_cast<PHINode>(Current)) {
828 } else if (SelectInst *SI = dyn_cast<SelectInst>(Current)) {
831 } else if (auto *EE = dyn_cast<ExtractElementInst>(Current)) {
833 } else if (auto *IE = dyn_cast<InsertElementInst>(Current)) {
836 } else if (auto *SV = dyn_cast<ShuffleVectorInst>(Current)) {
885 if (SelectInst *SI = dyn_cast<SelectInst>(BDV)) {
889 } else if (PHINode *PN = dyn_cast<PHINode>(BDV)) {
892 } else if (auto *EE = dyn_cast<ExtractElementInst>(BDV)) {
897 } else if (auto *IE = dyn_cast<InsertElementInst>(BDV)){
969 } else if (SelectInst *SI = dyn_cast<SelectInst>(I)) {
974 } else if (auto *EE = dyn_cast<ExtractElementInst>(I)) {
979 } else if (auto *IE = dyn_cast<InsertElementInst>(I)) {
1036 if (PHINode *BasePHI = dyn_cast<PHINode>(State.getBaseValue())) {
1079 dyn_cast<SelectInst>(State.getBaseValue())) {
1087 dyn_cast<ExtractElementInst>(State.getBaseValue())) {
1092 } else if (auto *BaseIE = dyn_cast<InsertElementInst>(State.getBaseValue())){
1296 if (auto *VT = dyn_cast<VectorType>(Ty))
1462 if (Function *F = dyn_cast<Function>(CallTarget)) {
1488 if (auto *CI = dyn_cast<CallInst>(Call)) {
1634 GCRelocateInst *Relocate = dyn_cast<GCRelocateInst>(U);
1789 if (auto II = dyn_cast<InvokeInst>(Statepoint)) {
1846 if (Instruction *Inst = dyn_cast<Instruction>(Def)) {
1847 if (InvokeInst *Invoke = dyn_cast<InvokeInst>(Inst)) {
1935 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurrentValue)) {
1941 if (CastInst *CI = dyn_cast<CastInst>(CurrentValue)) {
1963 if (CastInst *CI = dyn_cast<CastInst>(Instr)) {
1970 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Instr)) {
2044 PHINode *OrigRootPhi = dyn_cast<PHINode>(RootOfChain);
2045 PHINode *AlternateRootPhi = dyn_cast<PHINode>(Info.PointerToBase[LiveValue]);
2189 auto *II = dyn_cast<InvokeInst>(Call);
2460 if (auto *II = dyn_cast<IntrinsicInst>(&I))
2473 if (auto *Call = dyn_cast<CallBase>(&I)) {
2524 if (const auto *Call = dyn_cast<CallBase>(&I))
2582 if (auto *BI = dyn_cast<BranchInst>(TI))
2584 return dyn_cast<Instruction>(BI->getCondition());
2674 PHINode *PN = dyn_cast<PHINode>(&I);
2701 if (auto *I = dyn_cast<Instruction>(V)) {
lib/Transforms/Scalar/SCCP.cpp 160 return dyn_cast<ConstantInt>(getConstant());
168 return dyn_cast<BlockAddress>(getConstant());
305 if (auto *STy = dyn_cast<StructType>(F->getReturnType())) {
356 auto *STy = dyn_cast<StructType>(V->getType());
401 if (auto *STy = dyn_cast<StructType>(V->getType()))
460 if (auto *F = dyn_cast<Function>(V)) dbgs()
499 if (auto *C = dyn_cast<Constant>(V)) {
537 if (auto *C = dyn_cast<Constant>(V)) {
592 if (auto *UI = dyn_cast<Instruction>(U))
598 if (auto *UI = dyn_cast<Instruction>(U))
669 if (auto *BI = dyn_cast<BranchInst>(&TI)) {
696 if (auto *SI = dyn_cast<SwitchInst>(&TI)) {
717 if (auto *IBR = dyn_cast<IndirectBrInst>(&TI)) {
852 if (auto *STy = dyn_cast<StructType>(ResultOp->getType()))
909 auto *STy = dyn_cast<StructType>(IVI.getType());
1174 if (auto *GV = dyn_cast<GlobalVariable>(Ptr)) {
1202 if (auto *II = dyn_cast<IntrinsicInst>(I)) {
1212 auto *PBranch = dyn_cast<PredicateBranch>(PI);
1221 auto *Cmp = dyn_cast<CmpInst>(Cond);
1323 if (auto *STy = dyn_cast<StructType>(AI->getType())) {
1346 if (auto *STy = dyn_cast<StructType>(F->getReturnType())) {
1444 if (auto *STy = dyn_cast<StructType>(I.getType())) {
1672 if (auto *BI = dyn_cast<BranchInst>(TI)) {
1696 if (auto *IBR = dyn_cast<IndirectBrInst>(TI)) {
1725 if (auto *SI = dyn_cast<SwitchInst>(TI)) {
1779 CallInst *CI = dyn_cast<CallInst>(V);
1963 if (auto *RI = dyn_cast<ReturnInst>(BB.getTerminator()))
1974 if (SwitchInst *SI = dyn_cast<SwitchInst>(I)) {
1980 } else if (BranchInst *BI = dyn_cast<BranchInst>(I)) {
1986 } else if (IndirectBrInst *IBR = dyn_cast<IndirectBrInst>(I)) {
2133 auto *I = dyn_cast<Instruction>(*UI);
2167 if (auto *II = dyn_cast<IntrinsicInst>(Inst)) {
lib/Transforms/Scalar/SROA.cpp 626 if (ConstantInt *CI = dyn_cast<ConstantInt>(SI.getCondition()))
636 if (PHINode *PN = dyn_cast<PHINode>(&I)) {
740 ConstantInt *OpC = dyn_cast<ConstantInt>(GTI.getOperand());
830 ConstantInt *Length = dyn_cast<ConstantInt>(II.getLength());
850 ConstantInt *Length = dyn_cast<ConstantInt>(II.getLength());
961 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
966 if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
975 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
1144 if (LoadInst *LI = dyn_cast<LoadInst>(U->getUser())) {
1146 } else if (StoreInst *SI = dyn_cast<StoreInst>(U->getUser())) {
1207 LoadInst *LI = dyn_cast<LoadInst>(U);
1336 LoadInst *LI = dyn_cast<LoadInst>(U);
1438 if (ArrayType *ArrayTy = dyn_cast<ArrayType>(ElementTy)) {
1441 } else if (VectorType *VectorTy = dyn_cast<VectorType>(ElementTy)) {
1444 } else if (StructType *STy = dyn_cast<StructType>(ElementTy)) {
1480 if (VectorType *VecTy = dyn_cast<VectorType>(Ty)) {
1496 if (ArrayType *ArrTy = dyn_cast<ArrayType>(Ty)) {
1509 StructType *STy = dyn_cast<StructType>(Ty);
1608 while (GEPOperator *GEP = dyn_cast<GEPOperator>(Ptr)) {
1626 if (Instruction *I = dyn_cast<Instruction>(OffsetPtr)) {
1646 } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(Ptr)) {
1687 if (auto *LI = dyn_cast<LoadInst>(I)) {
1690 } else if (auto *SI = dyn_cast<StoreInst>(I)) {
1838 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(U->getUser())) {
1843 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U->getUser())) {
1849 } else if (LoadInst *LI = dyn_cast<LoadInst>(U->getUser())) {
1859 } else if (StoreInst *SI = dyn_cast<StoreInst>(U->getUser())) {
1892 if (auto *VTy = dyn_cast<VectorType>(Ty)) {
1912 if (auto *LI = dyn_cast<LoadInst>(S.getUse()->getUser()))
1914 else if (auto *SI = dyn_cast<StoreInst>(S.getUse()->getUser()))
2018 if (LoadInst *LI = dyn_cast<LoadInst>(U->getUser())) {
2033 if (IntegerType *ITy = dyn_cast<IntegerType>(LI->getType())) {
2042 } else if (StoreInst *SI = dyn_cast<StoreInst>(U->getUser())) {
2058 if (IntegerType *ITy = dyn_cast<IntegerType>(ValueTy)) {
2067 } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(U->getUser())) {
2072 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U->getUser())) {
2215 VectorType *Ty = dyn_cast<VectorType>(V->getType());
2544 if (auto *AITy = dyn_cast<IntegerType>(NewAllocaTy))
2545 if (auto *TITy = dyn_cast<IntegerType>(TargetTy))
2661 if (AllocaInst *AI = dyn_cast<AllocaInst>(V->stripInBoundsOffsets()))
2690 if (auto *VITy = dyn_cast<IntegerType>(V->getType()))
2691 if (auto *AITy = dyn_cast<IntegerType>(NewAllocaTy))
2862 if (VectorType *AllocaVecTy = dyn_cast<VectorType>(AllocaTy))
2947 dyn_cast<AllocaInst>(OtherPtr->stripInBoundsOffsets())) {
3119 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
3126 if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
3314 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
3329 if (StructType *STy = dyn_cast<StructType>(Ty)) {
3475 if (ArrayType *ArrTy = dyn_cast<ArrayType>(Ty)) {
3477 } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
3513 if (SequentialType *SeqTy = dyn_cast<SequentialType>(Ty)) {
3540 StructType *STy = dyn_cast<StructType>(Ty);
3669 if (auto *LI = dyn_cast<LoadInst>(I))
3671 else if (auto *SI = dyn_cast<StoreInst>(I))
3672 if (auto *LI = dyn_cast<LoadInst>(SI->getValueOperand()))
3680 if (auto *LI = dyn_cast<LoadInst>(I)) {
3688 auto *SI = dyn_cast<StoreInst>(LU);
3700 } else if (auto *SI = dyn_cast<StoreInst>(I)) {
3704 auto *StoredLoad = dyn_cast<LoadInst>(SI->getValueOperand());
3934 if (AllocaInst *OtherAI = dyn_cast<AllocaInst>(StoreBasePtr)) {
3937 } else if (AllocaInst *OtherAI = dyn_cast<AllocaInst>(
4050 if (AllocaInst *OtherAI = dyn_cast<AllocaInst>(LoadBasePtr)) {
4054 } else if (AllocaInst *OtherAI = dyn_cast<AllocaInst>(
4423 if (Instruction *OldI = dyn_cast<Instruction>(OldV))
4517 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) {
lib/Transforms/Scalar/Scalarizer.cpp 242 PtrTy = dyn_cast<PointerType>(Ty);
275 InsertElementInst *Insert = dyn_cast<InsertElementInst>(V);
278 ConstantInt *Idx = dyn_cast<ConstantInt>(Insert->getOperand(2));
335 if (Argument *VArg = dyn_cast<Argument>(V)) {
342 if (Instruction *VOp = dyn_cast<Instruction>(V)) {
405 if (Instruction *New = dyn_cast<Instruction>(CV[I])) {
421 Layout.VecTy = dyn_cast<VectorType>(Ty);
442 VectorType *VT = dyn_cast<VectorType>(I.getType());
462 VectorType *VT = dyn_cast<VectorType>(I.getType());
495 VectorType *VT = dyn_cast<VectorType>(CI.getType());
553 VectorType *VT = dyn_cast<VectorType>(SI.getType());
599 VectorType *VT = dyn_cast<VectorType>(GEPI.getType());
637 if (GetElementPtrInst *NewGEPI = dyn_cast<GetElementPtrInst>(Res[I]))
645 VectorType *VT = dyn_cast<VectorType>(CI.getDestTy());
663 VectorType *DstVT = dyn_cast<VectorType>(BCI.getDestTy());
664 VectorType *SrcVT = dyn_cast<VectorType>(BCI.getSrcTy());
690 while ((VI = dyn_cast<Instruction>(V)) &&
718 VectorType *VT = dyn_cast<VectorType>(SVI.getType());
742 VectorType *VT = dyn_cast<VectorType>(PHI.getType());
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp 525 if (ConstantInt *ConstLHS = dyn_cast<ConstantInt>(LHS)) {
529 if (ConstantInt *ConstRHS = dyn_cast<ConstantInt>(RHS)) {
578 User *U = dyn_cast<User>(V);
582 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
585 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) {
619 if (Constant *C = dyn_cast<Constant>(Current)) {
656 if (CastInst *Cast = dyn_cast<CastInst>(U)) {
702 if (ConstantInt *CI = dyn_cast<ConstantInt>(NextInChain)) {
838 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx))
899 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx))
1252 Instruction *FirstOffsetDef = dyn_cast<Instruction>(FirstOffset);
1265 FirstOffsetDef = dyn_cast<Instruction>(FirstOffsetDef->getOperand(0));
1270 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(FirstOffsetDef)) {
1283 if (Instruction *User = dyn_cast<Instruction>(U))
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp 128 Instruction *OpI = dyn_cast<Instruction>(OpV);
149 Instruction *UserI = dyn_cast<Instruction>(U->getUser());
162 auto *PN = dyn_cast<PHINode>(&I);
366 if (auto *CondInst = dyn_cast<Instruction>(BI.getCondition()))
884 if (auto *SI = dyn_cast<SwitchInst>(CurrentTerm)) {
902 auto *BI = dyn_cast<BranchInst>(CurrentBB->getTerminator());
910 auto *BI = dyn_cast<BranchInst>(CurrentTerm);
1070 if (auto *II = dyn_cast<IntrinsicInst>(&I))
1907 BranchInst *BI = dyn_cast<BranchInst>(&TI);
2225 Instruction *UserI = dyn_cast<Instruction>(U->getUser());
2555 if (auto *SI = dyn_cast<SwitchInst>(BB->getTerminator())) {
2564 auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
2732 BranchInst *BI = dyn_cast<BranchInst>(&TI);
lib/Transforms/Scalar/SimplifyCFGPass.cpp 82 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator());
lib/Transforms/Scalar/Sink.cpp 46 if (PHINode *PN = dyn_cast<PHINode>(UseInst)) {
67 if (LoadInst *L = dyn_cast<LoadInst>(Inst)) {
78 if (auto *Call = dyn_cast<CallBase>(Inst)) {
144 if (AllocaInst *AI = dyn_cast<AllocaInst>(Inst))
lib/Transforms/Scalar/SpeculateAroundPHIs.cpp 99 auto *OpI = dyn_cast<Instruction>(*OpIt);
219 auto *IncomingC = dyn_cast<ConstantInt>(PN.getIncomingValue(i));
278 if (auto *UserII = dyn_cast<IntrinsicInst>(UserI))
361 auto *OpI = dyn_cast<Instruction>(*OpIt);
463 if (auto *OpI = dyn_cast<Instruction>(OpV)) {
536 auto *OpI = dyn_cast<Instruction>(OpV);
628 auto *OpPN = dyn_cast<PHINode>(OpV);
666 auto *OpI = dyn_cast<Instruction>(U.get());
813 while (auto *PN = dyn_cast<PHINode>(&*BBI)) {
lib/Transforms/Scalar/SpeculativeExecution.cpp 168 BranchInst *BI = dyn_cast<BranchInst>(B.getTerminator());
258 if (Instruction *I = dyn_cast<Instruction>(V)) {
lib/Transforms/Scalar/StructurizeCFG.cpp 405 if (Constant *C = dyn_cast<Constant>(Condition))
413 if (Instruction *Inst = dyn_cast<Instruction>(Condition)) {
417 if (Instruction *I = dyn_cast<Instruction>(U))
425 if (Argument *Arg = dyn_cast<Argument>(Condition)) {
919 } else if (PHINode *UserPN = dyn_cast<PHINode>(User)) {
948 auto Br = dyn_cast<BranchInst>(E->getEntry()->getTerminator());
971 auto Br = dyn_cast<BranchInst>(BB->getTerminator());
lib/Transforms/Scalar/TailRecursionElimination.cpp 97 auto *AI = dyn_cast<AllocaInst>(&I);
202 if (AllocaInst *AI = dyn_cast<AllocaInst>(&I))
239 CallInst *CI = dyn_cast<CallInst>(&I);
257 if (Argument *A = dyn_cast<Argument>(Arg.getUser()))
334 if (LoadInst *L = dyn_cast<LoadInst>(I)) {
367 if (Argument *Arg = dyn_cast<Argument>(V)) {
385 if (SwitchInst *SI = dyn_cast<SwitchInst>(UniquePred->getTerminator()))
401 ReturnInst *RI = dyn_cast<ReturnInst>(BBI.getTerminator());
669 if (ReturnInst *RI = dyn_cast<ReturnInst>(BBI.getTerminator()))
705 if (BranchInst *BI = dyn_cast<BranchInst>(PTI))
783 if (ReturnInst *Ret = dyn_cast<ReturnInst>(BB->getTerminator())) {
lib/Transforms/Utils/BasicBlockUtils.cpp 198 if (!(PredBB_BI = dyn_cast<BranchInst>(PredBB->getTerminator())))
200 BranchInst *BB_JmpI = dyn_cast<BranchInst>(BB->getTerminator());
781 if (BitCastInst *BCI = dyn_cast<BitCastInst>(V)) {
789 if (PHINode *PN = dyn_cast<PHINode>(V)) {
907 BranchInst *Pred1Br = dyn_cast<BranchInst>(Pred1->getTerminator());
908 BranchInst *Pred2Br = dyn_cast<BranchInst>(Pred2->getTerminator());
960 BranchInst *BI = dyn_cast<BranchInst>(CommonPred->getTerminator());
lib/Transforms/Utils/BreakCriticalEdges.cpp 120 if (const PHINode *VP = dyn_cast<PHINode>(V))
364 auto *IBI = dyn_cast<IndirectBrInst>(BB.getTerminator());
lib/Transforms/Utils/BuildLibCalls.cpp 842 dyn_cast<Function>(Callee.getCallee()->stripPointerCasts()))
924 dyn_cast<Function>(MemCpy.getCallee()->stripPointerCasts()))
1059 dyn_cast<Function>(Callee.getCallee()->stripPointerCasts()))
1101 dyn_cast<Function>(Callee.getCallee()->stripPointerCasts()))
1147 dyn_cast<Function>(PutChar.getCallee()->stripPointerCasts()))
1164 dyn_cast<Function>(PutS.getCallee()->stripPointerCasts()))
1185 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1205 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1224 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1243 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1267 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1286 dyn_cast<Function>(Malloc.getCallee()->stripPointerCasts()))
1307 dyn_cast<Function>(Calloc.getCallee()->stripPointerCasts()))
1331 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1350 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1370 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
1393 dyn_cast<Function>(F.getCallee()->stripPointerCasts()))
lib/Transforms/Utils/BypassSlowDivision.cpp 127 IntegerType *SlowType = dyn_cast<IntegerType>(SlowDivOrRem->getType());
191 Instruction *I = dyn_cast<Instruction>(V);
204 ConstantInt *C = dyn_cast<ConstantInt>(Op1);
206 C = dyn_cast<ConstantInt>(cast<BitCastInst>(Op1)->getOperand(0));
394 if (auto *BCI = dyn_cast<BitCastInst>(Divisor))
lib/Transforms/Utils/CallPromotionUtils.cpp 172 if (auto *Invoke = dyn_cast<InvokeInst>(CS.getInstruction()))
291 if (auto *OrigInvoke = dyn_cast<InvokeInst>(OrigInst)) {
lib/Transforms/Utils/CanonicalizeAliases.cpp 43 if (auto *GA = dyn_cast<GlobalAlias>(C)) {
52 auto *CE = dyn_cast<ConstantExpr>(C);
lib/Transforms/Utils/CloneFunction.cpp 64 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
188 if (ReturnInst *RI = dyn_cast<ReturnInst>(CBB->getTerminator()))
385 if (const BranchInst *BI = dyn_cast<BranchInst>(OldTI)) {
388 ConstantInt *Cond = dyn_cast<ConstantInt>(BI->getCondition());
403 } else if (const SwitchInst *SI = dyn_cast<SwitchInst>(OldTI)) {
405 ConstantInt *Cond = dyn_cast<ConstantInt>(SI->getCondition());
680 BranchInst *BI = dyn_cast<BranchInst>(I->getTerminator());
714 if (ReturnInst *RI = dyn_cast<ReturnInst>(I->getTerminator()))
870 if (Instruction *Inst = dyn_cast<Instruction>(New->getOperand(i))) {
lib/Transforms/Utils/CodeExtractor.cpp 150 if (const auto *CRI = dyn_cast<CatchReturnInst>(U))
161 if (const auto *CRI = dyn_cast<CleanupReturnInst>(U))
268 if (Instruction *I = dyn_cast<Instruction>(V))
279 if (Instruction *I = dyn_cast<Instruction>(V))
311 if (auto *AI = dyn_cast<AllocaInst>(&II))
333 if (dyn_cast<Constant>(MemAddr))
344 IntrinsicInst *IntrInst = dyn_cast<IntrinsicInst>(&II);
449 IntrinsicInst *IntrInst = dyn_cast<IntrinsicInst>(U);
581 if (const CallInst *CI = dyn_cast<CallInst>(&I))
746 if (ReturnInst *RI = dyn_cast<ReturnInst>(Block->getTerminator())) {
946 if (Instruction *inst = dyn_cast<Instruction>(use))
967 if (Instruction *I = dyn_cast<Instruction>(U))
986 auto *II = dyn_cast<IntrinsicInst>(&*It);
1236 auto *OutI = dyn_cast<Instruction>(outputs[i]);
1244 if (auto *InvokeI = dyn_cast<InvokeInst>(OutI))
1246 else if (auto *Phi = dyn_cast<PHINode>(OutI))
1483 if (auto *AI = dyn_cast<AllocaInst>(II)) {
lib/Transforms/Utils/CtorUtils.cpp 73 Result.push_back(dyn_cast<Function>(CS->getOperand(1)));
lib/Transforms/Utils/DemoteRegToStack.cpp 46 if (InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
59 if (PHINode *PN = dyn_cast<PHINode>(U)) {
132 if (InvokeInst *II = dyn_cast<InvokeInst>(P->getIncomingValue(i))) {
lib/Transforms/Utils/EscapeEnumerator.cpp 59 if (CallInst *CI = dyn_cast<CallInst>(&II))
lib/Transforms/Utils/Evaluator.cpp 66 if (auto *GV = dyn_cast<GlobalValue>(C))
137 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C))
141 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
206 auto *GV = dyn_cast<GlobalVariable>(C);
225 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(P)) {
231 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) {
259 if (auto *Fn = dyn_cast<Function>(C))
262 if (auto *Alias = dyn_cast<GlobalAlias>(C))
263 if (auto *Fn = dyn_cast<Function>(Alias->getAliasee()))
275 auto *CE = dyn_cast<ConstantExpr>(V);
280 return dyn_cast<Function>(
312 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr);
317 dyn_cast<FunctionType>(CE->getType()->getPointerElementType())) {
364 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
494 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(CS.getInstruction())) {
495 if (MemSetInst *MSI = dyn_cast<MemSetInst>(II)) {
529 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {
615 dyn_cast<ConstantInt>(getVal(BI->getCondition()));
622 dyn_cast<ConstantInt>(getVal(SI->getCondition()));
627 if (BlockAddress *BA = dyn_cast<BlockAddress>(Val))
lib/Transforms/Utils/FlattenCFG.cpp 151 BranchInst *PBI = dyn_cast<BranchInst>(Pred->getTerminator());
223 BranchInst *BPS = dyn_cast<BranchInst>(PS->getTerminator());
237 BranchInst *PBI1 = dyn_cast<BranchInst>(PS1->getTerminator());
238 BranchInst *PBI2 = dyn_cast<BranchInst>(PS2->getTerminator());
255 auto *CI = dyn_cast<CmpInst>(BI->getCondition());
358 StoreInst *SI = dyn_cast<StoreInst>(CurI);
lib/Transforms/Utils/FunctionComparator.cpp 229 if (auto *VecTyL = dyn_cast<VectorType>(TyL))
231 if (auto *VecTyR = dyn_cast<VectorType>(TyR))
239 PointerType *PTyL = dyn_cast<PointerType>(TyL);
240 PointerType *PTyR = dyn_cast<PointerType>(TyR);
267 auto GlobalValueL = const_cast<GlobalValue *>(dyn_cast<GlobalValue>(L));
268 auto GlobalValueR = const_cast<GlobalValue *>(dyn_cast<GlobalValue>(R));
276 if (const auto *SeqL = dyn_cast<ConstantDataSequential>(L)) {
407 PointerType *PTyL = dyn_cast<PointerType>(TyL);
408 PointerType *PTyR = dyn_cast<PointerType>(TyR);
508 if (const GetElementPtrInst *GEPL = dyn_cast<GetElementPtrInst>(L)) {
536 if (const AllocaInst *AI = dyn_cast<AllocaInst>(L)) {
542 if (const LoadInst *LI = dyn_cast<LoadInst>(L)) {
557 if (const StoreInst *SI = dyn_cast<StoreInst>(L)) {
570 if (const CmpInst *CI = dyn_cast<CmpInst>(L))
580 if (const CallInst *CI = dyn_cast<CallInst>(L))
587 if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(L)) {
598 if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(L)) {
608 if (const FenceInst *FI = dyn_cast<FenceInst>(L)) {
615 if (const AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(L)) {
633 if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(L)) {
646 if (const PHINode *PNL = dyn_cast<PHINode>(L)) {
732 const Constant *ConstL = dyn_cast<Constant>(L);
733 const Constant *ConstR = dyn_cast<Constant>(R);
745 const InlineAsm *InlineAsmL = dyn_cast<InlineAsm>(L);
746 const InlineAsm *InlineAsmR = dyn_cast<InlineAsm>(R);
lib/Transforms/Utils/FunctionImportUtils.cpp 210 if (Function *F = dyn_cast<Function>(&GV)) {
242 if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) {
247 auto* GVS = dyn_cast<GlobalVarSummary>(
280 auto *GO = dyn_cast<GlobalObject>(&GV);
lib/Transforms/Utils/GlobalStatus.cpp 53 if (const Constant *CU = dyn_cast<Constant>(U)) {
63 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
69 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(UR)) {
80 } else if (const Instruction *I = dyn_cast<Instruction>(UR)) {
88 if (const LoadInst *LI = dyn_cast<LoadInst>(I)) {
94 } else if (const StoreInst *SI = dyn_cast<StoreInst>(I)) {
110 dyn_cast<GlobalVariable>(SI->getOperand(1))) {
113 if (Constant *C = dyn_cast<Constant>(StoredVal)) {
155 } else if (const MemTransferInst *MTI = dyn_cast<MemTransferInst>(I)) {
162 } else if (const MemSetInst *MSI = dyn_cast<MemSetInst>(I)) {
174 } else if (const Constant *C = dyn_cast<Constant>(UR)) {
lib/Transforms/Utils/InlineFunction.cpp 219 if (auto *FPI = dyn_cast<FuncletPadInst>(EHPad))
240 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(CurrentPad)) {
290 if (auto *CleanupRet = dyn_cast<CleanupReturnInst>(U)) {
298 if (auto *Invoke = dyn_cast<InvokeInst>(U)) {
337 if (auto *UnwindPad = dyn_cast<Instruction>(UnwindDestToken))
344 ExitedPad = dyn_cast<Instruction>(getParentPad(ExitedPad))) {
384 if (auto *CPI = dyn_cast<CatchPadInst>(EHPad))
411 auto *AncestorPad = dyn_cast<Instruction>(AncestorToken);
485 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(UselessPad)) {
531 CallInst *CI = dyn_cast<CallInst>(I);
562 if (auto *CatchPad = dyn_cast<CatchPadInst>(FuncletPad))
599 if (InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator()))
624 if (ResumeInst *RI = dyn_cast<ResumeInst>(BB->getTerminator()))
655 PHINode *PHI = dyn_cast<PHINode>(&I);
677 if (auto *CRI = dyn_cast<CleanupReturnInst>(BB->getTerminator())) {
699 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
703 dyn_cast<Instruction>(CatchSwitch->getParentPad())) {
860 if (const MDNode *M = dyn_cast<MDNode>(V))
974 if (const Instruction *I = dyn_cast<Instruction>(VMI->first)) {
985 if (const LoadInst *LI = dyn_cast<LoadInst>(I))
987 else if (const StoreInst *SI = dyn_cast<StoreInst>(I))
989 else if (const VAArgInst *VAAI = dyn_cast<VAArgInst>(I))
991 else if (const AtomicCmpXchgInst *CXI = dyn_cast<AtomicCmpXchgInst>(I))
993 else if (const AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(I))
995 else if (const auto *Call = dyn_cast<CallBase>(I)) {
1061 if (const Argument *A = dyn_cast<Argument>(V)) {
1316 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U))
1374 if (DILocation *DL = dyn_cast<DILocation>(MD))
1525 if (CallInst *CI = dyn_cast<CallInst>(&I))
1812 if (auto *II = dyn_cast<IntrinsicInst>(&I))
1874 if (CallInst *CI = dyn_cast<CallInst>(TheCall))
1885 CallInst *CI = dyn_cast<CallInst>(&I);
1972 dyn_cast<ConstantInt>(AI->getArraySize())) {
2036 if (auto *II = dyn_cast<InvokeInst>(TheCall)) {
2064 dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts());
2093 if (auto *CleanupRet = dyn_cast<CleanupReturnInst>(BB->getTerminator()))
2101 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
2234 if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall)) {
2266 if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall)) {
lib/Transforms/Utils/IntegerDivision.cpp 67 if (Instruction *URemInst = dyn_cast<Instruction>(URem))
92 if (Instruction *UDiv = dyn_cast<Instruction>(Quotient))
141 if (Instruction *UDiv = dyn_cast<Instruction>(Q_Mag))
lib/Transforms/Utils/LCSSA.cpp 107 if (auto *PN = dyn_cast<PHINode>(User))
125 if (auto *Inv = dyn_cast<InvokeInst>(I))
191 if (auto *PN = dyn_cast<PHINode>(User))
lib/Transforms/Utils/LibCallsShrinkWrap.cpp 432 if (ConstantFP *CF = dyn_cast<ConstantFP>(Base)) {
447 Instruction *I = dyn_cast<Instruction>(Base);
lib/Transforms/Utils/Local.cpp 116 if (auto *BI = dyn_cast<BranchInst>(T)) {
121 if (auto *Cond = dyn_cast<ConstantInt>(BI->getCondition())) {
159 if (auto *SI = dyn_cast<SwitchInst>(T)) {
162 auto *CI = dyn_cast<ConstantInt>(SI->getCondition());
301 if (auto *IBI = dyn_cast<IndirectBrInst>(T)) {
304 dyn_cast<BlockAddress>(IBI->getAddress()->stripPointerCasts())) {
378 if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) {
383 if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(I)) {
388 if (DbgLabelInst *DLI = dyn_cast<DbgLabelInst>(I)) {
399 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
415 if (ConstantInt *Cond = dyn_cast<ConstantInt>(II->getArgOperand(0)))
426 if (Constant *C = dyn_cast<Constant>(CI->getArgOperand(0)))
429 if (auto *Call = dyn_cast<CallBase>(I))
442 Instruction *I = dyn_cast<Instruction>(V);
478 if (Instruction *OpI = dyn_cast<Instruction>(OpV))
563 if (Instruction *OpI = dyn_cast<Instruction>(OpV))
779 PHINode *BBPN = dyn_cast<PHINode>(PN->getIncomingValueForBlock(BB));
978 if (PHINode* PN = dyn_cast<PHINode>(U.getUser())) {
992 if (auto *CBI = dyn_cast<CallBrInst>((*I)->getTerminator())) {
1038 while (PHINode *PN = dyn_cast<PHINode>(&BB->front())) {
1142 if (AllocaInst *AI = dyn_cast<AllocaInst>(V)) {
1161 if (auto *GO = dyn_cast<GlobalObject>(V)) {
1396 if (auto DDI = dyn_cast<DbgDeclareInst>(&BI))
1416 if (LoadInst *LI = dyn_cast<LoadInst>(U))
1418 if (StoreInst *SI = dyn_cast<StoreInst>(U))
1426 if (StoreInst *SI = dyn_cast<StoreInst>(U)) {
1429 } else if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
1431 } else if (CallInst *CI = dyn_cast<CallInst>(U)) {
1457 if (auto DbgII = dyn_cast<DbgVariableIntrinsic>(&I)) {
1506 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(U))
1522 if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(U))
1535 if (DbgVariableIntrinsic *DII = dyn_cast<DbgVariableIntrinsic>(U))
1595 if (auto *DVI = dyn_cast<DbgValueInst>(U.getUser()))
1670 if (auto *CI = dyn_cast<CastInst>(&I)) {
1675 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
1685 } else if (auto *BI = dyn_cast<BinaryOperator>(&I)) {
1687 auto *ConstInt = dyn_cast<ConstantInt>(I.getOperand(1));
2027 if (auto *CI = dyn_cast<CallInst>(&I)) {
2030 if (Function *F = dyn_cast<Function>(Callee)) {
2079 } else if (auto *SI = dyn_cast<StoreInst>(&I)) {
2101 if (auto *II = dyn_cast<InvokeInst>(Terminator)) {
2124 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Terminator)) {
2178 if (auto *II = dyn_cast<InvokeInst>(TI)) {
2186 if (auto *CRI = dyn_cast<CleanupReturnInst>(TI)) {
2189 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(TI)) {
2428 auto *ReplInst = dyn_cast<Instruction>(Repl);
2692 if (Instruction *I = dyn_cast<Instruction>(V)) {
2824 IntegerType *ITy = dyn_cast<IntegerType>(I->getType());
2832 if (TruncInst *Trunc = dyn_cast<TruncInst>(I->user_back())) {
2958 if (AllocaInst *AI = dyn_cast<AllocaInst>(V))
2969 if (CastInst *CI = dyn_cast<CastInst>(V))
2971 else if (PHINode *PN = dyn_cast<PHINode>(V)) {
2982 } else if (GetElementPtrInst *EP = dyn_cast<GetElementPtrInst>(V)) {
lib/Transforms/Utils/LoopRotationUtils.cpp 212 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator());
318 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(&*I))
348 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(C))
374 if (auto *II = dyn_cast<IntrinsicInst>(C))
600 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator());
608 BranchInst *BI = dyn_cast<BranchInst>(LastExit->getTerminator());
lib/Transforms/Utils/LoopSimplify.cpp 520 if (BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()))
522 if (UndefValue *Cond = dyn_cast<UndefValue>(BI->getCondition())) {
631 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator());
633 CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition());
lib/Transforms/Utils/LoopUnroll.cpp 73 if (auto *V = dyn_cast<MetadataAsValue>(Op))
74 if (auto *Unwrapped = dyn_cast<ValueAsMetadata>(V->getMetadata())) {
89 if (PHINode *PN = dyn_cast<PHINode>(I)) {
305 BranchInst *HeaderBI = dyn_cast<BranchInst>(Header->getTerminator());
306 BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator());
624 if (Instruction *InValI = dyn_cast<Instruction>(InVal))
687 if (auto *II = dyn_cast<IntrinsicInst>(&I))
703 if (Instruction *InValI = dyn_cast<Instruction>(InVal)) {
876 BranchInst *Term = dyn_cast<BranchInst>(Latch->getTerminator());
lib/Transforms/Utils/LoopUnrollAndJam.cpp 97 if (Instruction *I = dyn_cast<Instruction>(V))
250 BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator());
384 if (auto *II = dyn_cast<IntrinsicInst>(&I))
544 BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator());
595 if (auto *Ld = dyn_cast<LoadInst>(&I)) {
599 } else if (auto *St = dyn_cast<StoreInst>(&I)) {
lib/Transforms/Utils/LoopUnrollPeel.cpp 90 const BranchInst *T = dyn_cast<BranchInst>(Latch->getTerminator());
145 else if (PHINode *IncPhi = dyn_cast<PHINode>(Input)) {
178 auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
541 Instruction *LatchInst = dyn_cast<Instruction>(LatchVal);
557 Instruction *LatchInst = dyn_cast<Instruction>(LatchVal);
735 Instruction *LatchInst = dyn_cast<Instruction>(NewVal);
lib/Transforms/Utils/LoopUnrollRuntime.cpp 115 if (Instruction *I = dyn_cast<Instruction>(V)) {
226 Instruction *I = dyn_cast<Instruction>(V);
lib/Transforms/Utils/LoopUtils.cpp 529 auto *OldBr = dyn_cast<BranchInst>(Preheader->getTerminator());
617 if (auto *Usr = dyn_cast<Instruction>(U.getUser()))
627 auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I);
687 BranchInst *LatchBR = dyn_cast<BranchInst>(Latch->getTerminator());
980 auto *VecOp = dyn_cast<Instruction>(I);
983 auto *Intersection = (OpValue == nullptr) ? dyn_cast<Instruction>(VL[0])
984 : dyn_cast<Instruction>(OpValue);
990 auto *Instr = dyn_cast<Instruction>(V);
lib/Transforms/Utils/LoopVersioning.cpp 71 auto *CI = dyn_cast<ConstantInt>(SCEVRuntimeCheck);
80 if (auto *I = dyn_cast<Instruction>(RuntimeCheck))
lib/Transforms/Utils/LowerInvoke.cpp 49 if (InvokeInst *II = dyn_cast<InvokeInst>(BB.getTerminator())) {
lib/Transforms/Utils/LowerMemIntrinsics.cpp 18 if (VectorType *VTy = dyn_cast<VectorType>(Type)) {
167 IntegerType *ILengthType = dyn_cast<IntegerType>(CopyLenType);
410 if (ConstantInt *CI = dyn_cast<ConstantInt>(Memcpy->getLength())) {
lib/Transforms/Utils/LowerSwitch.cpp 169 if (SwitchInst *SI = dyn_cast<SwitchInst>(Cur->getTerminator())) {
lib/Transforms/Utils/MisExpect.cpp 55 if (auto *B = dyn_cast<BranchInst>(I)) {
56 Ret = dyn_cast<Instruction>(B->getCondition());
lib/Transforms/Utils/PredicateInfo.cpp 267 auto *PHI = dyn_cast<PHINode>(VDUse.U->getUser());
294 if (auto *I = dyn_cast<Instruction>(U.getUser())) {
298 if (auto *PN = dyn_cast<PHINode>(I)) {
369 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) {
377 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) {
440 if (auto *Cmp = dyn_cast<CmpInst>(Cond)) {
445 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) {
495 if (auto *BI = dyn_cast<BranchInst>(BranchBB->getTerminator())) {
502 } else if (auto *SI = dyn_cast<SwitchInst>(BranchBB->getTerminator())) {
566 auto *PAssume = dyn_cast<PredicateAssume>(ValInfo);
618 if (const auto *PAssume = dyn_cast<PredicateAssume>(PossibleCopy)) {
789 auto *II = dyn_cast<IntrinsicInst>(Inst);
838 if (const auto *PB = dyn_cast<PredicateBranch>(PI)) {
845 } else if (const auto *PS = dyn_cast<PredicateSwitch>(PI)) {
852 } else if (const auto *PA = dyn_cast<PredicateAssume>(PI)) {
lib/Transforms/Utils/PromoteMemoryToRegister.cpp 71 if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {
76 } else if (const StoreInst *SI = dyn_cast<StoreInst>(U)) {
83 } else if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(U)) {
86 } else if (const BitCastInst *BCI = dyn_cast<BitCastInst>(U)) {
91 } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
138 if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
459 if (StoreInst *SI = dyn_cast<StoreInst>(U))
469 LoadInst *LI = dyn_cast<LoadInst>(*UI++);
935 if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
936 AllocaInst *Src = dyn_cast<AllocaInst>(LI->getPointerOperand());
956 } else if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
959 AllocaInst *Dest = dyn_cast<AllocaInst>(SI->getPointerOperand());
lib/Transforms/Utils/SSAUpdater.cpp 193 if (PHINode *UserPN = dyn_cast<PHINode>(User))
210 if (PHINode *UserPN = dyn_cast<PHINode>(User))
294 return dyn_cast<PHINode>(I);
299 return dyn_cast<PHINode>(Val);
342 if (const LoadInst *LI = dyn_cast<LoadInst>(Insts[0]))
378 if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
414 if (LoadInst *L = dyn_cast<LoadInst>(&I)) {
430 if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
lib/Transforms/Utils/SSAUpdaterBulk.cpp 32 if (auto *UserPN = dyn_cast<PHINode>(User))
lib/Transforms/Utils/SimplifyCFG.cpp 273 CmpInst *Ci2 = dyn_cast<CmpInst>(SI2->getCondition());
351 Instruction *I = dyn_cast<Instruction>(V);
355 if (ConstantExpr *C = dyn_cast<ConstantExpr>(V))
370 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator());
411 ConstantInt *CI = dyn_cast<ConstantInt>(V);
424 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
426 if (ConstantInt *CI = dyn_cast<ConstantInt>(CE->getOperand(0))) {
494 if (!((ICI = dyn_cast<ICmpInst>(I)) &&
648 if (Instruction *I = dyn_cast<Instruction>(V)) {
683 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
684 Cond = dyn_cast<Instruction>(SI->getCondition());
685 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
687 Cond = dyn_cast<Instruction>(BI->getCondition());
688 } else if (IndirectBrInst *IBI = dyn_cast<IndirectBrInst>(TI)) {
689 Cond = dyn_cast<Instruction>(IBI->getAddress());
701 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
706 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI))
708 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) {
715 if (PtrToIntInst *PTII = dyn_cast<PtrToIntInst>(CV)) {
728 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
980 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) {
1252 DbgInfoIntrinsic *DBI1 = dyn_cast<DbgInfoIntrinsic>(I1);
1253 DbgInfoIntrinsic *DBI2 = dyn_cast<DbgInfoIntrinsic>(I2);
1280 auto *C1 = dyn_cast<CallInst>(I1);
1281 auto *C2 = dyn_cast<CallInst>(I2);
1333 DbgInfoIntrinsic *DBI1 = dyn_cast<DbgInfoIntrinsic>(I1);
1334 DbgInfoIntrinsic *DBI2 = dyn_cast<DbgInfoIntrinsic>(I2);
1428 if (auto II = dyn_cast<IntrinsicInst>(I)) {
1461 if (const auto *C = dyn_cast<CallBase>(I))
1482 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1565 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1886 StoreInst *StoreToHoist = dyn_cast<StoreInst>(I);
1907 if (auto *SI = dyn_cast<StoreInst>(&CurI)) {
2059 ConstantExpr *OrigCE = dyn_cast<ConstantExpr>(OrigV);
2060 ConstantExpr *ThenCE = dyn_cast<ConstantExpr>(ThenV);
2177 PHINode *PN = dyn_cast<PHINode>(BI->getCondition());
2195 const CallInst *CI = dyn_cast<CallInst>(&I);
2203 ConstantInt *CB = dyn_cast<ConstantInt>(PN->getIncomingValue(i));
2581 Cond = dyn_cast<Instruction>(BI->getCondition());
2588 if (BranchInst *PBI = dyn_cast<BranchInst>(PB->getTerminator()))
2638 Instruction *User = dyn_cast<Instruction>(I->user_back());
2655 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(0)))
2658 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(1)))
2670 BranchInst *PBI = dyn_cast<BranchInst>(PredBlock->getTerminator());
2885 if (auto *SI = dyn_cast<StoreInst>(&I)) {
3007 if (auto *S = dyn_cast<StoreInst>(&I))
3192 if (StoreInst *SI = dyn_cast<StoreInst>(&I))
3199 if (StoreInst *SI = dyn_cast<StoreInst>(&I))
3253 if ((PBI = dyn_cast<BranchInst>(P->getTerminator())) && PBI != BI &&
3270 if (auto *CE = dyn_cast<ConstantExpr>(BI->getCondition()))
3328 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(BIV))
3334 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(PBIV))
3523 ConstantInt *TrueVal = dyn_cast<ConstantInt>(Select->getTrueValue());
3524 ConstantInt *FalseVal = dyn_cast<ConstantInt>(Select->getFalseValue());
3559 BlockAddress *TBA = dyn_cast<BlockAddress>(SI->getTrueValue());
3560 BlockAddress *FBA = dyn_cast<BlockAddress>(SI->getFalseValue());
3648 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back());
3694 Instruction *Cond = dyn_cast<Instruction>(BI->getCondition());
3844 auto *LandingPad = dyn_cast<LandingPadInst>(IncomingBB->getFirstNonPHI());
3995 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal);
4073 auto *SuccessorCleanupPad = dyn_cast<CleanupPadInst>(&UnwindDest->front());
4119 if (BranchInst *BI = dyn_cast<BranchInst>(PTI)) {
4225 if (auto *BI = dyn_cast<BranchInst>(TI)) {
4244 } else if (auto *SI = dyn_cast<SwitchInst>(TI)) {
4256 } else if (auto *II = dyn_cast<InvokeInst>(TI)) {
4261 } else if (auto *CSI = dyn_cast<CatchSwitchInst>(TI)) {
4524 BranchInst *Branch = dyn_cast<BranchInst>(BB->getTerminator());
4616 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
4634 if (Constant *C = dyn_cast<Constant>(V))
4646 if (SelectInst *Select = dyn_cast<SelectInst>(I)) {
4665 if (CmpInst *Cmp = dyn_cast<CmpInst>(I)) {
4704 if (Instruction *I = dyn_cast<Instruction>(User))
4707 if (PHINode *Phi = dyn_cast<PHINode>(User))
5031 ConstantInt *ConstVal = dyn_cast<ConstantInt>(TableContents[I]);
5150 auto *IT = dyn_cast<IntegerType>(ElementType);
5229 ICmpInst *CmpInst = dyn_cast<ICmpInst>(PhiUser);
5238 Constant *CmpOp1 = dyn_cast<Constant>(CmpInst->getOperand(1));
5644 if (SelectInst *Select = dyn_cast<SelectInst>(Cond))
5715 if (SelectInst *SI = dyn_cast<SelectInst>(IBI->getAddress())) {
5940 if (PHINode *PN = dyn_cast<PHINode>(BI->getCondition()))
5947 if (BranchInst *PBI = dyn_cast<BranchInst>((*PI)->getTerminator()))
5955 if (BranchInst *PBI = dyn_cast<BranchInst>(PrevBB->getTerminator()))
5965 Constant *C = dyn_cast<Constant>(V);
5980 UI = BasicBlock::iterator(dyn_cast<Instruction>(Use));
5986 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Use))
5991 if (BitCastInst *BC = dyn_cast<BitCastInst>(Use))
5995 if (LoadInst *LI = dyn_cast<LoadInst>(Use))
6001 if (StoreInst *SI = dyn_cast<StoreInst>(Use))
6023 if (BranchInst *BI = dyn_cast<BranchInst>(T)) {
6084 if (auto *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
6092 } else if (auto *RI = dyn_cast<ReturnInst>(BB->getTerminator())) {
6095 } else if (auto *RI = dyn_cast<ResumeInst>(BB->getTerminator())) {
6098 } else if (auto *RI = dyn_cast<CleanupReturnInst>(BB->getTerminator())) {
6101 } else if (auto *SI = dyn_cast<SwitchInst>(BB->getTerminator())) {
6104 } else if (auto *UI = dyn_cast<UnreachableInst>(BB->getTerminator())) {
6107 } else if (auto *IBI = dyn_cast<IndirectBrInst>(BB->getTerminator())) {
lib/Transforms/Utils/SimplifyIndVar.cpp 195 auto *PN = dyn_cast<PHINode>(IVOperand);
224 if (auto *ConstLHS = dyn_cast<SCEVConstant>(InvariantLHS))
227 if (auto *ConstRHS = dyn_cast<SCEVConstant>(InvariantRHS))
461 if (auto *EVI = dyn_cast<ExtractValueInst>(U)) {
544 ICmpInst *ICI = dyn_cast<ICmpInst>(U);
618 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) {
622 if (BinaryOperator *Bin = dyn_cast<BinaryOperator>(UseInst)) {
633 if (auto *WO = dyn_cast<WithOverflowInst>(UseInst))
637 if (auto *SI = dyn_cast<SaturatingInst>(UseInst))
641 if (auto *TI = dyn_cast<TruncInst>(UseInst))
833 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S);
896 IVOperand = dyn_cast<Instruction>(NewOper);
906 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(UseInst)) {
916 CastInst *Cast = dyn_cast<CastInst>(UseInst);
lib/Transforms/Utils/SimplifyLibCalls.cpp 95 if (ICmpInst *IC = dyn_cast<ICmpInst>(U))
143 CallInst *FOpen = dyn_cast<CallInst>(File);
165 if (ICmpInst *IC = dyn_cast<ICmpInst>(U))
166 if (Constant *C = dyn_cast<Constant>(IC->getOperand(1)))
237 if (ConstantInt *LenC = dyn_cast<ConstantInt>(Size)) {
307 ConstantInt *LengthArg = dyn_cast<ConstantInt>(Size);
347 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1));
386 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1));
478 if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(Size))
537 ConstantInt *Size = dyn_cast<ConstantInt>(CI->getArgOperand(1));
607 if (ConstantInt *LengthArg = dyn_cast<ConstantInt>(Size))
661 if (GEPOperator *GEP = dyn_cast<GEPOperator>(Src)) {
713 if (SelectInst *SI = dyn_cast<SelectInst>(Src)) {
903 ConstantInt *CharC = dyn_cast<ConstantInt>(CI->getArgOperand(1));
904 ConstantInt *LenC = dyn_cast<ConstantInt>(Size);
1013 if (auto *LHSC = dyn_cast<Constant>(LHS)) {
1018 if (auto *RHSC = dyn_cast<Constant>(RHS)) {
1074 ConstantInt *LenC = dyn_cast<ConstantInt>(Size);
1147 auto *FillValue = dyn_cast<ConstantInt>(Memset->getArgOperand(1));
1155 auto *Malloc = dyn_cast<CallInst>(Memset->getArgOperand(0));
1235 if (FPExtInst *Cast = dyn_cast<FPExtInst>(Val)) {
1240 if (ConstantFP *Const = dyn_cast<ConstantFP>(Val)) {
1263 FPTruncInst *Cast = dyn_cast<FPTruncInst>(U);
1451 CallInst *BaseFn = dyn_cast<CallInst>(Base);
1824 CallInst *Arg = dyn_cast<CallInst>(Log->getArgOperand(0));
1976 Instruction *I = dyn_cast<Instruction>(CI->getArgOperand(0));
2040 auto *OpC = dyn_cast<CallInst>(Op1);
2095 if (Instruction *ArgInst = dyn_cast<Instruction>(Arg)) {
2164 CallInst *CI = dyn_cast<CallInst>(Val);
2272 if (ConstantInt *CInt = dyn_cast<ConstantInt>(CI->getArgOperand(2))) {
2316 LoadInst *LI = dyn_cast<LoadInst>(CI->getArgOperand(StreamArg));
2319 GlobalVariable *GV = dyn_cast<GlobalVariable>(LI->getPointerOperand());
2512 ConstantInt *Size = dyn_cast<ConstantInt>(CI->getArgOperand(1));
2686 ConstantInt *SizeC = dyn_cast<ConstantInt>(CI->getArgOperand(1));
2687 ConstantInt *CountC = dyn_cast<ConstantInt>(CI->getArgOperand(2));
3012 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI)) {
3043 CallInst *SimplifiedCI = dyn_cast<CallInst>(SimplifiedFortifiedCI);
3188 ConstantInt *Flag = dyn_cast<ConstantInt>(CI->getArgOperand(*FlagOp));
3197 dyn_cast<ConstantInt>(CI->getArgOperand(ObjSizeOp))) {
3216 dyn_cast<ConstantInt>(CI->getArgOperand(*SizeOp)))
lib/Transforms/Utils/SplitModule.cpp 65 if (const Instruction *I = dyn_cast<Instruction>(U)) {
129 if (auto *GIS = dyn_cast<GlobalIndirectSymbol>(&GV)) {
134 if (const Function *F = dyn_cast<Function>(&GV)) {
229 if (auto *GIS = dyn_cast<GlobalIndirectSymbol>(GV))
lib/Transforms/Utils/StripGCRelocates.cpp 49 if (auto *GCR = dyn_cast<GCRelocateInst>(&I))
lib/Transforms/Utils/SymbolRewriter.cpp 136 if (GlobalObject *GO = dyn_cast<GlobalObject>(S))
190 if (GlobalObject *GO = dyn_cast<GlobalObject>(&C))
277 DescriptorList = dyn_cast<yaml::MappingNode>(Document.getRoot());
298 Key = dyn_cast<yaml::ScalarNode>(Entry.getKey());
304 Value = dyn_cast<yaml::MappingNode>(Entry.getValue());
338 Key = dyn_cast<yaml::ScalarNode>(Field.getKey());
344 Value = dyn_cast<yaml::ScalarNode>(Field.getValue());
407 Key = dyn_cast<yaml::ScalarNode>(Field.getKey());
413 Value = dyn_cast<yaml::ScalarNode>(Field.getValue());
470 Key = dyn_cast<yaml::ScalarNode>(Field.getKey());
476 Value = dyn_cast<yaml::ScalarNode>(Field.getValue());
lib/Transforms/Utils/VNCoercion.cpp 43 if (auto *CI = dyn_cast<Constant>(StoredVal))
57 if (auto *C = dyn_cast<Constant>(StoredVal))
91 if (auto *C = dyn_cast<ConstantExpr>(StoredVal))
137 if (auto *C = dyn_cast<Constant>(StoredVal))
231 auto *CI = dyn_cast<Constant>(StoredVal);
286 ConstantInt *SizeCst = dyn_cast<ConstantInt>(MI->getLength());
295 auto *CI = dyn_cast<ConstantInt>(cast<MemSetInst>(MI)->getValue());
308 Constant *Src = dyn_cast<Constant>(MTI->getSource());
312 GlobalVariable *GV = dyn_cast<GlobalVariable>(GetUnderlyingObject(Src, DL));
471 if (MemSetInst *MSI = dyn_cast<MemSetInst>(SrcInst)) {
531 if (auto *MSI = dyn_cast<MemSetInst>(SrcInst))
lib/Transforms/Utils/ValueMapper.cpp 364 if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) {
378 if (const auto *MDV = dyn_cast<MetadataAsValue>(V)) {
381 if (auto *LAM = dyn_cast<LocalAsMetadata>(MD)) {
411 Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V));
415 if (BlockAddress *BA = dyn_cast<BlockAddress>(C))
470 if (auto *GEPO = dyn_cast<GEPOperator>(C))
473 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
522 if (auto *CMD = dyn_cast<ConstantAsMetadata>(Op))
540 auto *CT = dyn_cast<DICompositeType>(&N);
576 if (auto *CMD = dyn_cast<ConstantAsMetadata>(Op))
790 if (auto *CMD = dyn_cast<ConstantAsMetadata>(MD)) {
865 if (PHINode *PN = dyn_cast<PHINode>(I)) {
916 if (auto *AI = dyn_cast<AllocaInst>(I))
918 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp 304 if (LoadInst *L = dyn_cast<LoadInst>(I))
306 if (StoreInst *S = dyn_cast<StoreInst>(I))
398 auto *GEPA = dyn_cast<GetElementPtrInst>(PtrA);
399 auto *GEPB = dyn_cast<GetElementPtrInst>(PtrB);
417 Instruction *OpA = dyn_cast<Instruction>(GTIA.getOperand());
418 Instruction *OpB = dyn_cast<Instruction>(GTIB.getOperand());
443 OpB = dyn_cast<Instruction>(OpB->getOperand(0));
467 OpA = dyn_cast<Instruction>(ValA);
492 if (auto *SelectA = dyn_cast<SelectInst>(PtrA)) {
493 if (auto *SelectB = dyn_cast<SelectInst>(PtrB)) {
514 Instruction *IM = dyn_cast<Instruction>(IW->getOperand(i));
574 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(PtrOperand))
660 auto *MemLoad = dyn_cast<LoadInst>(MemInstr);
661 auto *ChainLoad = dyn_cast<LoadInst>(ChainInstr);
728 if (const auto *Sel = dyn_cast<SelectInst>(ObjPtr)) {
749 if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
779 VectorType *VecTy = dyn_cast<VectorType>(Ty);
788 const ExtractElementInst *EEI = dyn_cast<ExtractElementInst>(U);
796 } else if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
826 VectorType *VecTy = dyn_cast<VectorType>(Ty);
834 const ExtractElementInst *EEI = dyn_cast<ExtractElementInst>(U);
992 VectorType *VecStoreTy = dyn_cast<VectorType>(StoreTy);
1142 VectorType *VecLoadTy = dyn_cast<VectorType>(LoadTy);
1223 if (Instruction *BitcastInst = dyn_cast<Instruction>(Bitcast))
1241 if (Instruction *BitcastInst = dyn_cast<Instruction>(Bitcast))
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp 315 auto *LatchBr = dyn_cast<BranchInst>(Latch->getTerminator());
322 auto *LatchCmp = dyn_cast<CmpInst>(LatchBr->getCondition());
362 if (auto *C = dyn_cast<Constant>(V))
433 auto *Br = dyn_cast<BranchInst>(BB->getTerminator());
581 if (auto *Phi = dyn_cast<PHINode>(&I)) {
669 auto *CI = dyn_cast<CallInst>(&I);
729 if (auto *ST = dyn_cast<StoreInst>(&I)) {
755 } else if (auto *LD = dyn_cast<LoadInst>(&I)) {
861 auto *Inst = dyn_cast<Instruction>(V);
884 if (auto *C = dyn_cast<Constant>(Operand))
890 auto *LI = dyn_cast<LoadInst>(&I);
904 auto *SI = dyn_cast<StoreInst>(&I);
956 LoadInst *LI = dyn_cast<LoadInst>(&I);
lib/Transforms/Vectorize/LoopVectorize.cpp 310 if (auto *LI = dyn_cast<LoadInst>(I))
917 if (Instruction *I = dyn_cast<Instruction>(V))
1155 auto *Trunc = dyn_cast<TruncInst>(I);
1445 Instruction *I = dyn_cast<Instruction>(V);
1659 Instruction *Instr = dyn_cast<Instruction>(V);
2201 if (auto *gep = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
2348 LoadInst *LI = dyn_cast<LoadInst>(Instr);
2349 StoreInst *SI = dyn_cast<StoreInst>(Instr);
2393 if (auto *gep = dyn_cast<GetElementPtrInst>(
2513 if (auto *II = dyn_cast<IntrinsicInst>(Cloned))
2721 if (auto *C = dyn_cast<ConstantInt>(SCEVCheck))
2813 if (auto *CX = dyn_cast<ConstantInt>(X))
2816 if (auto *CY = dyn_cast<ConstantInt>(Y))
2824 if (auto *CX = dyn_cast<ConstantInt>(X))
2827 if (auto *CY = dyn_cast<ConstantInt>(Y))
3270 if (auto *FPMO = dyn_cast<FPMathOperator>(CI))
3314 if (auto *ZI = dyn_cast<ZExtInst>(V))
3323 if (auto *BO = dyn_cast<BinaryOperator>(I)) {
3331 } else if (auto *CI = dyn_cast<ICmpInst>(I)) {
3335 } else if (auto *SI = dyn_cast<SelectInst>(I)) {
3339 } else if (auto *CI = dyn_cast<CastInst>(I)) {
3357 } else if (auto *SI = dyn_cast<ShuffleVectorInst>(I)) {
3369 } else if (auto *IE = dyn_cast<InsertElementInst>(I)) {
3375 } else if (auto *EE = dyn_cast<ExtractElementInst>(I)) {
3404 ZExtInst *Inst = dyn_cast<ZExtInst>(I);
3881 if (auto *Phi = dyn_cast<PHINode>(I))
3900 auto *I = dyn_cast<Instruction>(Worklist.pop_back_val());
4058 auto *CInt = dyn_cast<ConstantInt>(Divisor);
4165 if (auto *VecOp = dyn_cast<Instruction>(V))
4381 if (auto *Store = dyn_cast<StoreInst>(MemAccess))
4441 if (auto *Load = dyn_cast<LoadInst>(&I)) {
4443 } else if (auto *Store = dyn_cast<StoreInst>(&I)) {
4619 LoadInst *LI = dyn_cast<LoadInst>(I);
4620 StoreInst *SI = dyn_cast<StoreInst>(I);
4664 Instruction *I = dyn_cast<Instruction>(V);
4674 auto *Cmp = dyn_cast<Instruction>(Latch->getTerminator()->getOperand(0));
4755 auto *OP = dyn_cast<PHINode>(OV);
5090 if (auto *PN = dyn_cast<PHINode>(&I)) {
5098 if (auto *ST = dyn_cast<StoreInst>(&I))
5341 auto *Instr = dyn_cast<Instruction>(U);
5585 if (auto *J = dyn_cast<Instruction>(U.get()))
5627 if (auto *J = dyn_cast<Instruction>(U.get())) {
5704 auto *Gep = dyn_cast<GetElementPtrInst>(Ptr);
5929 CallInst *CI = dyn_cast<CallInst>(I);
6239 Instruction *Op0AsInstruction = dyn_cast<Instruction>(I->getOperand(0));
6529 auto *Cmp = dyn_cast<Instruction>(Latch->getTerminator()->getOperand(0));
6654 BranchInst *BI = dyn_cast<BranchInst>(Src->getTerminator());
6777 if (PHINode *Phi = dyn_cast<PHINode>(I)) {
6809 PHINode *Phi = dyn_cast<PHINode>(I);
6891 if (CallInst *CI = dyn_cast<CallInst>(I)) {
6902 if (CallInst *CI = dyn_cast<CallInst>(I)) {
6929 VPWidenRecipe *LastWidenRecipe = dyn_cast<VPWidenRecipe>(&VPBB->back());
7030 if (PHINode *Phi = dyn_cast<PHINode>(Instr)) {
7056 BranchInst *Branch = dyn_cast<BranchInst>(BB->getTerminator());
lib/Transforms/Vectorize/SLPVectorizer.cpp 182 Instruction *I0 = dyn_cast<Instruction>(VL[0]);
187 Instruction *I = dyn_cast<Instruction>(VL[i]);
218 if (auto *IC = dyn_cast<CmpInst>(I))
278 auto *Idx = dyn_cast<ConstantInt>(EI->getIndexOperand());
354 auto *I = dyn_cast<Instruction>(Op);
426 auto *CI = dyn_cast<ConstantInt>(E->getOperand(1));
467 if (StoreInst *SI = dyn_cast<StoreInst>(I))
469 if (LoadInst *LI = dyn_cast<LoadInst>(I))
476 if (LoadInst *LI = dyn_cast<LoadInst>(I))
478 if (StoreInst *SI = dyn_cast<StoreInst>(I))
480 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I))
1307 auto *I = dyn_cast<Instruction>(Op);
1769 if (auto *I = dyn_cast<Instruction>(TE->getOperand(OpIdx)[Lane]))
1775 if (auto *I = dyn_cast<Instruction>(U.get()))
2093 if (auto *I = dyn_cast<Instruction>(V))
2141 Instruction *UserInst = dyn_cast<Instruction>(U);
2190 if (StoreInst *SI = dyn_cast<StoreInst>(S.OpValue))
2235 auto *I = dyn_cast<Instruction>(V);
2321 Instruction *Term = dyn_cast<Instruction>(
2448 dyn_cast<SCEVConstant>(SE->getMinusSCEV(ScevN, Scev0));
2708 CallInst *CI2 = dyn_cast<CallInst>(V);
2811 auto *ST = dyn_cast<StructType>(T);
2853 LoadInst *LI = dyn_cast<LoadInst>(Vec);
2911 if (StoreInst *SI = dyn_cast<StoreInst>(VL[0]))
2913 else if (CmpInst *CI = dyn_cast<CmpInst>(VL[0]))
3119 ConstantInt *CInt = dyn_cast<ConstantInt>(I->getOperand(OpIdx));
3204 if (auto *FPMO = dyn_cast<FPMathOperator>(CI))
3365 Instruction *Inst = dyn_cast<Instruction>(TEPtr->Scalars[0]);
3522 if (StoreInst *SI = dyn_cast<StoreInst>(VL[0]))
3621 if (auto *Insrt = dyn_cast<InsertElementInst>(Vec)) {
3658 if (auto *SV = dyn_cast<ShuffleVectorInst>(V)) {
3677 if (StoreInst *SI = dyn_cast<StoreInst>(S.OpValue))
3705 if (auto *I = dyn_cast<Instruction>(V)) {
3732 if (StoreInst *SI = dyn_cast<StoreInst>(VL0))
3744 if (auto *I = dyn_cast<Instruction>(V)) {
3817 if (auto *I = dyn_cast<Instruction>(V)) {
3852 if (auto *I = dyn_cast<Instruction>(V)) {
3953 if (auto *I = dyn_cast<Instruction>(V))
3997 if (auto *I = dyn_cast<Instruction>(V))
4097 if (Instruction *I = dyn_cast<Instruction>(V))
4217 if (Instruction *I = dyn_cast<Instruction>(V))
4254 if (auto *I = dyn_cast<Instruction>(VectorRoot))
4300 if (auto *VecI = dyn_cast<Instruction>(Vec)) {
4319 if (auto *VecI = dyn_cast<Instruction>(Vec)) {
4320 if (PHINode *PH = dyn_cast<PHINode>(User)) {
4412 auto *Op0 = dyn_cast<Instruction>(I->getOperand(0));
4413 auto *Op1 = dyn_cast<Instruction>(I->getOperand(1));
4608 Instruction *I = dyn_cast<Instruction>(V);
4926 if (auto *Store = dyn_cast<StoreInst>(V))
4935 if (auto *I = dyn_cast<Instruction>(V))
4963 if (auto *J = dyn_cast<Instruction>(U.get()))
4996 auto *I = dyn_cast<Instruction>(V);
5061 auto *TreeRootIT = dyn_cast<IntegerType>(TreeRoot[0]->getType());
5352 auto *I = dyn_cast<Instruction>(V);
5471 if (auto *SI = dyn_cast<StoreInst>(&I)) {
5482 else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
5572 auto *I = dyn_cast<Instruction>(V);
5645 auto *Op0 = dyn_cast<Instruction>(I->getOperand(0));
5646 auto *Op1 = dyn_cast<Instruction>(I->getOperand(1));
5654 auto *A = dyn_cast<BinaryOperator>(Op0);
5655 auto *B = dyn_cast<BinaryOperator>(Op1);
5658 auto *B0 = dyn_cast<BinaryOperator>(B->getOperand(0));
5659 auto *B1 = dyn_cast<BinaryOperator>(B->getOperand(1));
5668 auto *A0 = dyn_cast<BinaryOperator>(A->getOperand(0));
5669 auto *A1 = dyn_cast<BinaryOperator>(A->getOperand(1));
5824 if (auto *I = dyn_cast<Instruction>(V))
6037 if (auto *SI = dyn_cast<SelectInst>(Op))
6061 if (auto *SI = dyn_cast<SelectInst>(Op)) {
6144 if (auto *Select = dyn_cast<SelectInst>(V)) {
6256 B = dyn_cast<Instruction>(ReductionData.getRHS());
6260 B = dyn_cast<Instruction>(ReductionData.getLHS());
6317 auto *I = dyn_cast<Instruction>(NextV);
6632 if (auto *CI = dyn_cast<ConstantInt>(LastInsertElem->getOperand(2))) {
6641 LastInsertElem = dyn_cast<InsertElementInst>(V);
6659 IV = dyn_cast<InsertValueInst>(V);
6761 auto *BI = dyn_cast<BinaryOperator>(Inst);
6762 auto *SI = dyn_cast<SelectInst>(Inst);
6775 Inst = dyn_cast<Instruction>(BI->getOperand(0));
6777 Inst = dyn_cast<Instruction>(BI->getOperand(1));
6800 if (auto *I = dyn_cast<Instruction>(Op))
6812 auto *I = dyn_cast<Instruction>(V);
6876 if (auto *LastInsertValue = dyn_cast<InsertValueInst>(I))
6878 else if (auto *LastInsertElem = dyn_cast<InsertElementInst>(I))
6880 else if (auto *CI = dyn_cast<CmpInst>(I))
6899 PHINode *P = dyn_cast<PHINode>(&I);
lib/Transforms/Vectorize/VPlan.cpp 51 if (const VPInstruction *Instr = dyn_cast<VPInstruction>(&V))
61 while (const VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
68 while (VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
76 while (const VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
83 while (VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
532 if (const VPBasicBlock *BasicBlock = dyn_cast<VPBasicBlock>(Block))
534 else if (const VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
581 if (const VPInstruction *PredI = dyn_cast<VPInstruction>(Pred)) {
596 if (const VPInstruction *CBI = dyn_cast<VPInstruction>(CBV)) {
629 if (auto *Inst = dyn_cast<Instruction>(V)) {
733 if (VPBasicBlock *VPBB = dyn_cast<VPBasicBlock>(Block)) {
756 } else if (VPRegionBlock *Region = dyn_cast<VPRegionBlock>(Block))
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp 133 Instruction *Inst = dyn_cast<Instruction>(Val);
203 if (auto *Br = dyn_cast<BranchInst>(Inst)) {
214 if (auto *Phi = dyn_cast<PHINode>(Inst)) {
lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp 60 else if (PHINode *Phi = dyn_cast<PHINode>(Inst)) {
lib/Transforms/Vectorize/VPlanVerifier.cpp 119 if (const auto *SubRegion = dyn_cast<VPRegionBlock>(VPB))
lib/XRay/FDRRecordProducer.cpp 180 if (auto BE = dyn_cast<BufferExtents>(R.get())) {
lib/XRay/InstrumentationMap.cpp 90 if (const auto *ELFObj = dyn_cast<object::ELF32LEObjectFile>(ObjFile))
92 else if (const auto *ELFObj = dyn_cast<object::ELF32BEObjectFile>(ObjFile))
94 else if (const auto *ELFObj = dyn_cast<object::ELF64LEObjectFile>(ObjFile))
96 else if (const auto *ELFObj = dyn_cast<object::ELF64BEObjectFile>(ObjFile))
tools/bugpoint/CrashDebugger.cpp 586 auto *BR = dyn_cast<BranchInst>(BB.getTerminator());
tools/bugpoint/ExtractFunction.cpp 67 if (BlockAddress *BA = dyn_cast<BlockAddress>(V)) {
254 ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
260 dyn_cast<ConstantStruct>(InitList->getOperand(i))) {
267 ConstantInt *CI = dyn_cast<ConstantInt>(CS->getOperand(0));
271 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
274 if (Function *F = dyn_cast<Function>(FP)) {
tools/clang/examples/AnnotateFunctions/AnnotateFunctions.cpp 33 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
tools/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp 37 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/include/clang/AST/ASTImporter.h 395 auto *FromD = dyn_cast<DeclT>(FromI->second);
tools/clang/include/clang/AST/ASTImporterSharedState.h 57 if (auto *ND = dyn_cast<NamedDecl>(D))
63 if (auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/include/clang/AST/ASTLambda.h 53 if (CXXConversionDecl *Conv = dyn_cast<CXXConversionDecl>(D))
55 if (FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(D))
64 dyn_cast<CXXMethodDecl>(DC));
tools/clang/include/clang/AST/ASTNodeTraverser.h 94 if (const auto *DC = dyn_cast<DeclContext>(D))
364 if (const auto *C = dyn_cast<CXXConstructorDecl>(D))
434 auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
541 if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))
tools/clang/include/clang/AST/Attr.h 243 if (const auto *FD = dyn_cast<FunctionDecl>(D))
tools/clang/include/clang/AST/Decl.h 2938 return dyn_cast<VarDecl>(chain().front());
tools/clang/include/clang/AST/DeclCXX.h 1442 if (const auto *RD = dyn_cast<CXXRecordDecl>(getDeclContext()))
1445 return dyn_cast<FunctionDecl>(getDeclContext());
3023 if (auto *AD = dyn_cast<NamespaceAliasDecl>(Namespace))
3192 dyn_cast<ConstructorUsingShadowDecl>(Target)),
tools/clang/include/clang/AST/DeclFriend.h 150 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
152 if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(ND))
154 if (const auto *CTD = dyn_cast<ClassTemplateDecl>(ND))
156 if (const auto *DD = dyn_cast<DeclaratorDecl>(ND)) {
tools/clang/include/clang/AST/DeclTemplate.h 3088 auto *TD = dyn_cast<TemplateDecl>(D);
tools/clang/include/clang/AST/Expr.h 3864 if (const ConditionalOperator *co = dyn_cast<ConditionalOperator>(this))
3870 if (const ConditionalOperator *co = dyn_cast<ConditionalOperator>(this))
3876 if (const ConditionalOperator *co = dyn_cast<ConditionalOperator>(this))
tools/clang/include/clang/AST/ExprCXX.h 1790 if (auto *E = dyn_cast<CXXTemporaryObjectExpr>(this))
3926 if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(this))
3935 if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(this))
3942 if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(this))
3949 if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(this))
tools/clang/include/clang/AST/JSONNodeDumper.h 355 const auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
tools/clang/include/clang/AST/RecursiveASTVisitor.h 552 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(S)) {
570 } else if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(S)) {
1378 if (const CXXRecordDecl* Cls = dyn_cast<CXXRecordDecl>(Child))
2027 if (CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(D)) {
2038 if (const auto *MD = dyn_cast<CXXMethodDecl>(D))
2370 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(sub))
tools/clang/include/clang/AST/Stmt.h 1620 while (const auto *CS2 = dyn_cast<CaseStmt>(CS->getSubStmt()))
1680 if (const auto *CS = dyn_cast<CaseStmt>(this))
1682 else if (const auto *DS = dyn_cast<DefaultStmt>(this))
1688 if (auto *CS = dyn_cast<CaseStmt>(this))
1690 else if (auto *DS = dyn_cast<DefaultStmt>(this))
tools/clang/include/clang/AST/StmtOpenMP.h 1091 if (auto *For = dyn_cast<ForStmt>(Body)) {
1100 if (auto *For = dyn_cast<ForStmt>(Body)) {
tools/clang/include/clang/AST/StmtVisitor.h 46 if (PTR(BinaryOperator) BinOp = dyn_cast<BinaryOperator>(S)) {
84 } else if (PTR(UnaryOperator) UnOp = dyn_cast<UnaryOperator>(S)) {
tools/clang/include/clang/AST/Type.h 5852 if (const auto *T = dyn_cast<ObjCInterfaceType>(ObjT))
6625 if (const auto *BT = dyn_cast<BuiltinType>(this))
6631 if (const auto *BT = dyn_cast<BuiltinType>(this))
6639 if (const auto *BT = dyn_cast<BuiltinType>(this))
6645 if (const auto *BT = dyn_cast<BuiltinType>(this))
6863 if (const auto *Ty = dyn_cast<T>(this))
6879 if (const auto *Ty = dyn_cast<T>(this))
6890 if (const auto *A = dyn_cast<AttributedType>(Ty))
6892 else if (const auto *E = dyn_cast<ElaboratedType>(Ty))
6894 else if (const auto *P = dyn_cast<ParenType>(Ty))
6896 else if (const auto *A = dyn_cast<AdjustedType>(Ty))
6898 else if (const auto *M = dyn_cast<MacroQualifiedType>(Ty))
6906 return dyn_cast<T>(Ty);
6911 if (const auto *arr = dyn_cast<ArrayType>(this))
6927 if (const auto *ty = dyn_cast<T>(this)) return ty;
6934 if (const auto *arr = dyn_cast<ArrayType>(this)) return arr;
tools/clang/include/clang/AST/TypeLoc.h 1367 if (auto *FPT = dyn_cast<FunctionProtoType>(getTypePtr())) {
tools/clang/include/clang/AST/VTableBuilder.h 156 auto *DtorDecl = dyn_cast<CXXDestructorDecl>(getFunctionDecl());
tools/clang/include/clang/ASTMatchers/ASTMatchers.h 2640 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
2659 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
2674 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
2692 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
2725 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
2743 if (const auto *RD = dyn_cast<CXXRecordDecl>(&Node))
3508 if (const UsingShadowDecl *UsingDecl = dyn_cast<UsingShadowDecl>(FoundDecl))
5185 if (const auto *E = dyn_cast<UnresolvedMemberExpr>(&Node))
5188 if (const auto *E = dyn_cast<CXXDependentScopeMemberExpr>(&Node))
6330 if (const auto *FD = dyn_cast<FunctionDecl>(&Node))
6332 else if (const auto *NSD = dyn_cast<NamespaceDecl>(&Node))
6618 if (const auto *CleanupsExpr = dyn_cast<ExprWithCleanups>(&Node))
6620 if (const auto *CtorExpr = dyn_cast<CXXConstructExpr>(E)) {
6623 dyn_cast<MaterializeTemporaryExpr>(CtorExpr->getArg(0))) {
tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h 781 if (const auto *S = dyn_cast<DeducedType>(&Node)) {
789 if (const auto *S = dyn_cast<TagType>(EffectiveType)) {
792 if (const auto *S = dyn_cast<InjectedClassNameType>(EffectiveType)) {
795 if (const auto *S = dyn_cast<TemplateTypeParmType>(EffectiveType)) {
798 if (const auto *S = dyn_cast<TypedefType>(EffectiveType)) {
801 if (const auto *S = dyn_cast<UnresolvedUsingType>(EffectiveType)) {
804 if (const auto *S = dyn_cast<ObjCObjectType>(EffectiveType)) {
816 if (const auto *S = dyn_cast<SubstTemplateTypeParmType>(EffectiveType)) {
823 if (const auto *S = dyn_cast<TemplateSpecializationType>(EffectiveType)) {
842 if (const auto *S = dyn_cast<ElaboratedType>(EffectiveType)) {
tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h 256 return dyn_cast<NamedDecl>(ACtx->getDecl());
308 if (const auto *P = dyn_cast<til::Project>(CapExpr))
310 if (const auto *P = dyn_cast<til::LiteralPtr>(CapExpr))
tools/clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h 708 if (const auto *SAP = dyn_cast<SApply>(E->record())) {
709 if (const auto *V = dyn_cast<Variable>(SAP->sfun())) {
tools/clang/include/clang/Analysis/AnyCall.h 107 if (const auto *ME = dyn_cast<ObjCMessageExpr>(E)) {
109 } else if (const auto *CE = dyn_cast<CallExpr>(E)) {
111 } else if (const auto *CXNE = dyn_cast<CXXNewExpr>(E)) {
113 } else if (const auto *CXDE = dyn_cast<CXXDeleteExpr>(E)) {
115 } else if (const auto *CXCE = dyn_cast<CXXConstructExpr>(E)) {
126 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
128 } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
139 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
141 } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
143 } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {
tools/clang/include/clang/Analysis/ProgramPoint.h 282 const T* getStmtAs() const { return dyn_cast<T>(getStmt()); }
tools/clang/include/clang/CodeGen/CGFunctionInfo.h 216 auto unpaddedStruct = dyn_cast<llvm::StructType>(unpaddedCoerceToType);
321 dyn_cast<llvm::StructType>(UnpaddedCoerceAndExpandType)) {
tools/clang/include/clang/Sema/Lookup.h 509 return dyn_cast<DeclClass>(getFoundDecl());
tools/clang/include/clang/Sema/Overload.h 1124 Info.ConstructorTmpl = dyn_cast<FunctionTemplateDecl>(D);
1127 Info.Constructor = dyn_cast<CXXConstructorDecl>(D);
tools/clang/include/clang/Sema/Sema.h 833 if (auto *FD = dyn_cast<FunctionDecl>(DC))
854 if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
2082 if (auto *DRE = dyn_cast<DeclRefExpr>(E.get()))
2084 if (auto *ME = dyn_cast<MemberExpr>(E.get()))
2087 if (auto *DSDRE = dyn_cast<DependentScopeDeclRefExpr>(E.get()))
2089 if (auto *DSME = dyn_cast<CXXDependentScopeMemberExpr>(E.get()))
10936 return IdentifyCUDATarget(dyn_cast<FunctionDecl>(CurContext));
11522 if (const ObjCCategoryDecl *CatD = dyn_cast<ObjCCategoryDecl>(DC))
tools/clang/include/clang/Sema/SemaInternal.h 66 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(ND))
69 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(ND))
tools/clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h 37 if (auto S = dyn_cast<SymbolRegionValue>(R->getSymbol()))
57 if (auto SR = dyn_cast<SymbolicRegion>(R)) {
93 if (auto V = dyn_cast<VarRegion>(R))
94 if (auto D = dyn_cast<ParmVarDecl>(V->getDecl()))
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h 248 if (const auto *FD = dyn_cast<FunctionDecl>(D))
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h 597 if (const auto *D = dyn_cast<FunctionDecl>(FD)) {
1229 if (const auto *RT = dyn_cast<RegionTy>(this))
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h 766 if (const Expr *Ex = dyn_cast<Expr>(S)) {
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h 113 if (const SymbolData *SD = dyn_cast<SymbolData>(Sym)) {
155 if (const SymbolCast *SC = dyn_cast<SymbolCast>(Sym)) {
168 if (const BinarySymExpr *BSE = dyn_cast<BinarySymExpr>(Sym)) {
170 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(BSE)) {
173 } else if (const IntSymExpr *ISE = dyn_cast<IntSymExpr>(BSE)) {
176 } else if (const SymSymExpr *SSM = dyn_cast<SymSymExpr>(BSE)) {
273 if (const SymbolCast *SC = dyn_cast<SymbolCast>(Sym))
276 if (const BinarySymExpr *BSE = dyn_cast<BinarySymExpr>(Sym)) {
277 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(BSE))
280 if (const IntSymExpr *ISE = dyn_cast<IntSymExpr>(BSE))
283 if (const SymSymExpr *SSE = dyn_cast<SymSymExpr>(BSE))
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h 384 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(BSE)) {
394 if (const IntSymExpr *ISE = dyn_cast<IntSymExpr>(BSE)) {
404 if (const SymSymExpr *SSM = dyn_cast<SymSymExpr>(BSE)) {
421 if (const SymbolData *SD = dyn_cast<SymbolData>(Sym)) {
429 if (const SymbolCast *SC = dyn_cast<SymbolCast>(Sym)) {
445 if (const BinarySymExpr *BSE = dyn_cast<BinarySymExpr>(Sym)) {
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h 614 return dyn_cast<REGION>(getRegion());
tools/clang/lib/ARCMigrate/ObjCMT.cpp 179 if (const ObjCCategoryImplDecl *CatImpl = dyn_cast<ObjCCategoryImplDecl>(D))
181 if (const ObjCImplementationDecl *Impl = dyn_cast<ObjCImplementationDecl>(D))
183 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
575 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(D)) {
633 else if (ObjCPropertyDecl *ClassProperty = dyn_cast<ObjCPropertyDecl>(R[0])) {
661 if (ObjCMethodDecl *ImpMD = dyn_cast<ObjCMethodDecl>(R[0]))
814 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(InitExpr))
1042 ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl);
1044 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CDecl))
1046 else if (ObjCImplDecl *ImpDecl = dyn_cast<ObjCImplDecl>(CDecl))
1067 while (const TypedefType *TD = dyn_cast<TypedefType>(T.getTypePtr()))
1092 const AvailabilityAttr *AA1 = dyn_cast<AvailabilityAttr>(At1);
1095 const AvailabilityAttr *AA2 = dyn_cast<AvailabilityAttr>(At2);
1313 ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl);
1315 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CDecl))
1317 else if (ObjCImplDecl *ImpDecl = dyn_cast<ObjCImplDecl>(CDecl))
1370 while (const TypedefType *TD = dyn_cast<TypedefType>(Ty.getTypePtr()))
1443 if (const FunctionDecl *FuncDecl = dyn_cast<FunctionDecl>(Decl)) {
1864 if (ObjCInterfaceDecl *CDecl = dyn_cast<ObjCInterfaceDecl>(*D))
1867 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(*D)) {
1871 else if (ObjCProtocolDecl *PDecl = dyn_cast<ObjCProtocolDecl>(*D)) {
1877 dyn_cast<ObjCImplementationDecl>(*D)) {
1882 else if (const EnumDecl *ED = dyn_cast<EnumDecl>(*D)) {
1889 const TypedefDecl *TD = dyn_cast<TypedefDecl>(*N);
1896 else if (const TypedefDecl *TD = dyn_cast<TypedefDecl>(*D)) {
1904 if (const EnumDecl *ED = dyn_cast<EnumDecl>(*N)) {
1907 if (const TypedefDecl *TDF = dyn_cast<TypedefDecl>(*N)) {
1923 else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*D)) {
1929 if (ObjCContainerDecl *CDecl = dyn_cast<ObjCContainerDecl>(*D)) {
1942 ImplD = dyn_cast<ObjCImplementationDecl>(*D)) {
2107 SequenceNode *SeqNode = dyn_cast<SequenceNode>(Root);
2113 MappingNode *MapNode = dyn_cast<MappingNode>(&*AI);
2131 ScalarNode *KeyString = dyn_cast<ScalarNode>((*KVI).getKey());
2137 ScalarNode *ValueString = dyn_cast<ScalarNode>((*KVI).getValue());
tools/clang/lib/ARCMigrate/TransARCAssign.cpp 48 DeclRefExpr *declRef = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts());
tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp 56 if (DeclRefExpr *DE = dyn_cast<DeclRefExpr>(instance)) {
169 if (DeclStmt *DclS = dyn_cast<DeclStmt>(child)) {
171 if (VarDecl *VD = dyn_cast<VarDecl>(DclS->getSingleDecl())) {
187 } else if (BinaryOperator *bop = dyn_cast<BinaryOperator>(child)) {
188 if (DeclRefExpr *dref = dyn_cast<DeclRefExpr>(bop->getLHS())) {
189 if (VarDecl *VD = dyn_cast<VarDecl>(dref->getDecl())) {
306 if (ReturnStmt *retS = dyn_cast<ReturnStmt>(*SI))
352 ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E);
375 ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(S);
379 if (DeclRefExpr *dref = dyn_cast<DeclRefExpr>(rec))
405 if (FullExpr *FE = dyn_cast<FullExpr>(S))
407 if (Expr *E = dyn_cast<Expr>(S))
tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp 52 ref = dyn_cast<DeclRefExpr>(castE->getSubExpr())) {
tools/clang/lib/ARCMigrate/TransGCAttrs.cpp 51 if (ObjCPropertyDecl *PropD = dyn_cast<ObjCPropertyDecl>(D)) {
54 } else if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
127 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
130 if (ObjCContainerDecl *ContD = dyn_cast<ObjCContainerDecl>(D))
133 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
147 if (ObjCContainerDecl *ContD = dyn_cast<ObjCContainerDecl>(D)) {
148 if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(ContD))
150 if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(ContD))
tools/clang/lib/ARCMigrate/TransGCCalls.cpp 46 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {
tools/clang/lib/ARCMigrate/TransProperties.cpp 292 if (ObjCIvarRefExpr *RE = dyn_cast<ObjCIvarRefExpr>(lhs)) {
tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp 197 if (ReturnStmt *RetS = dyn_cast<ReturnStmt>(nextStmt))
225 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) {
229 if (DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
231 if (VarDecl *VD = dyn_cast<VarDecl>(RefD))
294 if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E)) {
305 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
307 if (MemberExpr *ME = dyn_cast<MemberExpr>(E))
309 if (ObjCIvarRefExpr *IRE = dyn_cast<ObjCIvarRefExpr>(E))
345 if (StmtExpr *SE = dyn_cast<StmtExpr>(S)) {
379 if (FullExpr *FE = dyn_cast<FullExpr>(Rec))
401 if (PseudoObjectExpr *pseudoOp = dyn_cast<PseudoObjectExpr>(E))
404 if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E))
tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp 134 if (CallExpr *callE = dyn_cast<CallExpr>(inner)) {
160 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
229 if (CStyleCastExpr *CCE = dyn_cast<CStyleCastExpr>(E)) {
388 if (PseudoObjectExpr *pseudo = dyn_cast<PseudoObjectExpr>(subExpr)) {
393 if (ImplicitCastExpr *implCE = dyn_cast<ImplicitCastExpr>(subExpr)) {
408 if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E))
452 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
453 if (ImplicitParamDecl *IPD = dyn_cast<ImplicitParamDecl>(DRE->getDecl()))
tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp 52 DeclRefExpr *refE = dyn_cast<DeclRefExpr>(receiver->IgnoreParenCasts());
106 ObjCImplDecl *IMD = dyn_cast<ObjCImplDecl>(D->getDeclContext());
153 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E))
155 if (PseudoObjectExpr *PO = dyn_cast<PseudoObjectExpr>(E))
169 if (ObjCIvarRefExpr *IV = dyn_cast<ObjCIvarRefExpr>(LHS)) {
193 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm());
198 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParens());
tools/clang/lib/ARCMigrate/TransformActions.cpp 316 if (auto *E = dyn_cast<Expr>(S))
455 if (Expr *E = dyn_cast<Expr>(S)) {
tools/clang/lib/ARCMigrate/Transforms.cpp 76 if (const FullExpr *FE = dyn_cast<FullExpr>(E))
80 ME = dyn_cast<ObjCMessageExpr>(E->IgnoreParenCasts()))
85 callE = dyn_cast<CallExpr>(E->IgnoreParenCasts())) {
106 const ImplicitCastExpr *implCE = dyn_cast<ImplicitCastExpr>(E);
108 implCE = dyn_cast<ImplicitCastExpr>(implCE->getSubExpr());
172 ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E);
198 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
201 if (ConditionalOperator *condOp = dyn_cast<ConditionalOperator>(E))
289 while (auto *Label = dyn_cast<LabelStmt>(S))
291 if (auto *E = dyn_cast<Expr>(S))
293 if (auto *E = dyn_cast<Expr>(S))
tools/clang/lib/AST/APValue.cpp 606 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(BaseOrMember)) {
tools/clang/lib/AST/ASTContext.cpp 113 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
118 if (const auto *VD = dyn_cast<VarDecl>(D)) {
124 if (const auto *CRD = dyn_cast<CXXRecordDecl>(D)) {
129 if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
136 if (const auto *ED = dyn_cast<EnumDecl>(D)) {
140 if (const auto *TD = dyn_cast<TagDecl>(D)) {
176 } else if (const auto *TD = dyn_cast<TagDecl>(D)) {
299 if (const auto *FD = dyn_cast<FunctionDecl>(&D)) {
319 if (const auto *VD = dyn_cast<VarDecl>(&D)) {
328 if (const auto *CRD = dyn_cast<CXXRecordDecl>(&D)) {
335 if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(CRD)) {
354 if (const auto *ED = dyn_cast<EnumDecl>(&D)) {
448 if (const auto *IMD = dyn_cast<ObjCImplDecl>(DC)) {
554 const auto *OMD = dyn_cast<ObjCMethodDecl>(D);
561 getOverriddenMethods(dyn_cast<NamedDecl>(D), Overridden);
566 else if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {
575 else if (const auto *IC = dyn_cast<ObjCInterfaceDecl>(D)) {
582 else if (const auto *CD = dyn_cast<ObjCCategoryDecl>(D)) {
587 else if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
647 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(*P)) {
653 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) {
694 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(*P))
702 else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) {
1077 if (const auto *ID = dyn_cast<ImportDecl>(D)) {
1544 if (const auto *CXXMethod = dyn_cast<CXXMethodDecl>(D)) {
1550 const auto *Method = dyn_cast<ObjCMethodDecl>(D);
1627 } else if (const auto *VD = dyn_cast<ValueDecl>(D)) {
1654 if (const auto *VD = dyn_cast<VarDecl>(D)) {
1667 if (const auto *Field = dyn_cast<FieldDecl>(VD)) {
1737 if (const auto *CAT = dyn_cast<ConstantArrayType>(T))
2111 if (const auto *ET = dyn_cast<EnumType>(TT)) {
2371 if (const auto *OI = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
2387 } else if (const auto *OC = dyn_cast<ObjCCategoryDecl>(CDecl)) {
2391 } else if (const auto *OP = dyn_cast<ObjCProtocolDecl>(CDecl)) {
2423 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RD))
2436 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RD)) {
2645 if (const auto *ID = dyn_cast<ObjCInterfaceDecl>(ND->getDeclContext()))
2647 if (const auto *CD = dyn_cast<ObjCCategoryDecl>(ND->getDeclContext()))
2649 if (const auto *IMD = dyn_cast<ObjCImplDecl>(ND->getDeclContext()))
2818 if (const auto *FNPT = dyn_cast<FunctionNoProtoType>(T)) {
3975 if (const auto *Typedef = dyn_cast<TypedefNameDecl>(Decl))
3981 if (const auto *Record = dyn_cast<RecordDecl>(Decl)) {
3985 } else if (const auto *Enum = dyn_cast<EnumDecl>(Decl)) {
3988 } else if (const auto *Using = dyn_cast<UnresolvedUsingTypenameDecl>(Decl)) {
4439 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
4445 } else if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
4650 if (const auto *objT = dyn_cast<ObjCTypeParamType>(type.getTypePtr())) {
4657 dyn_cast<ObjCObjectPointerType>(type.getTypePtr())) {
4675 if (const auto *objT = dyn_cast<ObjCObjectType>(type.getTypePtr())){
5178 dyn_cast<ArrayType>(splitType.Ty->getUnqualifiedDesugaredType());
5202 if (const auto *CAT = dyn_cast<ConstantArrayType>(AT)) {
5207 if (const auto *IAT = dyn_cast<IncompleteArrayType>(AT)) {
5211 if (const auto *VAT = dyn_cast<VariableArrayType>(AT)) {
5239 if (auto *CAT1 = dyn_cast<ConstantArrayType>(AT1)) {
5240 auto *CAT2 = dyn_cast<ConstantArrayType>(AT2);
5393 if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(Template))
5567 const auto *ATy = dyn_cast<ArrayType>(split.Ty);
5575 if (const auto *CAT = dyn_cast<ConstantArrayType>(ATy))
5580 if (const auto *IAT = dyn_cast<IncompleteArrayType>(ATy))
5585 if (const auto *DSAT = dyn_cast<DependentSizedArrayType>(ATy))
5922 if (const auto *ET = dyn_cast<EnumType>(LHSC))
5924 if (const auto *ET = dyn_cast<EnumType>(RHSC))
6149 const auto *BT = dyn_cast<BuiltinType>(T);
6493 if (const auto *CID = dyn_cast<ObjCCategoryImplDecl>(Container)) {
6778 if (const auto *IVD = dyn_cast<ObjCIvarDecl>(FD)) {
6921 if (const auto *CAT = dyn_cast<ConstantArrayType>(AT))
6950 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(RDecl)) {
7004 if (const auto *FPT = dyn_cast<FunctionProtoType>(FT)) {
7149 const auto *CXXRec = dyn_cast<CXXRecordDecl>(RDecl);
7242 if (auto *base = dyn_cast<CXXRecordDecl>(dcl)) {
8650 const auto *lproto = dyn_cast<FunctionProtoType>(lbase);
8651 const auto *rproto = dyn_cast<FunctionProtoType>(rbase);
9765 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
9955 if (const auto *VD = dyn_cast<VarDecl>(D)) {
9964 } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
10026 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
10038 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
10090 if (const auto *DD = dyn_cast<DecompositionDecl>(VD))
tools/clang/lib/AST/ASTDiagnostic.cpp 35 if (const ElaboratedType *ET = dyn_cast<ElaboratedType>(Ty)) {
40 if (const ParenType *PT = dyn_cast<ParenType>(Ty)) {
45 if (const MacroQualifiedType *MDT = dyn_cast<MacroQualifiedType>(Ty)) {
51 dyn_cast<SubstTemplateTypeParmType>(Ty)) {
56 if (const AttributedType *AT = dyn_cast<AttributedType>(Ty)) {
61 if (const AdjustedType *AT = dyn_cast<AdjustedType>(Ty)) {
66 if (const AutoType *AT = dyn_cast<AutoType>(Ty)) {
75 if (const FunctionType *FT = dyn_cast<FunctionType>(Ty)) {
86 const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(FT);
110 dyn_cast<TemplateSpecializationType>(Ty)) {
438 } else if (TypeDecl *Type = dyn_cast<TypeDecl>(DC)) {
1083 dyn_cast<ClassTemplateSpecializationDecl>(RT->getDecl());
1808 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E))
tools/clang/lib/AST/ASTDumper.cpp 93 auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
268 const FullComment *FC = dyn_cast<FullComment>(this);
276 const FullComment *FC = dyn_cast<FullComment>(this);
tools/clang/lib/AST/ASTImporter.cpp 123 if (auto *FD = dyn_cast<FunctionDecl>(D))
125 if (auto *VD = dyn_cast<VarDecl>(D))
127 if (auto *TD = dyn_cast<TagDecl>(D))
1548 if (isa<RecordDecl>(D) && (FunDecl = dyn_cast<FunctionDecl>(OrigDC)) &&
1559 auto *RT = dyn_cast<RecordType>(LeafT);
1596 if (RecordDecl *FromRecord = dyn_cast<RecordDecl>(FromD)) {
1607 if (EnumDecl *FromEnum = dyn_cast<EnumDecl>(FromD)) {
1714 const auto *FromRD = dyn_cast<RecordDecl>(FromDC);
1833 auto *ToCXX = dyn_cast<CXXRecordDecl>(To);
1834 auto *FromCXX = dyn_cast<CXXRecordDecl>(From);
2002 auto *ToOriginRecord = dyn_cast<RecordDecl>(ToOrigin);
2028 if (auto *ToOriginEnum = dyn_cast<EnumDecl>(ToOrigin))
2193 if (auto *TU = dyn_cast<TranslationUnitDecl>(DC))
2204 if (auto *FoundNS = dyn_cast<NamespaceDecl>(FoundDecl)) {
2242 if (auto *TU = dyn_cast<TranslationUnitDecl>(DC))
2319 if (auto *FoundTypedef = dyn_cast<TypedefNameDecl>(FoundDecl)) {
2411 if (auto *FoundAlias = dyn_cast<TypeAliasTemplateDecl>(FoundDecl))
2516 if (auto *Typedef = dyn_cast<TypedefNameDecl>(FoundDecl)) {
2521 if (auto *FoundEnum = dyn_cast<EnumDecl>(FoundDecl)) {
2574 if (auto *DCXX = dyn_cast<CXXRecordDecl>(D)) {
2620 if (auto *Typedef = dyn_cast<TypedefNameDecl>(Found)) {
2625 if (auto *FoundRecord = dyn_cast<RecordDecl>(Found)) {
2648 if (const auto *DCXX = dyn_cast<CXXRecordDecl>(D)) {
2649 auto *FoundCXX = dyn_cast<CXXRecordDecl>(FoundDef);
2684 if (auto *DCXX = dyn_cast<CXXRecordDecl>(D)) {
2709 D2CXX, dyn_cast<CXXRecordDecl>(DC));
2742 auto *Record = dyn_cast<CXXRecordDecl>(Found);
2830 if (auto *FoundEnumConstant = dyn_cast<EnumConstantDecl>(FoundDecl)) {
3046 if (auto *FoundFunction = dyn_cast<FunctionDecl>(FoundDecl)) {
3157 if (auto *FromConstructor = dyn_cast<CXXConstructorDecl>(D)) {
3173 } else if (CXXDestructorDecl *FromDtor = dyn_cast<CXXDestructorDecl>(D)) {
3196 dyn_cast<CXXConversionDecl>(D)) {
3211 } else if (auto *Method = dyn_cast<CXXMethodDecl>(D)) {
3282 if (auto *FromConstructor = dyn_cast<CXXConstructorDecl>(D)) {
3329 if (auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D))
3374 if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecl)) {
3459 if (auto *FoundField = dyn_cast<IndirectFieldDecl>(FoundDecls[I])) {
3602 if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecl)) {
3675 if (auto *FoundVar = dyn_cast<VarDecl>(FoundDecl)) {
3890 if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {
4200 if ((MergeWithProtocol = dyn_cast<ObjCProtocolDecl>(FoundDecl)))
4625 if ((MergeWithIface = dyn_cast<ObjCInterfaceDecl>(FoundDecl)))
4797 if (auto *FoundProp = dyn_cast<ObjCPropertyDecl>(FoundDecl)) {
5060 auto *FoundTemplate = dyn_cast<ClassTemplateDecl>(Found);
5172 dyn_cast<ClassTemplatePartialSpecializationDecl>(D);
5352 if (VarTemplateDecl *FoundTemplate = dyn_cast<VarTemplateDecl>(Found)) {
5483 if (auto *FromPartial = dyn_cast<PartVarSpecDecl>(D)) {
5582 if (auto *FoundTemplate = dyn_cast<FunctionTemplateDecl>(FoundDecl)) {
7490 if (const auto *OCE = dyn_cast<CXXOperatorCallExpr>(E)) {
7802 auto *Owner = dyn_cast<RecordDecl>(F->getDeclContext());
8069 if (auto *ToRecord = dyn_cast<RecordDecl>(ToDC)) {
8080 } else if (auto *ToEnum = dyn_cast<EnumDecl>(ToDC)) {
8091 } else if (auto *ToClass = dyn_cast<ObjCInterfaceDecl>(ToDC)) {
8102 } else if (auto *ToProto = dyn_cast<ObjCProtocolDecl>(ToDC)) {
8140 if (auto *ToE = dyn_cast<Expr>(*ToSOrErr)) {
8591 if (auto *ToRecord = dyn_cast<RecordDecl>(To)) {
8599 if (auto *ToEnum = dyn_cast<EnumDecl>(To)) {
8606 if (auto *ToIFace = dyn_cast<ObjCInterfaceDecl>(To)) {
8614 if (auto *ToProto = dyn_cast<ObjCProtocolDecl>(To)) {
8742 if (auto *ID = dyn_cast<ObjCInterfaceDecl>(D)) {
8746 else if (auto *PD = dyn_cast<ObjCProtocolDecl>(D)) {
8750 else if (auto *TD = dyn_cast<TagDecl>(D)) {
tools/clang/lib/AST/ASTStructuralEquivalence.cpp 164 if (auto *DE1 = dyn_cast<DependentScopeDeclRefExpr>(E1)) {
165 auto *DE2 = dyn_cast<DependentScopeDeclRefExpr>(E2);
173 } else if (auto CastE1 = dyn_cast<ImplicitCastExpr>(E1)) {
174 auto *CastE2 = dyn_cast<ImplicitCastExpr>(E2);
1056 if (auto *Constructor1 = dyn_cast<CXXConstructorDecl>(Method1)) {
1063 if (auto *Conversion1 = dyn_cast<CXXConversionDecl>(Method1)) {
1131 const auto *Spec1 = dyn_cast<ClassTemplateSpecializationDecl>(D1);
1132 const auto *Spec2 = dyn_cast<ClassTemplateSpecializationDecl>(D2);
1175 if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {
1176 if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {
1621 const auto *Owner = dyn_cast<RecordDecl>(Anon->getDeclContext());
1627 const auto *F = dyn_cast<FieldDecl>(D);
1751 if (auto *Record1 = dyn_cast<RecordDecl>(D1)) {
1752 if (auto *Record2 = dyn_cast<RecordDecl>(D2)) {
1767 } else if (auto *Enum1 = dyn_cast<EnumDecl>(D1)) {
1768 if (auto *Enum2 = dyn_cast<EnumDecl>(D2)) {
1783 } else if (const auto *Typedef1 = dyn_cast<TypedefNameDecl>(D1)) {
1784 if (const auto *Typedef2 = dyn_cast<TypedefNameDecl>(D2)) {
1794 } else if (auto *ClassTemplate1 = dyn_cast<ClassTemplateDecl>(D1)) {
1795 if (auto *ClassTemplate2 = dyn_cast<ClassTemplateDecl>(D2)) {
1803 } else if (auto *FunctionTemplate1 = dyn_cast<FunctionTemplateDecl>(D1)) {
1804 if (auto *FunctionTemplate2 = dyn_cast<FunctionTemplateDecl>(D2)) {
1812 } else if (auto *ConceptDecl1 = dyn_cast<ConceptDecl>(D1)) {
1813 if (auto *ConceptDecl2 = dyn_cast<ConceptDecl>(D2)) {
1820 } else if (auto *TTP1 = dyn_cast<TemplateTypeParmDecl>(D1)) {
1821 if (auto *TTP2 = dyn_cast<TemplateTypeParmDecl>(D2)) {
1828 } else if (auto *NTTP1 = dyn_cast<NonTypeTemplateParmDecl>(D1)) {
1829 if (auto *NTTP2 = dyn_cast<NonTypeTemplateParmDecl>(D2)) {
1836 } else if (auto *TTP1 = dyn_cast<TemplateTemplateParmDecl>(D1)) {
1837 if (auto *TTP2 = dyn_cast<TemplateTemplateParmDecl>(D2)) {
1844 } else if (auto *MD1 = dyn_cast<CXXMethodDecl>(D1)) {
1845 if (auto *MD2 = dyn_cast<CXXMethodDecl>(D2)) {
1852 } else if (FunctionDecl *FD1 = dyn_cast<FunctionDecl>(D1)) {
1853 if (FunctionDecl *FD2 = dyn_cast<FunctionDecl>(D2)) {
1869 } else if (FriendDecl *FrD1 = dyn_cast<FriendDecl>(D1)) {
1870 if (FriendDecl *FrD2 = dyn_cast<FriendDecl>(D2)) {
tools/clang/lib/AST/Comment.cpp 121 if (const TextComment *TC = dyn_cast<TextComment>(*I)) {
302 if (const auto *VD = dyn_cast<DeclaratorDecl>(CommentDecl))
304 else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(CommentDecl))
386 dyn_cast<TemplateTemplateParmDecl>(Param))
tools/clang/lib/AST/CommentSema.cpp 684 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
732 ParamCommandComment *PCC = dyn_cast<ParamCommandComment>(*I);
819 dyn_cast<FunctionDecl>(ThisDeclInfo->CurrentDecl))
822 dyn_cast<FunctionTemplateDecl>(ThisDeclInfo->CurrentDecl))
825 dyn_cast<ObjCMethodDecl>(ThisDeclInfo->CurrentDecl))
828 dyn_cast<TypedefNameDecl>(ThisDeclInfo->CurrentDecl)) {
866 if (const auto *VD = dyn_cast<DeclaratorDecl>(ThisDeclInfo->CurrentDecl))
869 dyn_cast<ObjCPropertyDecl>(ThisDeclInfo->CurrentDecl))
1070 dyn_cast<TemplateTemplateParmDecl>(Param)) {
1102 dyn_cast<TemplateTemplateParmDecl>(Param))
tools/clang/lib/AST/ComparisonCategories.cpp 74 StdNS = dyn_cast<NamespaceDecl>(Lookup.front());
85 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Lookup.front()))
tools/clang/lib/AST/Decl.cpp 261 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) {
536 const auto *FD = dyn_cast<FunctionDecl>(D);
564 if (const auto *SD = dyn_cast<LinkageSpecDecl>(D.getDeclContext()))
614 if (auto *TD = dyn_cast<TemplateDecl>(D))
617 if (auto *VD = dyn_cast<VarDecl>(D))
619 if (auto *FD = dyn_cast<FunctionDecl>(D))
644 if (const auto *Var = dyn_cast<VarDecl>(D)) {
677 } else if (const auto *IFD = dyn_cast<IndirectFieldDecl>(D)) {
688 const auto *Var = dyn_cast<VarDecl>(D);
689 const auto *Func = dyn_cast<FunctionDecl>(D);
719 const auto *ND = dyn_cast<NamespaceDecl>(DC);
760 if (const auto *Var = dyn_cast<VarDecl>(D)) {
801 if (const auto *spec = dyn_cast<VarTemplateSpecializationDecl>(Var)) {
806 } else if (const auto *Function = dyn_cast<FunctionDecl>(D)) {
847 } else if (const auto *Tag = dyn_cast<TagDecl>(D)) {
855 if (const auto *spec = dyn_cast<ClassTemplateSpecializationDecl>(Tag)) {
869 } else if (const auto *temp = dyn_cast<TemplateDecl>(D)) {
888 } else if (auto *TD = dyn_cast<TypedefNameDecl>(D)) {
966 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
989 } else if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
990 if (const auto *spec = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
1005 } else if (const auto *VD = dyn_cast<VarDecl>(D)) {
1006 if (const auto *spec = dyn_cast<VarTemplateSpecializationDecl>(VD))
1025 } else if (const auto *temp = dyn_cast<TemplateDecl>(D)) {
1034 if (const auto *redeclTemp = dyn_cast<RedeclarableTemplateDecl>(temp)) {
1109 if (const auto *RD = dyn_cast<CXXRecordDecl>(ND)) {
1118 if (const auto *spec = dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
1138 if (const auto *Var = dyn_cast<VarDecl>(ND)) {
1145 if (const auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(Var))
1152 if (const auto *fn = dyn_cast<FunctionDecl>(ND)) {
1170 if (const auto *TD = dyn_cast<TemplateDecl>(ND))
1187 Owner = dyn_cast<NamedDecl>(DC);
1190 dyn_cast<NamedDecl>(ContextDecl->getDeclContext()->getRedeclContext());
1201 auto *VD = dyn_cast<VarDecl>(Owner);
1217 if (const auto *Function = dyn_cast<FunctionDecl>(D)) {
1240 if (const auto *Var = dyn_cast<VarDecl>(D)) {
1276 if (const auto *BD = dyn_cast<BlockDecl>(OuterD)) {
1298 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
1527 if (auto *ND = dyn_cast<NamedDecl>(this))
1530 auto *NSD = dyn_cast<NamespaceDecl>(this);
1585 if (auto *MD = dyn_cast<ObjCMethodDecl>(this))
1588 if (auto *PD = dyn_cast<ObjCPropertyDecl>(this)) {
1608 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) {
1612 } else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {
1622 } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) {
1627 } else if (const auto *FD = dyn_cast<FunctionDecl>(DC)) {
1630 FT = dyn_cast<FunctionProtoType>(FD->getType()->castAs<FunctionType>());
1648 } else if (const auto *ED = dyn_cast<EnumDecl>(DC)) {
1721 if (auto *UD = dyn_cast<UsingDecl>(this)) {
1727 if (auto *UUVD = dyn_cast<UnresolvedUsingValueDecl>(this)) {
1773 while (auto *UD = dyn_cast<UsingShadowDecl>(ND))
1776 if (auto *AD = dyn_cast<ObjCCompatibleAliasDecl>(ND))
1779 if (auto *AD = dyn_cast<NamespaceAliasDecl>(ND))
2132 if (auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(this)) {
2212 if (auto *P = dyn_cast<ParmVarDecl>(this))
2484 if (auto *VDTemplSpec = dyn_cast<VarTemplateSpecializationDecl>(VD)) {
2535 if (const auto *Spec = dyn_cast<VarTemplateSpecializationDecl>(this))
2549 if (const auto *Spec = dyn_cast<VarTemplateSpecializationDecl>(this))
2556 if (const auto *Spec = dyn_cast<VarTemplateSpecializationDecl>(this))
2625 dyn_cast<VarTemplateSpecializationDecl>(this)) {
2868 if (auto *Parent = dyn_cast<CXXRecordDecl>(getDeclContext()))
2880 dyn_cast<TranslationUnitDecl>(getDeclContext()->getRedeclContext());
2888 dyn_cast<TranslationUnitDecl>(getDeclContext()->getRedeclContext());
3034 if (const auto *Method = dyn_cast<CXXMethodDecl>(this))
3135 dyn_cast<LinkageSpecDecl>(getFirstDecl()->getDeclContext());
3551 dyn_cast<CXXMethodDecl>(this))) {
4078 if (auto *D = dyn_cast<CXXRecordDecl>(this)) {
4111 if (const auto *CXXRD = dyn_cast<CXXRecordDecl>(this))
4333 if (auto RD = dyn_cast<CXXRecordDecl>(this))
4400 const auto *CXXRD = dyn_cast<CXXRecordDecl>(this);
tools/clang/lib/AST/DeclBase.cpp 148 if (auto *DD = dyn_cast<DecompositionDecl>(this)) {
202 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(this))
204 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(this))
206 if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(this))
212 if (const auto *Var = dyn_cast<VarDecl>(this))
219 if (auto *FD = dyn_cast<FunctionDecl>(this))
221 if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(this))
231 if (auto *FD = dyn_cast<FunctionDecl>(this))
233 else if (auto *RD = dyn_cast<CXXRecordDecl>(this))
235 else if (auto *VD = dyn_cast<VarDecl>(this))
237 else if (auto *AD = dyn_cast<TypeAliasDecl>(this))
248 if (auto *AsDC = dyn_cast<DeclContext>(this))
349 if (const auto *ND = dyn_cast<NamespaceDecl>(DC))
363 if (auto *TUD = dyn_cast<TranslationUnitDecl>(this))
437 if (auto *ID = dyn_cast<ObjCInterfaceDecl>(this)) {
439 } else if (auto *PD = dyn_cast<ObjCProtocolDecl>(this)) {
441 } else if (auto *TD = dyn_cast<TagDecl>(this)) {
449 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) {
577 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(this))
585 if (const auto *Deprecated = dyn_cast<DeprecatedAttr>(A)) {
596 if (const auto *Unavailable = dyn_cast<UnavailableAttr>(A)) {
602 if (const auto *Availability = dyn_cast<AvailabilityAttr>(A)) {
630 if (const auto *Availability = dyn_cast<AvailabilityAttr>(A)) {
644 if (const auto *Var = dyn_cast<VarDecl>(this)) {
652 } else if (const auto *FD = dyn_cast<FunctionDecl>(this)) {
679 if (const auto *Availability = dyn_cast<AvailabilityAttr>(A)) {
899 if (const auto *FD = dyn_cast<FunctionDecl>(this)) {
954 if (const auto *D = dyn_cast<ValueDecl>(this))
956 else if (const auto *D = dyn_cast<TypedefNameDecl>(this))
980 } else if (auto *FD = dyn_cast<FunctionDecl>(D))
982 else if (auto *MD = dyn_cast<ObjCMethodDecl>(D))
984 else if (auto *BD = dyn_cast<BlockDecl>(D))
986 else if (auto *CD = dyn_cast<CapturedDecl>(D))
1096 if (const auto *Record = dyn_cast<CXXRecordDecl>(this)) {
1104 if (const auto *Function = dyn_cast<FunctionDecl>(this)) {
1190 if (auto *OID = dyn_cast<ObjCInterfaceDecl>(this))
1196 if (auto *OPD = dyn_cast<ObjCProtocolDecl>(this))
1217 if (const auto *TagTy = dyn_cast<TagType>(Tag->getTypeForDecl())) {
1307 if (const auto *RD = dyn_cast<RecordDecl>(this))
1434 if (auto *FD = dyn_cast<FunctionDecl>(D))
1510 if (auto *Record = dyn_cast<CXXRecordDecl>(this))
1516 if (auto *Import = dyn_cast<ImportDecl>(D))
1524 if (auto *ND = dyn_cast<NamedDecl>(D))
1532 if (auto *ND = dyn_cast<NamedDecl>(D))
1590 if (auto *ND = dyn_cast<NamedDecl>(D))
1600 if (auto *InnerCtx = dyn_cast<DeclContext>(D))
1738 if (auto *ND = dyn_cast<NamedDecl>(D))
1790 const auto *NS = dyn_cast<NamespaceDecl>(O);
tools/clang/lib/AST/DeclCXX.cpp 683 auto *FunTmpl = dyn_cast<FunctionTemplateDecl>(D);
689 if (auto *ND = dyn_cast<NamedDecl>(DUnderlying)) {
691 if (auto *UnderlyingFunTmpl = dyn_cast<FunctionTemplateDecl>(DUnderlying))
695 if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
739 if (const auto *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
786 if (const auto *Constructor = dyn_cast<CXXConstructorDecl>(DUnderlying)) {
798 if (const auto *DD = dyn_cast<CXXDestructorDecl>(D)) {
816 if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
830 if (auto *Conversion = dyn_cast<CXXConversionDecl>(D)) {
909 if (const auto *Field = dyn_cast<FieldDecl>(D)) {
1304 if (auto *Shadow = dyn_cast<UsingShadowDecl>(D)) {
1312 if (const auto *Using = dyn_cast<UsingDecl>(D)) {
1332 if (const auto *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
1365 if (const auto *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
1426 if (const auto *CallOpTmpl = dyn_cast<FunctionTemplateDecl>(CallOp))
1441 if (const auto *InvokerTemplate = dyn_cast<FunctionTemplateDecl>(InvokerFun))
1696 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(this))
1707 if (auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(this)) {
1730 if (auto *TD = dyn_cast<ClassTemplateSpecializationDecl>(this)) {
1775 return R.empty() ? nullptr : dyn_cast<CXXDestructorDecl>(R.front());
2008 auto *MD = dyn_cast<CXXMethodDecl>(ND);
2110 if (const auto *DRE = dyn_cast<DeclRefExpr>(Base)) {
2111 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
2122 if (const auto *ME = dyn_cast<MemberExpr>(Base)) {
2129 if (auto *BO = dyn_cast<BinaryOperator>(Base)) {
2208 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
2492 if (const auto *Construct = dyn_cast<CXXConstructExpr>(E))
2823 dyn_cast<UsingShadowDecl>(Shadow->UsingOrNextShadow))
2868 dyn_cast<UsingShadowDecl>(S->UsingOrNextShadow));
3008 auto *DRE = dyn_cast<DeclRefExpr>(B->IgnoreImplicit());
3012 auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
tools/clang/lib/AST/DeclObjC.cpp 83 if (auto *ivar = dyn_cast<ObjCIvarDecl>(*Ivar))
95 if (const auto *Proto = dyn_cast<ObjCProtocolDecl>(this)) {
111 auto *MD = dyn_cast<ObjCMethodDecl>(*Meth);
129 auto *MD = dyn_cast<ObjCMethodDecl>(*Meth);
134 if (const auto *ID = dyn_cast<ObjCInterfaceDecl>(this)) {
168 if (const auto *PD = dyn_cast<ObjCProtocolDecl>(this))
181 if (const auto *Proto = dyn_cast<ObjCProtocolDecl>(DC)) {
189 if (auto *IDecl = dyn_cast<ObjCInterfaceDecl>(DC)) {
201 if (auto *PD = dyn_cast<ObjCPropertyDecl>(*I)) {
239 if (const auto *Proto = dyn_cast<ObjCProtocolDecl>(this)) {
247 if (const auto *ClassDecl = dyn_cast<ObjCInterfaceDecl>(this)) {
832 if (const auto *PD = dyn_cast<const ObjCProtocolDecl>(getDeclContext()))
834 if (const auto *ID = dyn_cast<const ObjCInterfaceDecl>(getDeclContext()))
916 if (auto *IFD = dyn_cast<ObjCInterfaceDecl>(CtxD)) {
921 } else if (auto *CD = dyn_cast<ObjCCategoryDecl>(CtxD)) {
926 } else if (auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
931 } else if (auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
956 if (auto *ImplD = dyn_cast<ObjCImplementationDecl>(CtxD)) {
961 } else if (auto *CImplD = dyn_cast<ObjCCategoryImplDecl>(CtxD)) {
1144 if (auto *ID = dyn_cast<ObjCInterfaceDecl>(getDeclContext()))
1146 if (auto *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext()))
1148 if (auto *IMD = dyn_cast<ObjCImplDecl>(getDeclContext()))
1186 if (const auto *Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1218 if (const auto *Protocol = dyn_cast<ObjCProtocolDecl>(Container)){
1223 if (const auto *Interface = dyn_cast<ObjCInterfaceDecl>(Container)) {
1248 dyn_cast<ObjCProtocolDecl>(Method->getDeclContext())) {
1252 dyn_cast<ObjCImplDecl>(Method->getDeclContext())) {
1265 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) {
1341 if (const auto *Category = dyn_cast<ObjCCategoryDecl>(Container)) {
1347 ClassDecl = dyn_cast<ObjCInterfaceDecl>(Container);
1769 auto *ID = dyn_cast<ObjCInterfaceDecl>(DC);
1771 if (auto *IM = dyn_cast<ObjCImplementationDecl>(DC))
tools/clang/lib/AST/DeclPrinter.cpp 171 if (TypedefNameDecl* TDD = dyn_cast<TypedefNameDecl>(D))
173 if (ValueDecl* VD = dyn_cast<ValueDecl>(D))
187 TagDecl* TD = dyn_cast<TagDecl>(*Begin);
325 if (ExprWithCleanups *Tmp = dyn_cast<ExprWithCleanups>(Init))
333 if (ParenListExpr *ParenList = dyn_cast<ParenListExpr>(Init)) {
337 dyn_cast<CXXConstructExpr>(Init)) {
389 if (auto FD = dyn_cast<FunctionDecl>(*D))
447 else if (auto FD = dyn_cast<FunctionDecl>(*D)) {
452 } else if (auto TD = dyn_cast<FunctionTemplateDecl>(*D)) {
597 CXXConstructorDecl *CDecl = dyn_cast<CXXConstructorDecl>(D);
598 CXXConversionDecl *ConversionDecl = dyn_cast<CXXConversionDecl>(D);
599 CXXDeductionGuideDecl *GuideDecl = dyn_cast<CXXDeductionGuideDecl>(D);
654 FT = dyn_cast<FunctionProtoType>(AFT);
785 dyn_cast<FunctionDecl>(D->getFriendDecl())) {
790 dyn_cast<FunctionTemplateDecl>(D->getFriendDecl())) {
795 dyn_cast<ClassTemplateDecl>(D->getFriendDecl())) {
871 dyn_cast<CXXConstructExpr>(Init->IgnoreImplicit())) {
960 if (auto S = dyn_cast<ClassTemplatePartialSpecializationDecl>(D))
962 else if (auto S = dyn_cast<ClassTemplateSpecializationDecl>(D))
1046 if (auto TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
1064 } else if (auto NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
1075 } else if (auto TTPD = dyn_cast<TemplateTemplateParmDecl>(Param)) {
1102 if (auto TD = dyn_cast<TemplateTemplateParmDecl>(T)) {
1110 if (auto E = dyn_cast<DeclRefExpr>(A.getAsExpr()))
1111 if (auto N = dyn_cast<NonTypeTemplateParmDecl>(E->getDecl())) {
1128 dyn_cast<TemplateTemplateParmDecl>(D)) {
1135 else if (const auto *Concept = dyn_cast<ConceptDecl>(D)) {
1581 dyn_cast<ConstructorUsingShadowDecl>(Shadow)) {
tools/clang/lib/AST/DeclTemplate.cpp 59 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P))
63 if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(P))
94 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P))
103 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(P)) {
106 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) {
123 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(FirstParm))
125 else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(FirstParm))
136 if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(P))
792 const auto *PS = dyn_cast<ClassTemplatePartialSpecializationDecl>(this);
1128 const auto *PS = dyn_cast<VarTemplatePartialSpecializationDecl>(this);
tools/clang/lib/AST/Expr.cpp 43 if (auto *BO = dyn_cast<BinaryOperator>(E)) {
51 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E)) {
83 if (const CastExpr *CE = dyn_cast<CastExpr>(E)) {
98 } else if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
101 if (FieldDecl *Field = dyn_cast<FieldDecl>(ME->getMemberDecl())) {
109 } else if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
142 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
155 if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E))
158 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
184 if (const ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E))
191 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(E))
424 if (VarDecl *Var = dyn_cast<VarDecl>(D)) {
674 if (const NamedDecl *ND = dyn_cast<NamedDecl>(CurrentDecl)) {
681 if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(ND))
683 else if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(ND))
706 if (auto *DCBlock = dyn_cast<BlockDecl>(DC))
709 else if (auto *DCDecl = dyn_cast<Decl>(DC))
713 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurrentDecl)) {
721 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
738 FT = dyn_cast<FunctionProtoType>(AFT);
773 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
791 = dyn_cast<ClassTemplateSpecializationDecl>(Ctx);
858 if (const CapturedDecl *CD = dyn_cast<CapturedDecl>(CurrentDecl)) {
868 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(CurrentDecl)) {
880 dyn_cast<ObjCCategoryImplDecl>(MD->getDeclContext()))
1444 = dyn_cast<SubstNonTypeTemplateParmExpr>(CEE)) {
1449 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(CEE)) {
1452 } else if (UnaryOperator *UO = dyn_cast<UnaryOperator>(CEE)) {
1456 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE))
1458 if (MemberExpr *ME = dyn_cast<MemberExpr>(CEE))
1460 if (auto *BE = dyn_cast<BlockExpr>(CEE))
1472 const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(getCallee());
1476 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(ICE->getSubExpr());
1480 const FunctionDecl *FDecl = dyn_cast<FunctionDecl>(DRE->getDecl());
1621 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
1623 else if (const auto *ME = dyn_cast<MemberExpr>(E))
1893 if (auto *Materialize = dyn_cast<MaterializeTemporaryExpr>(E))
1897 if (auto *Binder = dyn_cast<CXXBindTemporaryExpr>(E))
1919 if (auto *MCE = dyn_cast<CXXMemberCallExpr>(SubExpr))
1925 } while ((E = dyn_cast<ImplicitCastExpr>(SubExpr)));
1933 for (const CastExpr *E = this; E; E = dyn_cast<ImplicitCastExpr>(SubExpr)) {
1940 if (auto *MCE = dyn_cast<CXXMemberCallExpr>(SubExpr))
2316 const IntegerLiteral *Lit = dyn_cast<IntegerLiteral>(getInit(0)->IgnoreImplicit());
2457 dyn_cast<IntegerLiteral>(BO->getRHS()->IgnoreParens()))
2650 if (const Expr *E = dyn_cast<Expr>(CS->body_back()))
2652 if (const LabelStmt *Label = dyn_cast<LabelStmt>(CS->body_back()))
2653 if (const Expr *E = dyn_cast<Expr>(Label->getSubStmt()))
2673 dyn_cast<DeclRefExpr>(CE->getSubExpr()->IgnoreParens());
2691 dyn_cast<CXXFunctionalCastExpr>(this)) {
2756 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
2790 if (const MemberExpr *mem = dyn_cast<MemberExpr>(expr)) {
2795 if (const BinaryOperator *op = dyn_cast<BinaryOperator>(expr)) {
2807 if (auto *ICE = dyn_cast<ImplicitCastExpr>(E))
2810 if (auto *FE = dyn_cast<FullExpr>(E))
2824 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
2827 if (auto *NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E))
2834 if (auto *CE = dyn_cast<CastExpr>(E))
2837 if (auto *FE = dyn_cast<FullExpr>(E))
2840 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
2843 if (auto *NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E))
2852 if (auto *CE = dyn_cast<CastExpr>(E))
2860 if (auto *CE = dyn_cast<CastExpr>(E))
2874 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
2877 if (auto *BTE = dyn_cast<CXXBindTemporaryExpr>(E))
2884 if (auto *PE = dyn_cast<ParenExpr>(E))
2887 if (auto *UO = dyn_cast<UnaryOperator>(E)) {
2892 else if (auto *GSE = dyn_cast<GenericSelectionExpr>(E)) {
2897 else if (auto *CE = dyn_cast<ChooseExpr>(E)) {
2902 else if (auto *CE = dyn_cast<ConstantExpr>(E))
2909 if (auto *CE = dyn_cast<CastExpr>(E)) {
2925 else if (auto *NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E))
2976 if (auto *MCE = dyn_cast<CXXMemberCallExpr>(this)) {
3001 if (const MaterializeTemporaryExpr *M = dyn_cast<MaterializeTemporaryExpr>(E))
3004 while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E))
3013 if (const MaterializeTemporaryExpr *M = dyn_cast<MaterializeTemporaryExpr>(E))
3016 while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
3023 while (const CXXBindTemporaryExpr *BE = dyn_cast<CXXBindTemporaryExpr>(E))
3026 while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
3069 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E))
3085 if (const ParenExpr *Paren = dyn_cast<ParenExpr>(E)) {
3090 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
3100 if (const UnaryOperator* UnOp = dyn_cast<UnaryOperator>(E)) {
3108 = dyn_cast<MaterializeTemporaryExpr>(E)) {
3116 if (const CXXThisExpr *This = dyn_cast<CXXThisExpr>(E))
3590 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(Subexpr))
3703 if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) {
3725 } else if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(this)) {
3728 } else if (const ParenExpr *PE = dyn_cast<ParenExpr>(this)) {
3733 dyn_cast<GenericSelectionExpr>(this)) {
3737 } else if (const ChooseExpr *CE = dyn_cast<ChooseExpr>(this)) {
3742 = dyn_cast<CXXDefaultArgExpr>(this)) {
3746 = dyn_cast<CXXDefaultInitExpr>(this)) {
3753 = dyn_cast<MaterializeTemporaryExpr>(this)) {
3755 } else if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(this)) {
3767 if (const CompoundLiteralExpr *CLE = dyn_cast<CompoundLiteralExpr>(this)){
3769 if (const InitListExpr *ILE = dyn_cast<InitListExpr>(InitExpr))
3781 const IntegerLiteral *Lit = dyn_cast<IntegerLiteral>(this);
3810 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
3826 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E);
3830 const ImplicitParamDecl *Param = dyn_cast<ImplicitParamDecl>(DRE->getDecl());
3834 const ObjCMethodDecl *M = dyn_cast<ObjCMethodDecl>(Param->getDeclContext());
3844 while (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
3852 if (MemberExpr *MemRef = dyn_cast<MemberExpr>(E))
3853 if (FieldDecl *Field = dyn_cast<FieldDecl>(MemRef->getMemberDecl()))
3857 if (ObjCIvarRefExpr *IvarRef = dyn_cast<ObjCIvarRefExpr>(E)) {
3863 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E)) {
3864 if (FieldDecl *Field = dyn_cast<FieldDecl>(DeclRef->getDecl()))
3868 if (BindingDecl *BD = dyn_cast<BindingDecl>(DeclRef->getDecl()))
3873 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(E)) {
3881 if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(E))
3892 while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
3900 if (const ArraySubscriptExpr *ASE = dyn_cast<ArraySubscriptExpr>(E))
3906 if (auto *DRE = dyn_cast<DeclRefExpr>(E))
3907 if (auto *BD = dyn_cast<BindingDecl>(DRE->getDecl()))
3917 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
3918 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
3949 const auto *ICE1 = dyn_cast<ImplicitCastExpr>(E1);
3950 const auto *ICE2 = dyn_cast<ImplicitCastExpr>(E2);
3965 const auto *DRE1 = dyn_cast<DeclRefExpr>(E1);
3966 const auto *DRE2 = dyn_cast<DeclRefExpr>(E2);
3970 const auto *Ivar1 = dyn_cast<ObjCIvarRefExpr>(E1);
3971 const auto *Ivar2 = dyn_cast<ObjCIvarRefExpr>(E2);
3977 const auto *Array1 = dyn_cast<ArraySubscriptExpr>(E1);
3978 const auto *Array2 = dyn_cast<ArraySubscriptExpr>(E2);
3985 const auto Integer1 = dyn_cast<IntegerLiteral>(Idx1);
3986 const auto Integer2 = dyn_cast<IntegerLiteral>(Idx2);
4005 if (const auto *D = dyn_cast<VarDecl>(ME1->getMemberDecl()))
4018 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
4020 if (const auto *ME = dyn_cast<MemberExpr>(E))
4460 if (const ExprWithCleanups *ewc = dyn_cast<ExprWithCleanups>(e))
4462 if (const MaterializeTemporaryExpr *m = dyn_cast<MaterializeTemporaryExpr>(e))
4465 while (const ImplicitCastExpr *ice = dyn_cast<ImplicitCastExpr>(e))
4553 dyn_cast<VariableArrayType>(getArgumentType().getTypePtr()))
4651 while (auto *OASE = dyn_cast<OMPArraySectionExpr>(Base->IgnoreParens())) {
4656 dyn_cast<ArraySubscriptExpr>(Base->IgnoreParenImpCasts())) {
4662 if (auto *DRE = dyn_cast<DeclRefExpr>(Base))
4663 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
tools/clang/lib/AST/ExprCXX.cpp 68 if (auto *NotEq = dyn_cast<UnaryOperator>(E)) {
75 if (auto *BO = dyn_cast<BinaryOperator>(E)) {
81 } else if (auto *BO = dyn_cast<CXXOperatorCallExpr>(E)) {
111 if (auto *BO = dyn_cast<BinaryOperator>(E)) {
116 } else if (auto *BO = dyn_cast<CXXOperatorCallExpr>(E)) {
306 while (const auto *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
720 if (const auto *MemExpr = dyn_cast<MemberExpr>(Callee))
722 if (const auto *BO = dyn_cast<BinaryOperator>(Callee))
738 if (const auto *MemExpr = dyn_cast<MemberExpr>(getCallee()->IgnoreParens()))
tools/clang/lib/AST/ExprClassification.cpp 448 if (const auto *NTTParm = dyn_cast<NonTypeTemplateParmDecl>(D))
504 if (const auto *Value = dyn_cast<ValueDecl>(Member))
530 if (const auto *Method = dyn_cast<CXXMethodDecl>(Member))
612 if (const auto *CE = dyn_cast<ExplicitCastExpr>(E->IgnoreParens())) {
629 if (const auto *Expr = dyn_cast<ObjCPropertyRefExpr>(E)) {
tools/clang/lib/AST/ExprConstant.cpp 107 dyn_cast<MaterializeTemporaryExpr>(Base)) {
164 if (const auto *FE = dyn_cast<FullExpr>(E))
167 if (const auto *Cast = dyn_cast<CastExpr>(E))
170 if (const auto *CE = dyn_cast<CallExpr>(E))
211 if (auto *CAT = dyn_cast<ConstantArrayType>(AT)) {
422 if (const FieldDecl *FD = dyn_cast<FieldDecl>(D)) {
718 if (auto *NE = dyn_cast<CXXNewExpr>(AllocExpr))
1015 dyn_cast<ClassTemplateSpecializationDecl>(MD->getParent());
1866 if (const VarDecl *VD = dyn_cast<VarDecl>(D))
2037 if (const VarDecl *Var = dyn_cast<const VarDecl>(VD)) {
2048 if (const auto *FD = dyn_cast<const FunctionDecl>(VD)) {
2198 if (const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD)) {
2828 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD)) {
2935 if (const auto *ObjCEnc = dyn_cast<ObjCEncodeExpr>(Lit)) {
2942 if (auto PE = dyn_cast<PredefinedExpr>(Lit))
3088 if (auto *BaseMTE = dyn_cast<MaterializeTemporaryExpr>(BaseE))
3560 const VarDecl *VD = dyn_cast<VarDecl>(D);
3740 if (const CompoundLiteralExpr *CLE = dyn_cast<CompoundLiteralExpr>(Base)) {
4162 if (const FieldDecl *FD = dyn_cast<FieldDecl>(MemPtr.getDecl())) {
4166 dyn_cast<IndirectFieldDecl>(MemPtr.getDecl())) {
4315 if (const VarDecl *VD = dyn_cast<VarDecl>(D))
4318 if (const DecompositionDecl *DD = dyn_cast<DecompositionDecl>(D))
4567 if (const auto *VD = dyn_cast<VarDecl>(D)) {
4586 if (const Expr *E = dyn_cast<Expr>(S)) {
4923 auto *CD = dyn_cast<CXXConstructorDecl>(DiagDecl);
5329 if (auto *ME = dyn_cast<MemberExpr>(E)) {
5330 auto *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
5355 } else if (auto *ASE = dyn_cast<ArraySubscriptExpr>(E)) {
5364 } else if (auto *ICE = dyn_cast<ImplicitCastExpr>(E)) {
5492 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Callee);
6239 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
6397 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD))
6404 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
6540 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(Record)) {
6800 dyn_cast<CallExpr>(E->getCond()->IgnoreParenCasts()))
6854 if (const MemberExpr *ME = dyn_cast<MemberExpr>(Callee)) {
6858 Member = dyn_cast<CXXMethodDecl>(ME->getMemberDecl());
6863 } else if (const BinaryOperator *BE = dyn_cast<BinaryOperator>(Callee)) {
6869 Member = dyn_cast<CXXMethodDecl>(D);
6873 } else if (const auto *PDE = dyn_cast<CXXPseudoDestructorExpr>(Callee)) {
6903 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
6965 auto *NamedMember = dyn_cast<CXXMethodDecl>(FD);
6982 if (auto *DD = dyn_cast<CXXDestructorDecl>(FD)) {
7036 const FieldDecl *FD = dyn_cast<FieldDecl>(E->getMemberDecl());
7132 const Expr *FinalExpr = dyn_cast<Expr>(*BI);
7230 if (const FieldDecl *FD = dyn_cast<FieldDecl>(E->getMemberDecl())) {
7236 } else if (const IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(MD)) {
7384 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(E->getDecl()))
7386 if (const VarDecl *VD = dyn_cast<VarDecl>(E->getDecl()))
7388 if (const BindingDecl *BD = dyn_cast<BindingDecl>(E->getDecl()))
7573 if (const VarDecl *VD = dyn_cast<VarDecl>(E->getMemberDecl())) {
7579 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(E->getMemberDecl())) {
8036 if (auto *CAT = dyn_cast<ConstantArrayType>(AT))
8101 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
8105 if (const MemberExpr *ME = dyn_cast<MemberExpr>(E))
8518 for (; auto *ICE = dyn_cast<ImplicitCastExpr>(Stripped);
8796 const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD);
8902 auto *CXXRD = dyn_cast<CXXRecordDecl>(RD);
9030 = dyn_cast<MaterializeTemporaryExpr>(E->getArg(0)))
9474 if (const InitListExpr *ILE = dyn_cast<InitListExpr>(FillerExpr)) {
9494 auto *SL = dyn_cast<StringLiteral>(E->getInit(0)->IgnoreParens());
9899 if (const EnumConstantDecl *ECD = dyn_cast<EnumConstantDecl>(D)) {
10178 if (const VarDecl *VD = dyn_cast<VarDecl>(D))
10202 auto *Cast = dyn_cast<CastExpr>(NoParens);
10248 if (auto *FD = dyn_cast<FieldDecl>(ME->getMemberDecl())) {
10252 } else if (auto *IFD = dyn_cast<IndirectFieldDecl>(ME->getMemberDecl())) {
11335 const AddrLabelExpr *LHSAddrExpr = dyn_cast<AddrLabelExpr>(LHSExpr);
11336 const AddrLabelExpr *RHSAddrExpr = dyn_cast<AddrLabelExpr>(RHSExpr);
11367 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(job.E)) {
11715 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(LHSValue.getDecl()))
11718 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(RHSValue.getDecl()))
11831 const AddrLabelExpr *LHSAddrExpr = dyn_cast<AddrLabelExpr>(LHSExpr);
11832 const AddrLabelExpr *RHSAddrExpr = dyn_cast<AddrLabelExpr>(RHSExpr);
12413 const StringLiteral *S = dyn_cast<StringLiteral>(Arg->IgnoreParenCasts());
13421 if (const IntegerLiteral *L = dyn_cast<IntegerLiteral>(Exp)) {
13977 if (const VarDecl *Dcl = dyn_cast<VarDecl>(D)) {
14131 = dyn_cast<FloatingLiteral>(SubExpr->IgnoreParenImpCasts())) {
14176 = dyn_cast<CallExpr>(Exp->getCond()->IgnoreParenCasts()))
14339 auto *MD = dyn_cast<CXXMethodDecl>(Callee);
14395 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
14407 if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(FD)) {
tools/clang/lib/AST/ExternalASTMerger.cpp 201 if (auto *ToDC = dyn_cast<DeclContext>(To)) {
231 if (auto *ToTag = dyn_cast<TagDecl>(To)) {
235 } else if (auto *ToNamespace = dyn_cast<NamespaceDecl>(To)) {
238 } else if (auto *ToContainer = dyn_cast<ObjCContainerDecl>(To)) {
361 if (auto *T1 = dyn_cast<TagDecl>(D1))
362 if (auto *T2 = dyn_cast<TagDecl>(D2))
470 if (auto *FunctionTD = dyn_cast<FunctionTemplateDecl>(D))
472 else if (auto *ClassTD = dyn_cast<ClassTemplateDecl>(D))
474 else if (auto *VarTD = dyn_cast<VarTemplateDecl>(D))
tools/clang/lib/AST/Interp/ByteCodeExprGen.cpp 263 if (auto *DE = dyn_cast<DeclRefExpr>(LV)) {
265 if (auto *PD = dyn_cast<ParmVarDecl>(DE->getDecl()))
267 if (auto *VD = dyn_cast<VarDecl>(DE->getDecl()))
tools/clang/lib/AST/Interp/ByteCodeStmtGen.cpp 100 if (auto *MD = dyn_cast<CXXMethodDecl>(F))
128 if (auto *Exp = dyn_cast<Expr>(S))
149 if (auto *VD = dyn_cast<VarDecl>(D)) {
156 if (auto *DD = dyn_cast<DecompositionDecl>(D)) {
tools/clang/lib/AST/Interp/Disasm.cpp 27 if (auto *Cons = dyn_cast<CXXConstructorDecl>(F)) {
tools/clang/lib/AST/Interp/Function.cpp 45 if (auto *M = dyn_cast<CXXMethodDecl>(F))
tools/clang/lib/AST/Interp/Interp.cpp 349 auto *CD = dyn_cast<CXXConstructorDecl>(DiagDecl);
tools/clang/lib/AST/Interp/InterpFrame.cpp 72 if (auto *VD = dyn_cast<ValueDecl>(D)) {
114 auto *M = dyn_cast<CXXMethodDecl>(F);
tools/clang/lib/AST/Interp/Program.cpp 143 if (auto *Var = dyn_cast<VarDecl>(VD)) {
236 if (auto *CD = dyn_cast<CXXRecordDecl>(RD)) {
309 if (auto CAT = dyn_cast<ConstantArrayType>(ArrayType)) {
tools/clang/lib/AST/Interp/Source.cpp 27 return dyn_cast<Expr>(S);
tools/clang/lib/AST/ItaniumCXXABI.cpp 165 if (auto *DD = dyn_cast<DecompositionDecl>(VD)) {
tools/clang/lib/AST/ItaniumMangle.cpp 48 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
56 if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
68 if (const auto *VD = dyn_cast<VarDecl>(D))
72 if (const auto *FD = dyn_cast<FunctionDecl>(D))
91 return dyn_cast<RecordDecl>(D);
111 const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(ND);
181 if (const TagDecl *Tag = dyn_cast<TagDecl>(ND)) {
297 if (const auto *NS = dyn_cast<NamespaceDecl>(ND)) {
572 const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
609 const VarDecl *VD = dyn_cast<VarDecl>(D);
647 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
649 else if (const VarDecl *VD = dyn_cast<VarDecl>(D))
651 else if (const IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(D))
715 EnableIfAttr *EIA = dyn_cast<EnableIfAttr>(*I);
728 if (auto *CD = dyn_cast<CXXConstructorDecl>(FD))
792 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
801 dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
808 dyn_cast<VarTemplateSpecializationDecl>(ND)) {
817 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
968 if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND)) {
1265 if (auto *DD = dyn_cast<DecompositionDecl>(ND)) {
1301 auto *FD = dyn_cast<FunctionDecl>(ND);
1317 if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) {
1325 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
1382 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(TD)) {
1467 if (const auto *MD = dyn_cast<CXXMethodDecl>(ND))
1511 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(ND)) {
1562 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(DC))
1564 else if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC))
1585 const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD);
1590 = dyn_cast<FunctionDecl>(Parm->getDeclContext())) {
1604 } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
1613 } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
1619 = dyn_cast<FunctionDecl>(Parm->getDeclContext())) {
1634 if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
1693 if (auto *Ty = dyn_cast<TemplateTypeParmDecl>(Decl)) {
1697 } else if (auto *Tn = dyn_cast<NonTypeTemplateParmDecl>(Decl)) {
1713 } else if (auto *Tt = dyn_cast<TemplateTemplateParmDecl>(Decl)) {
1889 if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND)) {
1923 if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(TD))
2480 dyn_cast<DependentAddressSpaceType>(ty)) {
3473 const auto *ME = dyn_cast<MemberExpr>(Base);
3520 const UnresolvedLookupExpr *lookup = dyn_cast<UnresolvedLookupExpr>(fn);
3806 if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init)) {
3812 } else if (const ParenListExpr *PLE = dyn_cast<ParenListExpr>(Init)) {
4135 if (auto *CCE = dyn_cast<CXXConstructExpr>(Sub))
4138 if (auto *StdInitList = dyn_cast<CXXStdInitializerListExpr>(Sub))
4140 if (auto *IL = dyn_cast<InitListExpr>(Sub)) {
4273 dyn_cast<FloatingLiteral>(IE->getSubExpr())) {
4327 if (const TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(Pack))
4330 = dyn_cast<NonTypeTemplateParmDecl>(Pack))
4333 = dyn_cast<TemplateTemplateParmDecl>(Pack))
4563 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
4734 dyn_cast<ClassTemplateSpecializationDecl>(RT->getDecl());
4772 if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) {
4779 if (const ClassTemplateDecl *TD = dyn_cast<ClassTemplateDecl>(ND)) {
4797 dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
tools/clang/lib/AST/JSONNodeDumper.cpp 54 if (const auto *E = dyn_cast<Expr>(S)) {
111 if (const auto *ND = dyn_cast<NamedDecl>(D))
118 const auto *ParentDeclContextDecl = dyn_cast<Decl>(D->getDeclContext());
286 if (const auto *ND = dyn_cast<NamedDecl>(D))
288 if (const auto *VD = dyn_cast<ValueDecl>(D))
298 if (const auto *ND = dyn_cast<NamedDecl>(D))
300 if (const auto *VD = dyn_cast<ValueDecl>(D))
tools/clang/lib/AST/Mangle.cpp 57 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND))
75 const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND);
151 if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D))
168 else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D))
175 const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FT);
185 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
237 if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(DC)) {
247 if (const auto *CD = dyn_cast<CXXConstructorDecl>(DC))
249 else if (const auto *DD = dyn_cast<CXXDestructorDecl>(DC))
251 else if (auto ND = dyn_cast<NamedDecl>(DC)) {
270 dyn_cast<ObjCContainerDecl>(MD->getDeclContext());
273 if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(CD)) {
306 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
311 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
314 } else if (auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
317 } else if (auto *ID = dyn_cast<ObjCInterfaceDecl>(D)) {
351 if (const auto *OID = dyn_cast<ObjCInterfaceDecl>(OCD))
353 else if (const auto *OID = dyn_cast<ObjCImplementationDecl>(OCD))
373 if (const auto *OCD = dyn_cast<ObjCContainerDecl>(D))
425 if (const auto *CtorD = dyn_cast<CXXConstructorDecl>(D))
427 else if (const auto *DtorD = dyn_cast<CXXDestructorDecl>(D))
tools/clang/lib/AST/MicrosoftMangle.cpp 72 if (const auto *RD = dyn_cast<CXXRecordDecl>(D))
93 if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
113 if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(ND))
204 if (const auto *RD = dyn_cast<CXXRecordDecl>(ND)) {
218 if (const TagDecl *Tag = dyn_cast<TagDecl>(ND)) {
424 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
456 const VarDecl *VD = dyn_cast<VarDecl>(D);
493 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
495 else if (const VarDecl *VD = dyn_cast<VarDecl>(D))
762 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
771 dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
778 dyn_cast<VarTemplateSpecializationDecl>(ND)) {
867 if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) {
874 if (const DecompositionDecl *DD = dyn_cast<DecompositionDecl>(ND)) {
884 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
909 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(TD)) {
919 Parm ? dyn_cast<FunctionDecl>(Parm->getDeclContext()) : nullptr;
1056 if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC)) {
1079 if (const auto *P = dyn_cast<ParmVarDecl>(MC))
1080 if (const auto *F = dyn_cast<FunctionDecl>(P->getDeclContext()))
1095 if (const auto *ND = dyn_cast<NamedDecl>(MC))
1100 if (const auto *RD = dyn_cast<RecordDecl>(DC))
1122 } else if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(DC)) {
1126 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
1373 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
1375 UE = dyn_cast<CXXUuidofExpr>(UO->getSubExpr());
1377 UE = dyn_cast<CXXUuidofExpr>(E);
1463 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
1464 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
1538 if (const auto *TD = dyn_cast<TagDecl>(ND)) {
2175 const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(T);
2338 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
tools/clang/lib/AST/NSAPI.cpp 585 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
tools/clang/lib/AST/NestedNameSpecifier.cpp 170 return dyn_cast<NamespaceDecl>(static_cast<NamedDecl *>(Specifier));
178 return dyn_cast<NamespaceAliasDecl>(static_cast<NamedDecl *>(Specifier));
190 return dyn_cast<CXXRecordDecl>(static_cast<NamedDecl *>(Specifier));
331 = dyn_cast<TemplateSpecializationType>(T)) {
tools/clang/lib/AST/ODRHash.cpp 487 if (auto *Function = dyn_cast<FunctionDecl>(SubDecl)) {
522 if (auto *F = dyn_cast<FunctionDecl>(DC)) {
544 if (const auto *Method = dyn_cast<CXXMethodDecl>(Function)) {
629 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
639 dyn_cast<ClassTemplateSpecializationDecl>(D);
707 const auto *TypedefT = dyn_cast<TypedefType>(T);
764 if (auto Pointer = dyn_cast<PointerType>(split.Ty)) {
1026 dyn_cast<TypedefType>(UnderlyingType.getTypePtr())) {
1031 dyn_cast<ElaboratedType>(UnderlyingType.getTypePtr())) {
tools/clang/lib/AST/OpenMPClause.cpp 227 if (auto *DS = dyn_cast<DeclStmt>(S)) {
229 if (auto *OED = dyn_cast<OMPCapturedExprDecl>(DS->getSingleDecl()))
1360 if (auto *DRE = dyn_cast<DeclRefExpr>(*I)) {
tools/clang/lib/AST/QualTypeNames.cpp 125 if (const auto *TST = dyn_cast<const TemplateSpecializationType>(TypePtr)) {
149 } else if (const auto *TSTRecord = dyn_cast<const RecordType>(TypePtr)) {
155 dyn_cast<ClassTemplateSpecializationDecl>(TSTRecord->getDecl())) {
190 if (const auto *NS = dyn_cast<NamespaceDecl>(DC)) {
193 NS = dyn_cast<NamespaceDecl>(NS->getDeclContext());
199 } else if (const auto *TD = dyn_cast<TagDecl>(DC)) {
201 } else if (const auto *TDD = dyn_cast<TypedefNameDecl>(DC)) {
251 } else if (const auto *TDD = dyn_cast<TypedefType>(Type)) {
273 if (const auto *CxxDecl = dyn_cast<CXXRecordDecl>(DC)) {
288 Outer = dyn_cast<NamedDecl>(Decl);
289 OuterNS = dyn_cast<NamespaceDecl>(Decl);
296 } else if (const auto *TD = dyn_cast<TagDecl>(Outer)) {
299 } else if (dyn_cast<TranslationUnitDecl>(Outer)) {
323 if (const auto *TDT = dyn_cast<TypedefType>(TypePtr)) {
325 } else if (const auto *TagDeclType = dyn_cast<TagType>(TypePtr)) {
327 } else if (const auto *TST = dyn_cast<TemplateSpecializationType>(TypePtr)) {
344 Namespace = dyn_cast<NamespaceDecl>(Namespace->getDeclContext());
382 if (auto *MPT = dyn_cast<MemberPointerType>(QT.getTypePtr())) {
434 if (const auto *ETypeInput = dyn_cast<ElaboratedType>(QT.getTypePtr())) {
tools/clang/lib/AST/RecordLayoutBuilder.cpp 1257 if (const RecordDecl *RD = dyn_cast<RecordDecl>(D)) {
1286 if (const RecordDecl *RD = dyn_cast<RecordDecl>(D))
1919 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
1958 if (const RecordDecl *RD = dyn_cast<RecordDecl>(D)) {
3047 if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
3066 if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
3165 if (const FieldDecl *FD = dyn_cast<FieldDecl>(VD)) {
3298 auto CXXRD = dyn_cast<CXXRecordDecl>(RD);
tools/clang/lib/AST/Stmt.cpp 158 if (const auto *LS = dyn_cast<LabelStmt>(S))
160 else if (const auto *SC = dyn_cast<SwitchCase>(S))
162 else if (const auto *AS = dyn_cast<AttributedStmt>(S))
337 if (const auto *E = dyn_cast<Expr>(S))
340 if (const auto *LS = dyn_cast<LabelStmt>(S))
342 else if (const auto *AS = dyn_cast<AttributedStmt>(S))
373 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
375 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
381 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
383 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
389 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
391 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
397 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
399 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
405 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
407 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
413 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
415 if (const auto *msAsmStmt = dyn_cast<MSAsmStmt>(this))
1066 if (auto *E = dyn_cast<AddrLabelExpr>(getTarget()->IgnoreParenImpCasts()))
1136 return dyn_cast<SEHExceptStmt>(getHandler());
1140 return dyn_cast<SEHFinallyStmt>(getHandler());
tools/clang/lib/AST/StmtIterator.cpp 26 while (const ArrayType *vt = dyn_cast<ArrayType>(t)) {
27 if (const VariableArrayType *vat = dyn_cast<VariableArrayType>(vt))
48 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI))
75 if (VarDecl* VD = dyn_cast<VarDecl>(D)) {
84 else if (TypedefNameDecl* TD = dyn_cast<TypedefNameDecl>(D)) {
91 else if (EnumConstantDecl* ECD = dyn_cast<EnumConstantDecl>(D)) {
tools/clang/lib/AST/StmtOpenMP.cpp 39 if (auto *LD = dyn_cast<OMPLoopDirective>(this))
tools/clang/lib/AST/StmtPrinter.cpp 105 if (auto *DS = dyn_cast<DeclStmt>(S))
114 if (auto *CS = dyn_cast<CompoundStmt>(S)) {
251 if (auto *CS = dyn_cast<CompoundStmt>(If->getThen())) {
264 if (auto *CS = dyn_cast<CompoundStmt>(Else)) {
268 } else if (auto *ElseIf = dyn_cast<IfStmt>(Else)) {
307 if (auto *CS = dyn_cast<CompoundStmt>(Node->getBody())) {
340 if (auto *DS = dyn_cast<DeclStmt>(Node->getElement()))
506 if (auto *TS = dyn_cast<CompoundStmt>(Node->getTryBody())) {
519 if (auto *CS = dyn_cast<CompoundStmt>(catchStmt->getCatchBody())) {
527 PrintRawCompoundStmt(dyn_cast<CompoundStmt>(FS->getFinallyBody()));
563 PrintRawCompoundStmt(dyn_cast<CompoundStmt>(Node->getSubStmt()));
950 if (const auto *OCED = dyn_cast<OMPCapturedExprDecl>(Node->getDecl())) {
985 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) {
986 if (const auto *PD = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) {
1354 if (const auto *TE = dyn_cast<CXXThisExpr>(E))
1363 auto *ParentMember = dyn_cast<MemberExpr>(Node->getBase());
1365 ParentMember ? dyn_cast<FieldDecl>(ParentMember->getMemberDecl())
1372 if (auto *FD = dyn_cast<FieldDecl>(Node->getMemberDecl()))
tools/clang/lib/AST/StmtProfile.cpp 93 dyn_cast<NonTypeTemplateParmDecl>(D)) {
101 if (const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
116 dyn_cast<TemplateTypeParmDecl>(D)) {
124 dyn_cast<TemplateTemplateParmDecl>(D)) {
1310 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(*i))
tools/clang/lib/AST/TemplateBase.cpp 130 if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
170 if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
tools/clang/lib/AST/TemplateName.cpp 206 = dyn_cast<TemplateTemplateParmDecl>(Template))
tools/clang/lib/AST/TextNodeDumper.cpp 127 if (const auto *E = dyn_cast<Expr>(Node)) {
241 if (auto *ND = dyn_cast<NamedDecl>(D))
245 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
258 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
266 const auto *MD = dyn_cast<ObjCMethodDecl>(D);
268 const auto *DC = dyn_cast<DeclContext>(D);
418 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
423 if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
1310 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
tools/clang/lib/AST/Type.cpp 303 if (const auto *ATy = dyn_cast<ArrayType>(this))
440 if (const auto *Sugar = dyn_cast<T>(Cur))
575 if (const auto *RT = dyn_cast<RecordType>(this)) {
594 if (const auto *RT = dyn_cast<RecordType>(this)) {
1360 const auto *newAttrType = dyn_cast<AttributedType>(newType.getTypePtr());
1445 if (const auto method = dyn_cast<ObjCMethodDecl>(dc))
1450 const auto *dcClassDecl = dyn_cast<ObjCInterfaceDecl>(dc);
1462 dcCategoryDecl = dyn_cast<ObjCCategoryDecl>(dc);
1683 return dyn_cast<CXXRecordDecl>(RT->getDecl());
2054 if (const auto *BT = dyn_cast<BuiltinType>(T)) {
2072 } else if (const auto *CT = dyn_cast<ComplexType>(T)) {
2092 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(Record->getDecl()))
2232 dyn_cast<CXXRecordDecl>(cast<RecordType>(CanonicalType)->getDecl()))
2271 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) {
2314 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) {
2429 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl()))
2466 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl()))
2505 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) {
2737 if (const auto *Elab = dyn_cast<ElaboratedType>(this))
2739 else if (const auto *DepName = dyn_cast<DependentNameType>(this))
2742 dyn_cast<DependentTemplateSpecializationType>(this))
4022 while (const auto *array = dyn_cast<ArrayType>(canon))
4025 if (const auto *opt = dyn_cast<ObjCObjectPointerType>(canon)) {
4037 if (const auto *typedefType = dyn_cast<TypedefType>(cur))
4048 if (const auto *typedefType = dyn_cast<TypedefType>(this))
4130 if (const auto *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
tools/clang/lib/AST/TypePrinter.cpp 200 if (const auto *AT = dyn_cast<AutoType>(T))
202 if (const auto *Subst = dyn_cast<SubstTemplateTypeParmType>(T))
283 if (const auto *Subst = dyn_cast<SubstTemplateTypeParmType>(Split.Ty))
1114 if (const auto *NS = dyn_cast<NamespaceDecl>(DC)) {
1122 } else if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) {
1128 } else if (const auto *Tag = dyn_cast<TagDecl>(DC)) {
1205 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
tools/clang/lib/AST/VTableBuilder.cpp 1297 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1545 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1671 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2166 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2474 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2512 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2867 const auto *ND = dyn_cast<NamedDecl>(D);
2876 if (const auto *MD = dyn_cast<CXXMethodDecl>(ND))
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 483 if (const auto *ND = dyn_cast<NamespaceDecl>(Ctx)) {
491 if (const auto *RD = dyn_cast<RecordDecl>(Ctx)) {
tools/clang/lib/Analysis/AnalysisDeclContext.cpp 95 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
108 else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
118 } else if (const auto *BD = dyn_cast<BlockDecl>(D))
149 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
151 if (const auto *BD = dyn_cast<BlockDecl>(D)) {
156 return dyn_cast<ImplicitParamDecl>(VD);
160 auto *CXXMethod = dyn_cast<CXXMethodDecl>(D);
174 return dyn_cast<ImplicitParamDecl>(VD);
184 if (const auto *e = dyn_cast<Expr>(stmt))
192 if (const auto *e = dyn_cast<Expr>(stmt))
282 if (const auto *C = dyn_cast<CXXConstructorDecl>(getDecl())) {
296 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
329 const auto *ND = dyn_cast<NamespaceDecl>(DC);
445 if (const auto *SFC = dyn_cast<StackFrameContext>(LC))
492 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
537 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
600 if (const auto *VD = dyn_cast<VarDecl>(DR->getDecl())) {
618 if (auto *OVE = dyn_cast<OpaqueValueExpr>(Semantic))
tools/clang/lib/Analysis/BodyFarm.cpp 717 if (auto *InterfaceDecl = dyn_cast<ObjCInterfaceDecl>(Container)) {
719 } else if (auto *CategoryDecl = dyn_cast<ObjCCategoryDecl>(Container)) {
721 } else if (auto *ImplDecl = dyn_cast<ObjCImplDecl>(Container)) {
tools/clang/lib/Analysis/CFG.cpp 67 if (VarDecl *VD = dyn_cast<VarDecl>(D))
80 if (const auto *CE = dyn_cast<CastExpr>(E)) {
87 if (const auto *UO = dyn_cast<UnaryOperator>(E)) {
103 if (auto *DR = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
429 if (CallExpr *CE = dyn_cast<CallExpr>(S)) {
925 const IntegerLiteral *IntLiteral = dyn_cast<IntegerLiteral>(LHSExpr);
929 IntLiteral = dyn_cast<IntegerLiteral>(RHSExpr);
964 const IntegerLiteral *IntLiteral = dyn_cast<IntegerLiteral>(LHSExpr);
968 IntLiteral = dyn_cast<IntegerLiteral>(RHSExpr);
975 const BinaryOperator *BitOp = dyn_cast<BinaryOperator>(BoolExpr);
981 const IntegerLiteral *IntLiteral2 = dyn_cast<IntegerLiteral>(LHSExpr2);
984 IntLiteral2 = dyn_cast<IntegerLiteral>(RHSExpr2);
1038 dyn_cast<BinaryOperator>(B->getLHS()->IgnoreParens());
1040 dyn_cast<BinaryOperator>(B->getRHS()->IgnoreParens());
1183 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) {
1229 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(E)) {
1330 while (const ArrayType *vt = dyn_cast<ArrayType>(t)) {
1331 if (const VariableArrayType *vat = dyn_cast<VariableArrayType>(vt))
1662 if (CXXDefaultInitExpr *Default = dyn_cast<CXXDefaultInitExpr>(Init)) {
1689 if (const ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(Init)) {
1696 = dyn_cast<MaterializeTemporaryExpr>(Init)) {
1945 if (CompoundStmt *CS = dyn_cast<CompoundStmt>(S)) {
1948 if (DeclStmt *DS = dyn_cast<DeclStmt>(SI))
1956 if (DeclStmt *DS = dyn_cast<DeclStmt>(S->stripLabelLikeStatements()))
1969 if (VarDecl *VD = dyn_cast<VarDecl>(DI))
2127 if (Expr *E = dyn_cast<Expr>(S))
2131 if (auto *D = dyn_cast<OMPExecutableDirective>(S))
2401 if (BinaryOperator *B_RHS = dyn_cast<BinaryOperator>(RHS))
2442 if (BinaryOperator *B_LHS = dyn_cast<BinaryOperator>(LHS))
2556 if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FT))
2711 const BinaryConditionalOperator *BCO = dyn_cast<BinaryConditionalOperator>(C);
2748 dyn_cast<BinaryOperator>(C->getCond()->IgnoreParens()))
2811 VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl());
2995 : dyn_cast<BinaryOperator>(I->getCond()->IgnoreParens());
3050 if (auto *R = dyn_cast<ReturnStmt>(S))
3064 if (ReturnStmt *RS = dyn_cast<ReturnStmt>(S)) {
3636 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(Semantic))
3720 if (BinaryOperator *Cond = dyn_cast<BinaryOperator>(C->IgnoreParens()))
5417 if (const StmtExpr *SE = dyn_cast<StmtExpr>(S)) {
5429 if (const BinaryOperator* B = dyn_cast<BinaryOperator>(S)) {
5449 } else if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(S)) {
5455 } else if (const CastExpr *CE = dyn_cast<CastExpr>(S)) {
5589 if (LabelStmt *L = dyn_cast<LabelStmt>(Label))
5591 else if (CaseStmt *C = dyn_cast<CaseStmt>(Label)) {
5603 else if (CXXCatchStmt *CS = dyn_cast<CXXCatchStmt>(Label)) {
5611 } else if (SEHExceptStmt *ES = dyn_cast<SEHExceptStmt>(Label)) {
tools/clang/lib/Analysis/CallGraph.cpp 61 if (BlockExpr *Block = dyn_cast<BlockExpr>(CEE)) {
141 if (BlockDecl *BD = dyn_cast<BlockDecl>(D))
145 if (auto *DC = dyn_cast<DeclContext>(I))
160 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
186 if (auto constructor = dyn_cast<CXXConstructorDecl>(D)) {
tools/clang/lib/Analysis/CloneDetection.cpp 256 auto CS = dyn_cast<CompoundStmt>(S);
550 if (auto D = dyn_cast<DeclRefExpr>(S)) {
551 if (auto VD = dyn_cast<VarDecl>(D->getDecl()->getCanonicalDecl()))
tools/clang/lib/Analysis/Consumed.cpp 470 if (const auto Cleanups = dyn_cast<ExprWithCleanups>(E))
477 if (const auto Cleanups = dyn_cast<ExprWithCleanups>(E))
824 if (const auto *MCall = dyn_cast<CXXMemberCallExpr>(Call))
1201 if (const auto *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp 437 if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(&Func)) {
tools/clang/lib/Analysis/LiveVariables.cpp 119 if (const auto *DD = dyn_cast<DecompositionDecl>(D)) {
225 while (const ArrayType *VT = dyn_cast<ArrayType>(ty)) {
226 if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(VT))
238 if (const Expr *Ex = dyn_cast<Expr>(S))
240 if (const FullExpr *FE = dyn_cast<FullExpr>(S)) {
244 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(S)) {
297 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) {
310 if (OpaqueValueExpr *OV = dyn_cast<OpaqueValueExpr>(child))
380 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(LHS)) {
384 if (const BindingDecl* BD = dyn_cast<BindingDecl>(D)) {
388 } else if (const auto *VD = dyn_cast<VarDecl>(D)) {
413 if (const auto *BD = dyn_cast<BindingDecl>(D)) {
416 } else if (const auto *VD = dyn_cast<VarDecl>(D)) {
424 if (const auto *DD = dyn_cast<DecompositionDecl>(DI)) {
427 } else if (const auto *VD = dyn_cast<VarDecl>(DI)) {
440 if (DeclStmt *DS = dyn_cast<DeclStmt>(element)) {
443 else if ((DR = dyn_cast<DeclRefExpr>(cast<Expr>(element)->IgnoreParens()))) {
487 if (auto *DR = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) {
575 if (const auto *BO = dyn_cast<BinaryOperator>(stmt)) {
578 dyn_cast<DeclRefExpr>(BO->getLHS()->IgnoreParens())) {
tools/clang/lib/Analysis/PathDiagnostic.cpp 194 if (const auto *call = dyn_cast<PathDiagnosticCallPiece>(piece))
196 else if (const auto *macro = dyn_cast<PathDiagnosticMacroPiece>(piece))
581 if (const auto *CS = dyn_cast<CompoundStmt>(S))
798 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
800 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
866 if (const auto *MD = dyn_cast<ObjCMethodDecl>(Callee))
910 if (const auto T = dyn_cast<ClassTemplateSpecializationDecl>(D))
929 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
938 if (const auto *CD = dyn_cast<CXXConstructorDecl>(MD)) {
975 if (const auto FD = dyn_cast<FunctionDecl>(D))
1010 if (const auto *MD = dyn_cast<CXXMethodDecl>(Callee))
1052 if (const auto *cp = dyn_cast<PathDiagnosticCallPiece>(piece))
tools/clang/lib/Analysis/ProgramPoint.cpp 153 if (const auto *C = dyn_cast<CaseStmt>(Label)) {
192 if (const auto *CS = dyn_cast<CastExpr>(S))
tools/clang/lib/Analysis/ReachableCode.cpp 34 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex);
52 if (const DoStmt *DS = dyn_cast<DoStmt>(Term)) {
61 if (const auto *DRE = dyn_cast<DeclRefExpr>(S))
62 if (const auto *FDecl = dyn_cast<FunctionDecl>(DRE->getDecl()))
76 if (const auto *CE = dyn_cast<CallExpr>(CS->getStmt())) {
93 if (const ReturnStmt *RS = dyn_cast<ReturnStmt>(CS->getStmt())) {
195 if (const auto *Ex = dyn_cast<Expr>(S))
198 if (const auto *Ex = dyn_cast<Expr>(S))
202 if (const ParenExpr *PE = dyn_cast<ParenExpr>(S))
207 if (const Expr *Ex = dyn_cast<Expr>(S))
272 if (const EnumConstantDecl *ED = dyn_cast<EnumConstantDecl>(D))
274 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
451 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(S))
550 if (const Expr *Ex = dyn_cast<Expr>(S))
636 if (const ForStmt *FS = dyn_cast<ForStmt>(LoopTarget)) {
tools/clang/lib/Analysis/RetainSummaryManager.cpp 43 if (auto AA = dyn_cast<AnnotateAttr>(A))
51 if (auto AA = dyn_cast<AnnotateAttr>(A))
59 if (auto AA = dyn_cast<AnnotateAttr>(A))
226 if (const auto *ND = dyn_cast<NamespaceDecl>(RD->getDeclContext()))
263 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
514 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
768 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
787 const FunctionProtoType* FTP = dyn_cast<FunctionProtoType>(FT);
874 if (const auto *MD = dyn_cast<CXXMethodDecl>(D))
896 if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
898 } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(ND)) {
957 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
tools/clang/lib/Analysis/ThreadSafety.cpp 634 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSExp)) {
1191 if (const auto *CE = dyn_cast<ImplicitCastExpr>(Exp))
1194 if (const auto *DR = dyn_cast<DeclRefExpr>(Exp))
1197 if (const auto *ME = dyn_cast<MemberExpr>(Exp))
1410 } else if (const auto *BLE = dyn_cast<CXXBoolLiteralExpr>(E)) {
1413 } else if (const auto *ILE = dyn_cast<IntegerLiteral>(E)) {
1416 } else if (auto *CE = dyn_cast<ImplicitCastExpr>(E))
1430 if (const auto *CallExp = dyn_cast<CallExpr>(Cond)) {
1435 else if (const auto *PE = dyn_cast<ParenExpr>(Cond))
1437 else if (const auto *CE = dyn_cast<ImplicitCastExpr>(Cond))
1439 else if (const auto *FE = dyn_cast<FullExpr>(Cond))
1441 else if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
1445 else if (const auto *UOP = dyn_cast<UnaryOperator>(Cond)) {
1452 else if (const auto *BOP = dyn_cast<BinaryOperator>(Cond)) {
1476 } else if (const auto *COP = dyn_cast<ConditionalOperator>(Cond)) {
1706 while (const auto *DRE = dyn_cast<DeclRefExpr>(Exp)) {
1707 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()->getCanonicalDecl());
1720 if (const auto *UO = dyn_cast<UnaryOperator>(Exp)) {
1727 if (const auto *AE = dyn_cast<ArraySubscriptExpr>(Exp)) {
1732 if (const auto *ME = dyn_cast<MemberExpr>(Exp)) {
1757 if (const auto *PE = dyn_cast<ParenExpr>(Exp)) {
1761 if (const auto *CE = dyn_cast<CastExpr>(Exp)) {
1812 if (const auto *CD = dyn_cast<const CXXConstructorDecl>(D)) {
2033 if (const auto *CE = dyn_cast<CXXMemberCallExpr>(Exp)) {
2034 const auto *ME = dyn_cast<MemberExpr>(CE->getCallee());
2053 } else if (const auto *OE = dyn_cast<CXXOperatorCallExpr>(Exp)) {
2143 if (auto *EWC = dyn_cast<ExprWithCleanups>(E))
2145 if (auto *BTE = dyn_cast<CXXBindTemporaryExpr>(E))
2148 if (const auto *CE = dyn_cast<CXXConstructExpr>(E)) {
2265 const auto *CurrentFunction = dyn_cast<FunctionDecl>(D);
2266 CurrentMethod = dyn_cast<CXXMethodDecl>(D);
2318 if (const auto *A = dyn_cast<RequiresCapabilityAttr>(Attr)) {
2322 } else if (const auto *A = dyn_cast<ReleaseCapabilityAttr>(Attr)) {
2331 } else if (const auto *A = dyn_cast<AcquireCapabilityAttr>(Attr)) {
tools/clang/lib/Analysis/ThreadSafetyCommon.cpp 64 if (const auto *Ph = dyn_cast<til::Phi>(E))
84 const auto *ME = dyn_cast<MemberExpr>(E->IgnoreParenCasts());
107 if (const auto *ME = dyn_cast<MemberExpr>(DeclExp)) {
110 } else if (const auto *CE = dyn_cast<CXXMemberCallExpr>(DeclExp)) {
115 } else if (const auto *CE = dyn_cast<CallExpr>(DeclExp)) {
118 } else if (const auto *CE = dyn_cast<CXXConstructExpr>(DeclExp)) {
156 if (const auto* SLit = dyn_cast<StringLiteral>(AttrExp)) {
167 if (const auto *OE = dyn_cast<CXXOperatorCallExpr>(AttrExp)) {
173 else if (const auto *UO = dyn_cast<UnaryOperator>(AttrExp)) {
267 if (const auto *CE = dyn_cast<CastExpr>(S))
312 if (const auto *V = dyn_cast<til::Variable>(E))
314 if (const auto *Ph = dyn_cast<til::Phi>(E))
316 if (const auto *P = dyn_cast<til::Project>(E))
318 if (const auto *L = dyn_cast<til::LiteralPtr>(E))
327 if (const auto *C = dyn_cast<til::Cast>(E))
352 if (const auto *VD = dyn_cast<CXXMethodDecl>(D))
442 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) {
501 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) {
567 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) {
662 if (auto *V = dyn_cast<til::Variable>(E)) {
702 auto *Ph = dyn_cast<til::Phi>(CurrE);
tools/clang/lib/Analysis/ThreadSafetyTIL.cpp 63 if (auto *Ph = dyn_cast<Phi>(E)) {
74 if (auto *Ph = dyn_cast<Phi>(E)) {
84 if (const auto *V = dyn_cast<Variable>(E)) {
90 if (const auto *Ph = dyn_cast<Phi>(E)) {
106 if (auto *V = dyn_cast<Variable>(E)) {
117 if (auto *Ph = dyn_cast<Phi>(E)) {
tools/clang/lib/Analysis/UninitializedValues.cpp 299 if (const auto *CE = dyn_cast<CastExpr>(Ex)) {
314 dyn_cast<DeclRefExpr>(stripCasts(DC->getParentASTContext(), E)))
315 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
363 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
378 dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init));
388 if (const auto *CO = dyn_cast<ConditionalOperator>(E)) {
394 if (const auto *BCO = dyn_cast<BinaryConditionalOperator>(E)) {
399 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(E)) {
404 if (const auto *ME = dyn_cast<MemberExpr>(E)) {
405 if (const auto *VD = dyn_cast<VarDecl>(ME->getMemberDecl())) {
412 if (const auto *BO = dyn_cast<BinaryOperator>(E)) {
433 auto *VD = dyn_cast<VarDecl>(DI);
487 const auto *UO = dyn_cast<UnaryOperator>(Ex);
498 else if (const auto *CSE = dyn_cast<CStyleCastExpr>(CE)) {
710 if (const auto *DS = dyn_cast<DeclStmt>(FS->getElement())) {
790 auto *VD = dyn_cast<VarDecl>(DI);
tools/clang/lib/CodeGen/CGAtomic.cpp 415 if (llvm::ConstantInt *FO = dyn_cast<llvm::ConstantInt>(FailureOrderVal)) {
516 if (llvm::ConstantInt *IsWeakC = dyn_cast<llvm::ConstantInt>(IsWeak)) {
679 if (auto SC = dyn_cast<llvm::ConstantInt>(Scope)) {
tools/clang/lib/CodeGen/CGBlocks.cpp 865 if (const auto EWC = dyn_cast<ExprWithCleanups>(E)) {
1532 const auto *var = dyn_cast<VarDecl>(i->first);
2961 if ((ND = dyn_cast<FunctionDecl>(Result)) ||
2962 (ND = dyn_cast<VarDecl>(Result)))
tools/clang/lib/CodeGen/CGBuiltin.cpp 59 Byte = llvm::dyn_cast<llvm::ConstantInt>(
580 if (auto *D = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts())) {
581 auto *Param = dyn_cast<ParmVarDecl>(D->getDecl());
4179 if (auto *PtrTy = dyn_cast<llvm::PointerType>(PTy)) {
4205 if (auto *PtrTy = dyn_cast<llvm::PointerType>(RetTy)) {
5822 if (BitCastInst *BI = dyn_cast<BitCastInst>(Op))
9659 if (const auto *C = dyn_cast<Constant>(Mask))
9671 if (const auto *C = dyn_cast<Constant>(Mask))
9686 const auto *C = dyn_cast<Constant>(MaskIn);
10937 if (const auto *C = dyn_cast<Constant>(Ops[2]))
12659 ConstantInt *ArgCI = dyn_cast<ConstantInt>(Ops[2]);
12705 ConstantInt *ArgCI = dyn_cast<ConstantInt>(Ops[1]);
12734 ConstantInt *ArgCI = dyn_cast<ConstantInt>(Ops[2]);
12759 ConstantInt *ArgCI = dyn_cast<ConstantInt>(Ops[2]);
tools/clang/lib/CodeGen/CGCUDANV.cpp 282 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Result))
332 llvm::FunctionType *FTy = dyn_cast<llvm::FunctionType>(Ty);
tools/clang/lib/CodeGen/CGCXX.cpp 287 if (const auto *DD = dyn_cast<CXXDestructorDecl>(MD))
tools/clang/lib/CodeGen/CGCall.cpp 314 if (auto *CD = dyn_cast<CXXConstructorDecl>(MD)) {
434 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
577 if (const FunctionProtoType *proto = dyn_cast<FunctionProtoType>(fnType)) {
935 if (const auto *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
961 if (auto CAExp = dyn_cast<ConstantArrayExpansion>(Exp.get())) {
964 if (auto RExp = dyn_cast<RecordExpansion>(Exp.get())) {
982 if (auto CAExp = dyn_cast<ConstantArrayExpansion>(Exp.get())) {
986 } else if (auto RExp = dyn_cast<RecordExpansion>(Exp.get())) {
991 } else if (auto CExp = dyn_cast<ComplexExpansion>(Exp.get())) {
1022 if (auto CAExp = dyn_cast<ConstantArrayExpansion>(Exp.get())) {
1028 } else if (auto RExp = dyn_cast<RecordExpansion>(Exp.get())) {
1059 if (auto CAExp = dyn_cast<ConstantArrayExpansion>(Exp.get())) {
1070 } else if (auto RExp = dyn_cast<RecordExpansion>(Exp.get())) {
1150 if (llvm::StructType *SrcSTy = dyn_cast<llvm::StructType>(SrcTy))
1227 if (llvm::StructType *SrcSTy = dyn_cast<llvm::StructType>(SrcTy)) {
1273 dyn_cast<llvm::StructType>(Val->getType())) {
1303 if (llvm::StructType *DstSTy = dyn_cast<llvm::StructType>(DstTy)) {
1452 llvm::StructType *STy = dyn_cast<llvm::StructType>(AI.getCoerceToType());
1634 llvm::StructType *st = dyn_cast<llvm::StructType>(argType);
1853 if (const FunctionDecl *Fn = dyn_cast<FunctionDecl>(TargetDecl)) {
1858 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Fn);
1913 if (auto *Fn = dyn_cast<FunctionDecl>(TargetDecl)) {
1945 if (const auto *BD = dyn_cast<BlockDecl>(TargetDecl))
2359 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(Arg)) {
2464 llvm::StructType *STy = dyn_cast<llvm::StructType>(ArgI.getCoerceToType());
2576 llvm::BitCastInst *bitcast = dyn_cast<llvm::BitCastInst>(insn);
2602 while (llvm::BitCastInst *bitcast = dyn_cast<llvm::BitCastInst>(generator)) {
2618 llvm::CallInst *call = dyn_cast<llvm::CallInst>(generator);
2655 while (llvm::BitCastInst *bitcast = dyn_cast<llvm::BitCastInst>(result)) {
2685 dyn_cast<llvm::CallInst>(result->stripPointerCasts());
2693 dyn_cast<llvm::LoadInst>(retainedValue->stripPointerCasts());
2736 auto *SI = dyn_cast<llvm::StoreInst>(U);
2758 dyn_cast<llvm::IntrinsicInst>(&*II)) {
2899 if (auto *FD = dyn_cast<FunctionDecl>(CurCodeDecl))
2901 else if (auto *MD = dyn_cast<ObjCMethodDecl>(CurCodeDecl))
2992 if (auto *DD = dyn_cast<DeclaratorDecl>(CurCodeDecl))
3196 if (const UnaryOperator *uop = dyn_cast<UnaryOperator>(E->IgnoreParens()))
3561 = dyn_cast<ObjCIndirectCopyRestoreExpr>(E)) {
3689 auto *CalleeFn = dyn_cast<llvm::Function>(Callee->stripPointerCasts());
4095 dyn_cast<llvm::StructType>(ArgInfo.getCoerceToType());
4241 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(Ptr)) {
4246 llvm::Function *OrigFn = dyn_cast<llvm::Function>(Ptr);
4296 if (auto *VT = dyn_cast<llvm::VectorType>(IRCallArgs[i]->getType()))
4380 if (auto *VT = dyn_cast<llvm::VectorType>(CI->getType()))
4397 if (llvm::CallInst *Call = dyn_cast<llvm::CallInst>(CI)) {
tools/clang/lib/CodeGen/CGClass.cpp 576 auto *CD = dyn_cast<CXXConstructorDecl>(D);
643 CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(MemberInit->getInit());
1051 CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(MemberInit->getInit());
1142 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(S)) {
1146 MemberExpr *ME = dyn_cast<MemberExpr>(BO->getLHS());
1149 FieldDecl *Field = dyn_cast<FieldDecl>(ME->getMemberDecl());
1153 if (ImplicitCastExpr *EC = dyn_cast<ImplicitCastExpr>(RHS))
1157 if (MemberExpr *ME2 = dyn_cast<MemberExpr>(RHS)) {
1162 } else if (CXXMemberCallExpr *MCE = dyn_cast<CXXMemberCallExpr>(S)) {
1163 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(MCE->getCalleeDecl());
1166 MemberExpr *IOA = dyn_cast<MemberExpr>(MCE->getImplicitObjectArgument());
1169 FieldDecl *Field = dyn_cast<FieldDecl>(IOA->getMemberDecl());
1172 MemberExpr *Arg0 = dyn_cast<MemberExpr>(MCE->getArg(0));
1173 if (!Arg0 || Field != dyn_cast<FieldDecl>(Arg0->getMemberDecl()))
1176 } else if (CallExpr *CE = dyn_cast<CallExpr>(S)) {
1177 FunctionDecl *FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
1181 if (ImplicitCastExpr *DC = dyn_cast<ImplicitCastExpr>(DstPtr))
1183 UnaryOperator *DUO = dyn_cast<UnaryOperator>(DstPtr);
1186 MemberExpr *ME = dyn_cast<MemberExpr>(DUO->getSubExpr());
1189 FieldDecl *Field = dyn_cast<FieldDecl>(ME->getMemberDecl());
1193 if (ImplicitCastExpr *SC = dyn_cast<ImplicitCastExpr>(SrcPtr))
1195 UnaryOperator *SUO = dyn_cast<UnaryOperator>(SrcPtr);
1198 MemberExpr *ME2 = dyn_cast<MemberExpr>(SUO->getSubExpr());
1199 if (!ME2 || Field != dyn_cast<FieldDecl>(ME2->getMemberDecl()))
1927 = dyn_cast<llvm::ConstantInt>(numElements);
tools/clang/lib/CodeGen/CGCleanup.cpp 144 EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*it);
155 if (auto *cleanup = dyn_cast<EHCleanupScope>(&*find(si)))
365 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) {
451 auto *AI = dyn_cast<llvm::AllocaInst>(Inst);
460 if (auto *Invoke = dyn_cast<llvm::InvokeInst>(Inst))
526 llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Pred->getTerminator());
587 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) {
tools/clang/lib/CodeGen/CGCoroutine.cpp 133 if (const auto *CE = dyn_cast<CXXMemberCallExpr>(E))
488 auto *GroDeclStmt = dyn_cast<DeclStmt>(S.getResultDecl());
511 if (auto *Cleanup = dyn_cast<EHCleanupScope>(&*b)) {
tools/clang/lib/CodeGen/CGDebugInfo.cpp 187 if (auto *LBF = dyn_cast<llvm::DILexicalBlockFile>(Scope)) {
217 if (const auto *NSDecl = dyn_cast<NamespaceDecl>(Context))
220 if (const auto *RDecl = dyn_cast<RecordDecl>(Context))
283 if (const auto *OID = dyn_cast<ObjCImplementationDecl>(DC)) {
285 } else if (const auto *OID = dyn_cast<ObjCInterfaceDecl>(DC)) {
287 } else if (const auto *OC = dyn_cast<ObjCCategoryDecl>(DC)) {
294 } else if (const auto *OCD = dyn_cast<ObjCCategoryImplDecl>(DC)) {
943 if (const auto *RD = dyn_cast<CXXRecordDecl>(TD))
991 if (auto *TSpecial = dyn_cast<ClassTemplateSpecializationDecl>(RD))
1205 else if (const auto *FPT = dyn_cast<FunctionProtoType>(Ty)) {
1411 const auto *CXXDecl = dyn_cast<CXXRecordDecl>(record);
1424 if (const auto *V = dyn_cast<VarDecl>(I)) {
1447 } else if (const auto *field = dyn_cast<FieldDecl>(I)) {
1456 if (const auto *nestedType = dyn_cast<TypeDecl>(I))
1531 if (const auto *NRD = dyn_cast<CXXRecordDecl>(RD->getDeclContext()))
1586 const auto *DD = dyn_cast<CXXDestructorDecl>(Method);
1617 if (const auto *CXXC = dyn_cast<CXXConstructorDecl>(Method)) {
1620 } else if (const auto *CXXC = dyn_cast<CXXConversionDecl>(Method)) {
1652 const auto *Method = dyn_cast<CXXMethodDecl>(I);
1778 if (const auto *VD = dyn_cast<VarDecl>(D))
1782 else if ((MD = dyn_cast<CXXMethodDecl>(D)) && MD->isInstance())
1784 else if (const auto *FD = dyn_cast<FunctionDecl>(D))
1789 dyn_cast<MemberPointerType>(T.getTypePtr())) {
1810 if (const auto *MPT = dyn_cast<MemberPointerType>(T.getTypePtr()))
1873 auto *TS = dyn_cast<VarTemplateSpecializationDecl>(VL);
1961 if (const auto *VTpl = dyn_cast<VarTemplateSpecializationDecl>(VD)) {
2101 if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) {
2111 if (auto *TD = dyn_cast<ClassTemplateSpecializationDecl>(CXXDecl))
2126 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD))
2181 const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
2197 if (const auto *SD = dyn_cast<ClassTemplateSpecializationDecl>(RD))
2249 if (const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD))
2264 const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
2633 if (const auto *VAT = dyn_cast<VariableArrayType>(Ty)) {
2666 if (const auto *CAT = dyn_cast<ConstantArrayType>(Ty))
2668 else if (const auto *VAT = dyn_cast<VariableArrayType>(Ty)) {
3140 if (auto CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
3187 if (const auto *TSpecial = dyn_cast<ClassTemplateSpecializationDecl>(RD))
3406 if (const auto *TD = dyn_cast<TypeDecl>(D))
3420 if (const auto *FD = dyn_cast<FunctionDecl>(D))
3422 else if (const auto *VD = dyn_cast<VarDecl>(D))
3432 const auto *FD = dyn_cast<FunctionDecl>(D);
3441 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD->getCanonicalDecl())) {
3473 if (const auto *Method = dyn_cast<CXXMethodDecl>(D))
3479 if (const auto *OMethod = dyn_cast<ObjCMethodDecl>(D)) {
3519 if (const auto *FD = dyn_cast<FunctionDecl>(D))
3556 } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
3569 } else if (const auto *OMD = dyn_cast<ObjCMethodDecl>(D)) {
3627 if (auto *FD = dyn_cast<FunctionDecl>(D))
3677 } else if (const auto *OMD = dyn_cast<ObjCMethodDecl>(D)) {
3951 if (const auto *IPD = dyn_cast<ImplicitParamDecl>(VD)) {
4037 if (auto *PD = dyn_cast<ParmVarDecl>(VD))
4109 if (const auto *IPD = dyn_cast<ImplicitParamDecl>(VD))
4279 else if (auto *RDecl = dyn_cast<CXXRecordDecl>(blockDecl->getParent()))
4453 if (const auto *ECD = dyn_cast<EnumConstantDecl>(VD)) {
4484 auto *VarD = dyn_cast<VarDecl>(VD);
4566 if (const auto *FD = dyn_cast<FunctionDecl>(USD.getUnderlyingDecl()))
4603 dyn_cast<NamespaceAliasDecl>(NA.getAliasedNamespace()))
tools/clang/lib/CodeGen/CGDecl.cpp 137 if (auto *DD = dyn_cast<DecompositionDecl>(&VD))
203 if (auto *CD = dyn_cast<CapturedDecl>(DC))
205 if (const auto *FD = dyn_cast<FunctionDecl>(DC))
207 else if (const auto *BD = dyn_cast<BlockDecl>(DC))
209 else if (const auto *OMD = dyn_cast<ObjCMethodDecl>(DC))
288 if (const auto *CD = dyn_cast<CXXConstructorDecl>(DC))
290 else if (const auto *DD = dyn_cast<CXXDestructorDecl>(DC))
292 else if (const auto *FD = dyn_cast<FunctionDecl>(DC))
632 if (const Expr *e = dyn_cast<Expr>(s)) {
637 if (const DeclRefExpr *ref = dyn_cast<DeclRefExpr>(e))
639 if (const BlockExpr *be = dyn_cast<BlockExpr>(e)) {
667 while (auto castExpr = dyn_cast<CastExpr>(init->IgnoreParens())) {
752 if (const CXXDefaultInitExpr *DIE = dyn_cast<CXXDefaultInitExpr>(init))
757 if (const FullExpr *fe = dyn_cast<FullExpr>(init)) {
882 dyn_cast<llvm::ConstantDataSequential>(Init)) {
911 dyn_cast<llvm::ConstantDataSequential>(Init)) {
1043 if (const auto STy = dyn_cast<llvm::StructType>(OrigTy))
1045 if (auto *STy = dyn_cast<llvm::SequentialType>(OrigTy)) {
1081 if (const auto *FD = dyn_cast<FunctionDecl>(DC)) {
1082 if (const auto *CC = dyn_cast<CXXConstructorDecl>(FD))
1084 if (const auto *CD = dyn_cast<CXXDestructorDecl>(FD))
1087 } else if (const auto *OM = dyn_cast<ObjCMethodDecl>(DC)) {
1190 if (auto *STy = dyn_cast<llvm::StructType>(Ty)) {
1201 } else if (auto *ATy = dyn_cast<llvm::ArrayType>(Ty)) {
1323 if (auto *C = dyn_cast<llvm::ConstantInt>(VlaSize.NumElts))
1350 if (auto *C = dyn_cast<llvm::ConstantInt>(VlaSize.NumElts))
1454 const auto *CXXRD = dyn_cast<CXXRecordDecl>(RD);
1588 if (const Expr *E = dyn_cast<Expr>(S))
1603 if (const BlockExpr *BE = dyn_cast<BlockExpr>(E)) {
1614 if (const StmtExpr *SE = dyn_cast<StmtExpr>(E)) {
1617 if (const auto *BIE = dyn_cast<Expr>(BI)) {
1621 else if (const auto *DS = dyn_cast<DeclStmt>(BI)) {
1624 if (const auto *VD = dyn_cast<VarDecl>((I))) {
1651 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init))
1896 else if (auto *FD = dyn_cast<FieldDecl>(D))
2118 if (llvm::ConstantInt *constLength = dyn_cast<llvm::ConstantInt>(length)) {
2356 if (auto IPD = dyn_cast<ImplicitParamDecl>(&D)) {
tools/clang/lib/CodeGen/CGDeclCXX.cpp 251 if (auto *dtorFn = dyn_cast<llvm::Function>(
277 if (llvm::Function *atexitFn = dyn_cast<llvm::Function>(atexit.getCallee()))
746 if (llvm::Function *F = dyn_cast<llvm::Function>(Callee))
tools/clang/lib/CodeGen/CGException.cpp 264 if (llvm::GlobalVariable *GV = dyn_cast<llvm::GlobalVariable>(Val))
291 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(U)) {
299 llvm::Function *F = dyn_cast<llvm::Function>(U);
1682 const auto *D = dyn_cast<VarDecl>(E->getDecl());
1716 if (auto *ParentAlloca = dyn_cast<llvm::AllocaInst>(ParentVar.getPointer())) {
tools/clang/lib/CodeGen/CGExpr.cpp 432 if (auto *Var = dyn_cast<llvm::GlobalVariable>(Object.getPointer())) {
479 if (const auto *opaque = dyn_cast<OpaqueValueExpr>(E)) {
489 if (auto *Var = dyn_cast<llvm::GlobalVariable>(
680 auto PtrToAlloca = dyn_cast<llvm::AllocaInst>(Ptr->stripPointerCasts());
720 llvm::Constant *ConstantSize = dyn_cast<llvm::Constant>(Size);
862 if (const auto *CAT = dyn_cast<ConstantArrayType>(AT)) {
871 if (const auto *ME = dyn_cast<MemberExpr>(E)) {
874 if (const auto *FD = dyn_cast<FieldDecl>(ME->getMemberDecl())) {
879 } else if (const auto *IRE = dyn_cast<ObjCIvarRefExpr>(E)) {
893 auto *ArrayDeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts());
897 auto *ParamDecl = dyn_cast<ParmVarDecl>(ArrayDeclRef->getDecl());
937 if (const auto *CE = dyn_cast<CastExpr>(Base)) {
942 if (const auto *CAT = dyn_cast<ConstantArrayType>(AT))
944 else if (const auto *VAT = dyn_cast<VariableArrayType>(AT))
1045 if (const CastExpr *CE = dyn_cast<CastExpr>(E)) {
1046 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(CE))
1127 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
1191 if (const auto *CE = dyn_cast<CastExpr>(Base)) {
1193 } else if (const auto *PE = dyn_cast<ParenExpr>(Base)) {
1195 } else if (const auto *UO = dyn_cast<UnaryOperator>(Base)) {
1215 if (const auto *ME = dyn_cast<MemberExpr>(E)) {
1394 if (const auto *RD = dyn_cast<CXXRecordDecl>(RT->getDecl()))
1440 } else if (auto *var = dyn_cast<VarDecl>(value)) {
1497 if (auto *VD = dyn_cast<VarDecl>(ME->getMemberDecl())) {
1725 auto *VecTy = dyn_cast<llvm::VectorType>(SrcTy);
2212 if (const auto *Exp = dyn_cast<DeclRefExpr>(E)) {
2213 if (const auto *VD = dyn_cast<VarDecl>(Exp->getDecl())) {
2223 if (const auto *Exp = dyn_cast<UnaryOperator>(E)) {
2228 if (const auto *Exp = dyn_cast<ParenExpr>(E)) {
2242 if (const auto *Exp = dyn_cast<GenericSelectionExpr>(E)) {
2247 if (const auto *Exp = dyn_cast<ImplicitCastExpr>(E)) {
2252 if (const auto *Exp = dyn_cast<CStyleCastExpr>(E)) {
2257 if (const auto *Exp = dyn_cast<ObjCBridgedCastExpr>(E)) {
2262 if (const auto *Exp = dyn_cast<ArraySubscriptExpr>(E)) {
2275 if (const auto *Exp = dyn_cast<MemberExpr>(E)) {
2521 if (const auto *VD = dyn_cast<VarDecl>(ND)) {
2604 if (const auto *VD = dyn_cast<VarDecl>(ND)) {
2666 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
2672 if (const auto *BD = dyn_cast<BindingDecl>(ND))
3353 const auto *CE = dyn_cast<CastExpr>(E);
3386 if (auto constantIdx = dyn_cast<llvm::ConstantInt>(idx)) {
3430 auto LastIndex = dyn_cast<llvm::ConstantInt>(indices.back());
3573 if (const auto *ASE = dyn_cast<ArraySubscriptExpr>(Array))
3613 if (auto *ASE = dyn_cast<OMPArraySectionExpr>(Base->IgnoreParenImpCasts())) {
3775 if (const auto *ASE = dyn_cast<ArraySubscriptExpr>(Array))
3884 if (auto *Field = dyn_cast<FieldDecl>(ND)) {
3890 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
4061 if (auto *ClassDef = dyn_cast<CXXRecordDecl>(rec)) {
4196 if (auto *ThrowExpr = dyn_cast<CXXThrowExpr>(Operand->IgnoreParens())) {
4514 if (const auto *CE = dyn_cast<CXXMemberCallExpr>(E))
4517 if (const auto *CE = dyn_cast<CUDAKernelCallExpr>(E))
4520 if (const auto *CE = dyn_cast<CXXOperatorCallExpr>(E))
4559 if (auto ICE = dyn_cast<ImplicitCastExpr>(E)) {
4566 } else if (auto DRE = dyn_cast<DeclRefExpr>(E)) {
4567 if (auto FD = dyn_cast<FunctionDecl>(DRE->getDecl())) {
4570 } else if (auto ME = dyn_cast<MemberExpr>(E)) {
4571 if (auto FD = dyn_cast<FunctionDecl>(ME->getMemberDecl())) {
4577 } else if (auto NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
4581 } else if (auto PDE = dyn_cast<CXXPseudoDestructorExpr>(E)) {
4888 if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(E)) {
4907 EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), E->arguments(),
5031 if (const auto *ov = dyn_cast<OpaqueValueExpr>(semantic)) {
tools/clang/lib/CodeGen/CGExprAgg.cpp 454 if (auto *ILE = dyn_cast<InitListExpr>(E)) {
670 if (CastExpr *castE = dyn_cast<CastExpr>(op)) {
681 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
1079 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
1080 const VarDecl *var = dyn_cast<VarDecl>(DRE->getDecl());
1087 if (const BinaryOperator *op = dyn_cast<BinaryOperator>(E)) {
1102 = dyn_cast<AbstractConditionalOperator>(E)) {
1108 = dyn_cast<OpaqueValueExpr>(E)) {
1116 } else if (const CastExpr *cast = dyn_cast<CastExpr>(E)) {
1123 } else if (const UnaryOperator *uop = dyn_cast<UnaryOperator>(E)) {
1127 } else if (const MemberExpr *mem = dyn_cast<MemberExpr>(E)) {
1131 } else if (const ArraySubscriptExpr *sub = dyn_cast<ArraySubscriptExpr>(E)) {
1365 if (const IntegerLiteral *IL = dyn_cast<IntegerLiteral>(E))
1368 if (const FloatingLiteral *FL = dyn_cast<FloatingLiteral>(E))
1375 if (const CastExpr *ICE = dyn_cast<CastExpr>(E))
1380 if (const CharacterLiteral *CL = dyn_cast<CharacterLiteral>(E))
1512 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(record)) {
1620 dyn_cast<llvm::GetElementPtrInst>(LV.getPointer()))
1658 ArrayInitLoopExpr *InnerLoop = dyn_cast<ArrayInitLoopExpr>(E->getSubExpr());
1754 const InitListExpr *ILE = dyn_cast<InitListExpr>(E);
1756 ILE = dyn_cast<InitListExpr>(ILE->getInit(0));
1769 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(SD))
tools/clang/lib/CodeGen/CGExprCXX.cpp 248 if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(CE)) {
267 if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(MD)) {
306 if (const auto *Dtor = dyn_cast<CXXDestructorDecl>(CalleeDecl))
323 if (const auto *CMCE = dyn_cast<CXXMemberCallExpr>(CE)) {
343 if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(CalleeDecl)) {
640 if (const ExprWithCleanups *E = dyn_cast<ExprWithCleanups>(Exp))
733 dyn_cast<llvm::ConstantInt>(numElements)) {
1013 if (const InitListExpr *ILE = dyn_cast<InitListExpr>(Init)) {
1042 llvm::ConstantInt *ConstNum = dyn_cast<llvm::ConstantInt>(NumElements);
1107 auto *SubILE = dyn_cast<InitListExpr>(Init);
1120 llvm::ConstantInt *ConstNum = dyn_cast<llvm::ConstantInt>(NumElements);
1132 if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init)) {
1180 if (auto *ILE = dyn_cast<InitListExpr>(Init))
1186 if (auto *ILE = dyn_cast<InitListExpr>(Init)) {
1190 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RType->getDecl()))
1302 llvm::Function *Fn = dyn_cast<llvm::Function>(CalleePtr);
1323 if (auto *FD = dyn_cast<FunctionDecl>(Decl))
1544 const InitListExpr *ILE = dyn_cast<InitListExpr>(E->getInitializer());
2074 if (const auto *CE = dyn_cast<CastExpr>(E)) {
2080 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(E))
2083 if (const auto *BO = dyn_cast<BinaryOperator>(E))
2087 if (const auto *ACO = dyn_cast<AbstractConditionalOperator>(E))
2096 if (const auto *UO = dyn_cast<UnaryOperator>(E))
tools/clang/lib/CodeGen/CGExprComplex.cpp 178 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
tools/clang/lib/CodeGen/CGExprConstant.cpp 253 auto *CI = dyn_cast<llvm::ConstantInt>(ToUpdate);
319 if (auto *CA = dyn_cast<llvm::ConstantAggregate>(C)) {
323 if (auto *Seq = dyn_cast<llvm::SequentialType>(CA->getType())) {
345 if (auto *CDS = dyn_cast<llvm::ConstantDataSequential>(C)) {
401 if (llvm::ArrayType *ATy = dyn_cast<llvm::ArrayType>(DesiredTy)) {
487 if (llvm::StructType *DesiredSTy = dyn_cast<llvm::StructType>(DesiredTy)) {
517 auto *STy = dyn_cast<llvm::StructType>(DesiredTy);
645 } else if (InitListExpr *ChildILE = dyn_cast<InitListExpr>(Init)) {
671 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD))
700 if (auto *SubILE = dyn_cast<InitListExpr>(Init)) {
731 if (auto *CI = dyn_cast<llvm::ConstantInt>(EltInit)) {
766 if (const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD)) {
866 const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD);
1029 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
1499 if (auto agg = dyn_cast<llvm::ConstantAggregate>(init)) {
1521 if (auto expr = dyn_cast<llvm::ConstantExpr>(init)) {
1870 if (auto FD = dyn_cast<FunctionDecl>(D))
1873 if (auto VD = dyn_cast<VarDecl>(D)) {
2178 if (const CXXMethodDecl *method = dyn_cast<CXXMethodDecl>(decl))
2202 auto CXXR = dyn_cast<CXXRecordDecl>(record);
tools/clang/lib/CodeGen/CGExprScalar.cpp 97 auto *LHSCI = dyn_cast<llvm::ConstantInt>(LHS);
98 auto *RHSCI = dyn_cast<llvm::ConstantInt>(RHS);
116 if (auto *CI = dyn_cast<llvm::ConstantInt>(RHS))
124 if (auto *CFP = dyn_cast<llvm::ConstantFP>(RHS))
136 if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) {
183 if (const auto *UO = dyn_cast<UnaryOperator>(Op.E))
221 if (auto *I = dyn_cast<llvm::Instruction>(V)) {
267 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) {
402 if (llvm::ZExtInst *ZI = dyn_cast<llvm::ZExtInst>(V)) {
1259 if (auto DstPT = dyn_cast<llvm::PointerType>(DstTy)) {
1544 const UnaryOperator *UO = dyn_cast<UnaryOperator>(Info.E);
1785 dyn_cast<llvm::VectorType>(ConvertType(E->getType()));
1811 llvm::VectorType *VVT = dyn_cast<llvm::VectorType>(Init->getType());
1944 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(CE)) {
2030 if (llvm::CallInst *CI = dyn_cast<llvm::CallInst>(Src))
2235 if (auto *ICE = dyn_cast<ImplicitCastExpr>(CE)) {
3326 if (auto *LHSBinOp = dyn_cast<llvm::BinaryOperator>(op.LHS)) {
3331 if (auto *RHSBinOp = dyn_cast<llvm::BinaryOperator>(op.RHS)) {
3583 if (llvm::VectorType *VT = dyn_cast<llvm::VectorType>(LHS->getType()))
4600 if (auto *LHSCI = dyn_cast<llvm::ConstantInt>(LHS)) {
4601 if (auto *RHSCI = dyn_cast<llvm::ConstantInt>(RHS)) {
tools/clang/lib/CodeGen/CGLoopInfo.cpp 580 const LoopHintAttr *LH = dyn_cast<LoopHintAttr>(Attr);
582 dyn_cast<OpenCLUnrollHintAttr>(Attr);
tools/clang/lib/CodeGen/CGObjC.cpp 121 const ObjCArrayLiteral *ALE = dyn_cast<ObjCArrayLiteral>(E);
293 if (auto opaque = dyn_cast<OpaqueValueExpr>(receiver)) {
298 const ImplicitCastExpr *ice = dyn_cast<ImplicitCastExpr>(receiver);
303 if (auto opaque = dyn_cast<OpaqueValueExpr>(receiver)) {
317 const DeclRefExpr *declRef = dyn_cast<DeclRefExpr>(ice->getSubExpr());
319 const VarDecl *var = dyn_cast<VarDecl>(declRef->getDecl());
346 if (auto CE = dyn_cast<CastExpr>(E)) {
452 dyn_cast<ObjCMessageExpr>(OME->getInstanceReceiver()->IgnoreParenCasts());
981 if (const CXXConstructExpr *construct = dyn_cast<CXXConstructExpr>(getter))
1120 if (llvm::CallInst *call = dyn_cast<llvm::CallInst>(CallInstruction))
1292 if (CallExpr *call = dyn_cast<CallExpr>(setter)) {
1640 if (const DeclStmt *SD = dyn_cast<DeclStmt>(S.getElement()))
1791 if (const DeclStmt *SD = dyn_cast<DeclStmt>(S.getElement())) {
1964 if (auto *F = dyn_cast<llvm::Function>(RTF)) {
2094 if (llvm::Function *f = dyn_cast<llvm::Function>(fn.getCallee()))
2643 if (llvm::Function *f = dyn_cast<llvm::Function>(fn.getCallee()))
2753 if (const auto *decl_expr = dyn_cast<DeclRefExpr>(e)) {
2772 if (llvm::CallInst *call = dyn_cast<llvm::CallInst>(value)) {
2782 } else if (llvm::InvokeInst *invoke = dyn_cast<llvm::InvokeInst>(value)) {
2795 } else if (llvm::BitCastInst *bitcast = dyn_cast<llvm::BitCastInst>(value)) {
2860 if (const CastExpr *cast = dyn_cast<CastExpr>(e)) {
2938 if (const OpaqueValueExpr *ov = dyn_cast<OpaqueValueExpr>(semantic)) {
3102 if (const CastExpr *ce = dyn_cast<CastExpr>(e)) {
3106 } else if (auto op = dyn_cast<BinaryOperator>(e)) {
3121 } else if (const PseudoObjectExpr *pseudo = dyn_cast<PseudoObjectExpr>(e)) {
3123 } else if (auto *be = dyn_cast<BlockExpr>(e))
3242 if (const ExprWithCleanups *cleanups = dyn_cast<ExprWithCleanups>(e)) {
3258 if (const ExprWithCleanups *cleanups = dyn_cast<ExprWithCleanups>(e)) {
3369 if (const ExprWithCleanups *cleanups = dyn_cast<ExprWithCleanups>(e)) {
tools/clang/lib/CodeGen/CGObjCGNU.cpp 768 if (auto *LookupFn2 = dyn_cast<llvm::Function>(LookupFn.getCallee()))
1229 if ((OID = dyn_cast<ObjCInterfaceDecl>(Result)))
2292 if (auto *ClassSymbol = dyn_cast<llvm::GlobalVariable>(Value))
2300 if (auto *ClassSymbol = dyn_cast<llvm::GlobalVariable>(Value)) {
2307 if ((VD = dyn_cast<VarDecl>(Result)))
3304 if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD))
3328 if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD))
3331 else if (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(OCD))
3615 dyn_cast<llvm::StructType>(SelectorTy->getElementType());
3856 dyn_cast<ObjCCategoryImplDecl>(OMD->getDeclContext());
tools/clang/lib/CodeGen/CGObjCMac.cpp 2181 if (auto LI = dyn_cast<llvm::LoadInst>(Arg0->stripPointerCasts())) {
3259 if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD))
3278 if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD)) {
3282 else if (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(OCD)) {
5551 dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext()))
6360 if ((VD = dyn_cast<VarDecl>(Result)))
tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp 135 if (auto DR = dyn_cast<DeclRefExpr>(E)) {
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp 793 if (const auto *CE = dyn_cast<CallExpr>(ReductionOp))
794 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(CE->getCallee()))
796 dyn_cast<DeclRefExpr>(OVE->getSourceExpr()->IgnoreImpCasts()))
797 if (const auto *DRD = dyn_cast<OMPDeclareReductionDecl>(DRE->getDecl()))
949 if (const auto *OASE = dyn_cast<OMPArraySectionExpr>(E))
1154 if (const auto *OASE = dyn_cast<OMPArraySectionExpr>(Ref)) {
1156 while (const auto *TempOASE = dyn_cast<OMPArraySectionExpr>(Base))
1158 while (const auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
1162 } else if (const auto *ASE = dyn_cast<ArraySubscriptExpr>(Ref)) {
1164 while (const auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
1447 if (const auto *OPD = dyn_cast<OMPParallelDirective>(&D))
1449 else if (const auto *OPSD = dyn_cast<OMPParallelSectionsDirective>(&D))
1451 else if (const auto *OPFD = dyn_cast<OMPParallelForDirective>(&D))
1453 else if (const auto *OPFD = dyn_cast<OMPTargetParallelForDirective>(&D))
1455 else if (const auto *OPFD = dyn_cast<OMPDistributeParallelForDirective>(&D))
1458 dyn_cast<OMPTeamsDistributeParallelForDirective>(&D))
1461 dyn_cast<OMPTargetTeamsDistributeParallelForDirective>(&D))
1510 const auto *TD = dyn_cast<OMPTaskDirective>(&D);
1786 if (auto *F = dyn_cast<llvm::Function>(RTLFn.getCallee())) {
2224 if (auto *F = dyn_cast<llvm::Function>(RTLFn.getCallee())) {
4155 dyn_cast<OffloadEntriesInfoManagerTy::OffloadEntryInfoTargetRegion>(
4171 } else if (const auto *CE = dyn_cast<OffloadEntriesInfoManagerTy::
5233 dyn_cast<OMPArraySectionExpr>(E->IgnoreParenImpCasts())) {
5542 if (const auto *CE = dyn_cast<CallExpr>(ReductionOp))
5543 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(CE->getCallee()))
5545 dyn_cast<DeclRefExpr>(OVE->getSourceExpr()->IgnoreImpCasts()))
5547 dyn_cast<OMPDeclareReductionDecl>(DRE->getDecl())) {
5865 if (const auto *BO = dyn_cast<BinaryOperator>(E)) {
5875 if (const auto *ACO = dyn_cast<AbstractConditionalOperator>(
5882 dyn_cast<BinaryOperator>(RHSExpr->IgnoreParenImpCasts())) {
6554 if (const auto *E = dyn_cast<Expr>(S)) {
6563 if (const auto *DS = dyn_cast<DeclStmt>(S)) {
6572 const auto *VD = dyn_cast<VarDecl>(D);
7180 if (const auto *OAE = dyn_cast<OMPArraySectionExpr>(E)) {
7279 const auto *OASE = dyn_cast<OMPArraySectionExpr>(E);
7298 if (const auto *ATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr()))
7502 const auto *AE = dyn_cast<ArraySubscriptExpr>(AssocExpr);
7503 const auto *OASE = dyn_cast<OMPArraySectionExpr>(AssocExpr);
7572 EncounteredME = dyn_cast<MemberExpr>(I->getAssociatedExpression());
7594 dyn_cast<OMPArraySectionExpr>(I->getAssociatedExpression());
7618 (dyn_cast<MemberExpr>(I->getAssociatedExpression()) ==
7723 const auto *FD = dyn_cast<FieldDecl>(EncounteredME->getMemberDecl());
8445 const auto *VD = dyn_cast<VarDecl>(L.first);
9561 if (const auto *E = dyn_cast<OMPExecutableDirective>(S)) {
9571 if (const auto *L = dyn_cast<LambdaExpr>(S))
9583 if (const auto *FD = dyn_cast<FunctionDecl>(GD.getDecl())) {
9596 if (const auto *FD = dyn_cast<FunctionDecl>(VD)) {
10272 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
10914 if (auto *Fn = dyn_cast<llvm::Function>(Callee.getCallee())) {
10930 if (const auto *FD = dyn_cast<FunctionDecl>(D))
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp 208 if (const auto *ASE = dyn_cast<ArraySubscriptExpr>(RefExpr)) {
210 while (const auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
213 } else if (auto *OASE = dyn_cast<OMPArraySectionExpr>(RefExpr)) {
215 while (const auto *TempOASE = dyn_cast<OMPArraySectionExpr>(Base))
217 while (const auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
222 if (const auto *DE = dyn_cast<DeclRefExpr>(RefExpr))
370 if (const auto *VarD = dyn_cast<VarDecl>(VD)) {
400 if (const auto *PC = dyn_cast<OMPFirstprivateClause>(C))
402 else if (const auto *PC = dyn_cast<OMPLastprivateClause>(C))
536 else if (const auto *VarD = dyn_cast<VarDecl>(VD))
4668 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
4670 } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {
4672 } else if (const auto *CD = dyn_cast<CapturedDecl>(D)) {
tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp 219 RD(dyn_cast<CXXRecordDecl>(D)),
tools/clang/lib/CodeGen/CGStmt.cpp 76 if (const auto *D = dyn_cast<OMPExecutableDirective>(S)) {
409 if (const auto *LS = dyn_cast<LabelStmt>(ExprResult)) {
412 } else if (const auto *AS = dyn_cast<AttributedStmt>(ExprResult)) {
444 llvm::BranchInst *BI = dyn_cast<llvm::BranchInst>(BB->getTerminator());
505 if (llvm::Instruction *insn = dyn_cast<llvm::Instruction>(u)) {
748 if (llvm::ConstantInt *C = dyn_cast<llvm::ConstantInt>(BoolCondVal))
836 if (llvm::ConstantInt *C = dyn_cast<llvm::ConstantInt>(BoolCondVal))
1312 const CaseStmt *NextCase = dyn_cast<CaseStmt>(S.getSubStmt());
1328 NextCase = dyn_cast<CaseStmt>(CurCase->getSubStmt());
1387 if (const SwitchCase *SC = dyn_cast<SwitchCase>(S)) {
1406 if (const CompoundStmt *CS = dyn_cast<CompoundStmt>(S)) {
1545 if (const DefaultStmt *DS = dyn_cast<DefaultStmt>(Case)) {
1709 auto *Call = dyn_cast<CallExpr>(S.getCond());
1790 const DeclRefExpr *AsmDeclRef = dyn_cast<DeclRefExpr>(&AsmExpr);
1794 const VarDecl *Variable = dyn_cast<VarDecl>(&Value);
1931 if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(&S))
1971 if (const GCCAsmStmt *GAS = dyn_cast<GCCAsmStmt>(&S))
1981 if (const GCCAsmStmt *GAS = dyn_cast<GCCAsmStmt>(&S))
2086 if (auto *VT = dyn_cast<llvm::VectorType>(ResultRegTypes.back()))
2111 if (auto *VT = dyn_cast<llvm::VectorType>(Arg->getType()))
2198 if (auto *VT = dyn_cast<llvm::VectorType>(Arg->getType()))
2218 if (const auto *GS = dyn_cast<GCCAsmStmt>(&S)) {
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp 150 if (auto *For = dyn_cast<ForStmt>(Body)) {
205 } else if (const auto *UDP = dyn_cast<OMPUseDevicePtrClause>(C)) {
208 if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(D))
215 if (const auto *TG = dyn_cast<OMPTaskgroupDirective>(&S)) {
237 CS = dyn_cast<CapturedStmt>(CS->getCapturedStmt());
250 if (const auto *OrigDRE = dyn_cast<DeclRefExpr>(E)) {
251 if (const auto *OrigVD = dyn_cast<VarDecl>(OrigDRE->getDecl())) {
353 if (const auto *VLA = dyn_cast<VariableArrayType>(A))
704 const auto *BO = dyn_cast<BinaryOperator>(Copy);
1049 if (const auto *LoopDirective = dyn_cast<OMPLoopDirective>(&D)) {
1376 if (auto *For = dyn_cast<ForStmt>(Body)) {
1452 dyn_cast<DeclRefExpr>(VD->getInit()->IgnoreImpCasts())) {
1721 const auto *CED = dyn_cast<OMPCapturedExprDecl>(OrigVD);
1814 if (const auto *LIExpr = dyn_cast<DeclRefExpr>(S.getLastIteration())) {
2227 if (const auto *D = dyn_cast<OMPTeamsDistributeParallelForDirective>(&S))
2229 else if (const auto *D = dyn_cast<OMPDistributeParallelForDirective>(&S))
2232 dyn_cast<OMPTargetTeamsDistributeParallelForDirective>(&S))
2324 if (const auto *LIExpr = dyn_cast<DeclRefExpr>(S.getLastIteration())) {
2609 const auto *CS = dyn_cast<CompoundStmt>(CapturedStmt);
2732 if (auto *OSD = dyn_cast<OMPSectionsDirective>(&S))
2734 else if (auto *OPSD = dyn_cast<OMPParallelSectionsDirective>(&S))
3384 if (const auto *LIExpr = dyn_cast<DeclRefExpr>(S.getLastIteration())) {
3831 if (auto *IC = dyn_cast<llvm::ConstantInt>(UpdateVal)) {
4093 if (const auto *FE = dyn_cast<FullExpr>(CS))
4096 if (const auto *Compound = dyn_cast<CompoundStmt>(CS)) {
4098 if (const auto *FE = dyn_cast<FullExpr>(C))
4164 if (const auto *D = dyn_cast<CXXConstructorDecl>(CGF.CurFuncDecl))
4166 else if (const auto *D = dyn_cast<CXXDestructorDecl>(CGF.CurFuncDecl))
4648 if (const auto *OED = dyn_cast<OMPCapturedExprDecl>(MatchingVD)) {
5050 if (const auto *LIExpr = dyn_cast<DeclRefExpr>(S.getLastIteration())) {
5181 if (const auto *LD = dyn_cast<OMPLoopDirective>(&D)) {
5183 const auto *VD = dyn_cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl());
5201 if (const auto *VD = dyn_cast<OMPCapturedExprDecl>(
tools/clang/lib/CodeGen/CGVTables.cpp 130 if (auto *DII = dyn_cast<llvm::DbgVariableIntrinsic>(&I)) {
376 else if (llvm::CallInst* Call = dyn_cast<llvm::CallInst>(CallOrInvoke))
498 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD))
683 if (auto f = dyn_cast<llvm::Function>(fn))
1030 if (auto *ND = dyn_cast<NamespaceDecl>(D))
tools/clang/lib/CodeGen/CodeGenABITypes.cpp 71 if (auto FT = dyn_cast<llvm::FunctionType>(T))
tools/clang/lib/CodeGen/CodeGenAction.cpp 699 if (auto *ORA = dyn_cast<llvm::OptimizationRemarkAnalysis>(&D))
tools/clang/lib/CodeGen/CodeGenFunction.cpp 266 dyn_cast<llvm::BranchInst>(*ReturnBlock.getBlock()->user_begin());
433 if (auto *VT = dyn_cast<llvm::VectorType>(A.getType()))
438 if (auto *VT = dyn_cast<llvm::VectorType>(CurFn->getReturnType()))
457 auto *RetAlloca = dyn_cast<llvm::AllocaInst>(ReturnValue.getPointer());
632 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
736 if (const auto *FD = dyn_cast<FunctionDecl>(D))
1020 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD))
1041 if (const CompoundStmt *S = dyn_cast<CompoundStmt>(Body))
1090 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
1103 if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(FD))
1135 if (const auto *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl()))
1372 if (const BinaryOperator *CondBOp = dyn_cast<BinaryOperator>(Cond)) {
1472 if (const UnaryOperator *CondUOp = dyn_cast<UnaryOperator>(Cond)) {
1483 if (const ConditionalOperator *CondOp = dyn_cast<ConditionalOperator>(Cond)) {
1523 if (const CXXThrowExpr *Throw = dyn_cast<CXXThrowExpr>(Cond)) {
1537 auto *Call = dyn_cast<CallExpr>(Cond->IgnoreImpCasts());
1761 dyn_cast<llvm::ArrayType>(addr.getElementType());
1772 dyn_cast<llvm::ArrayType>(llvmArrayType->getElementType());
2064 if (auto *CE = dyn_cast<CastExpr>(E))
tools/clang/lib/CodeGen/CodeGenFunction.h 441 if (const auto *FD = dyn_cast<FunctionDecl>(CalleeDecl))
446 if (const auto *FD = dyn_cast<FunctionDecl>(CalleeDecl))
3999 if (const auto *EWC = dyn_cast<ExprWithCleanups>(E))
4221 if (const ObjCInterfaceDecl *classDecl= dyn_cast<ObjCInterfaceDecl>(dc)) {
4225 if (const ObjCCategoryDecl *catDecl = dyn_cast<ObjCCategoryDecl>(dc)) {
tools/clang/lib/CodeGen/CodeGenModule.cpp 237 auto *NewF = dyn_cast<llvm::Function>(Replacement);
239 if (auto *Alias = dyn_cast<llvm::GlobalAlias>(Replacement)) {
240 NewF = dyn_cast<llvm::Function>(Alias->getAliasee());
245 NewF = dyn_cast<llvm::Function>(CE->getOperand(0));
282 if (auto *GO = dyn_cast<llvm::GlobalObject>(C))
285 auto *GIS2 = dyn_cast<llvm::GlobalIndirectSymbol>(C);
321 llvm::FunctionType *FTy = dyn_cast<llvm::FunctionType>(
330 if (auto CE = dyn_cast<llvm::ConstantExpr>(Aliasee))
347 if (auto GA = dyn_cast<llvm::GlobalIndirectSymbol>(AliaseeGV)) {
363 auto *Alias = dyn_cast<llvm::GlobalIndirectSymbol>(Entry);
839 if (auto *Var = dyn_cast<llvm::GlobalVariable>(GV))
860 const auto *D = dyn_cast<NamedDecl>(GD.getDecl());
882 setGVPropertiesAux(GV, dyn_cast<NamedDecl>(GD.getDecl()));
993 if (const auto *D = dyn_cast<CXXConstructorDecl>(ND))
995 else if (const auto *D = dyn_cast<CXXDestructorDecl>(ND))
1002 const auto *FD = dyn_cast<FunctionDecl>(ND);
1013 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
1078 if (const auto *CD = dyn_cast<CXXConstructorDecl>(CanonicalGD.getDecl())) {
1097 if (auto *FD = dyn_cast<FunctionDecl>(GD.getDecl()))
1115 else if (const auto *CD = dyn_cast<CXXConstructorDecl>(D))
1117 else if (const auto *DD = dyn_cast<CXXDestructorDecl>(D))
1194 if (const auto *Dtor = dyn_cast<CXXDestructorDecl>(D))
1210 llvm::MDString *MDS = dyn_cast<llvm::MDString>(MD);
1556 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
1616 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
1627 auto *MD = dyn_cast<CXXMethodDecl>(D);
1711 if (auto *GV = dyn_cast<llvm::GlobalVariable>(GO)) {
1722 if (auto *F = dyn_cast<llvm::Function>(GO)) {
1852 else if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
2104 llvm::GlobalValue *GV = dyn_cast<llvm::GlobalValue>(
2270 while (auto AT = dyn_cast<ArrayType>(Ty.getTypePtr()))
2315 const auto *VD = dyn_cast<VarDecl>(Global);
2325 if (const auto *FD = dyn_cast<FunctionDecl>(Global)) {
2339 if (const auto *VD = dyn_cast<VarDecl>(Global))
2464 if (auto *DRD = dyn_cast<OMPDeclareReductionDecl>(Global)) {
2468 } else if (auto *DMD = dyn_cast<OMPDeclareMapperDecl>(Global)) {
2476 if (const auto *FD = dyn_cast<FunctionDecl>(Global)) {
2567 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl()))
2639 else if (VarDecl *V = dyn_cast<VarDecl>(VD))
2707 if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(F)) {
2796 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
2810 if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
2831 if (const auto *VD = dyn_cast<VarDecl>(D))
2917 if (const auto *CXXFD = dyn_cast<CXXMethodDecl>(FD)) {
3094 if (const auto *CD = dyn_cast<CXXConstructorDecl>(FDDef))
3096 else if (const auto *DD = dyn_cast<CXXDestructorDecl>(FDDef))
3283 if (const auto *DD = dyn_cast<CXXDestructorDecl>(GD.getDecl())) {
3303 if (const auto FD = dyn_cast<FunctionDecl>(Result))
3318 NamespaceDecl *ND = dyn_cast<NamespaceDecl>(Result);
3319 if (auto LSD = dyn_cast<LinkageSpecDecl>(Result))
3321 if ((ND = dyn_cast<NamespaceDecl>(Result)))
3326 if (const auto *FD = dyn_cast<FunctionDecl>(Result))
3351 if (auto *F = dyn_cast<llvm::Function>(C)) {
3439 (OtherD = dyn_cast<VarDecl>(OtherGD.getDecl())) &&
3832 if (auto *VD = dyn_cast<VarDecl>(&D))
3945 auto *GV = dyn_cast<llvm::GlobalVariable>(Entry);
4271 if (auto *bitcast = dyn_cast<llvm::ConstantExpr>(user)) {
4278 llvm::CallBase *callSite = dyn_cast<llvm::CallBase>(user);
4322 if (dyn_cast<llvm::CallInst>(callSite)) {
4508 if (const auto *VD = dyn_cast<VarDecl>(D))
4673 if ((GV = dyn_cast<llvm::GlobalValue>(C))) {
4680 if ((VD = dyn_cast<VarDecl>(Result)))
5211 if (auto *OID = dyn_cast<ObjCImplDecl>(I)) {
5244 if (auto *DD = dyn_cast<DecompositionDecl>(D))
5501 if (const auto *Fn = dyn_cast<FunctionDecl>(D)) {
5634 if (auto *Alloca = dyn_cast<llvm::AllocaInst>(Addr)) {
5639 } else if (auto *GV = dyn_cast<llvm::GlobalValue>(Addr)) {
tools/clang/lib/CodeGen/CodeGenPGO.cpp 774 if (const auto *CCD = dyn_cast<CXXConstructorDecl>(D))
tools/clang/lib/CodeGen/CodeGenTBAA.cpp 118 if (const BuiltinType *BTy = dyn_cast<BuiltinType>(Ty)) {
169 if (const EnumType *ETy = dyn_cast<EnumType>(Ty)) {
251 if (const CXXRecordDecl *Decl = dyn_cast<CXXRecordDecl>(RD))
297 if (auto *TTy = dyn_cast<RecordType>(Ty)) {
tools/clang/lib/CodeGen/CodeGenTypes.cpp 136 if (const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
209 const RecordType *RT = dyn_cast<RecordType>(TT);
232 if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(FT))
246 if (const EnumDecl *ED = dyn_cast<EnumDecl>(TD)) {
325 if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(FT))
347 if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(FT)) {
387 if (const RecordType *RT = dyn_cast<RecordType>(Ty))
744 if (const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
804 if (const auto *CAT = dyn_cast<ConstantArrayType>(AT))
tools/clang/lib/CodeGen/CoverageMappingGen.cpp 884 if (auto *Method = dyn_cast<CXXMethodDecl>(D))
1112 if (const auto *CS = dyn_cast<CompoundStmt>(Body)) {
1161 if (const auto *CS = dyn_cast<CaseStmt>(S)) {
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp 1027 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(MPD))
2391 if (llvm::Function *fn = dyn_cast<llvm::Function>(atexit.getCallee()))
3895 if (const auto *DD = dyn_cast<CXXDestructorDecl>(MD)) {
3956 auto *CD = dyn_cast<CXXConstructorDecl>(MD);
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp 740 if (auto *Fn = dyn_cast<llvm::Function>(Throw.getCallee()))
1270 auto *CD = dyn_cast<CXXConstructorDecl>(GD.getDecl());
1348 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1397 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2270 dyn_cast<llvm::Function>(TLRegDtor.getCallee()))
2726 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(MPD)) {
2954 if (auto CI = dyn_cast<llvm::ConstantInt>(VBPtrOffset)) {
3854 if (auto *ctor = dyn_cast<CXXConstructorDecl>(GD.getDecl())) {
tools/clang/lib/CodeGen/ModuleBuilder.cpp 115 if (auto FD = dyn_cast<FunctionDecl>(D)) {
118 } else if (auto TD = dyn_cast<TagDecl>(D)) {
229 if (VarDecl *VD = dyn_cast<VarDecl>(Member)) {
240 if (auto *DRD = dyn_cast<OMPDeclareReductionDecl>(Member)) {
243 } else if (auto *DMD = dyn_cast<OMPDeclareMapperDecl>(Member)) {
260 if (const RecordDecl *RD = dyn_cast<RecordDecl>(D))
tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp 81 if (auto *TD = dyn_cast<TagDecl>(D))
212 if (auto *D = dyn_cast<TagDecl>(DeclCtx))
227 if (const RecordDecl *RD = dyn_cast<RecordDecl>(D))
tools/clang/lib/CodeGen/SwiftCallingConv.cpp 43 } else if (auto firstVecTy = dyn_cast<llvm::VectorType>(first)) {
44 if (auto secondVecTy = dyn_cast<llvm::VectorType>(second)) {
128 auto cxxRecord = dyn_cast<CXXRecordDecl>(record);
204 if (auto vecTy = dyn_cast<llvm::VectorType>(type)) {
222 if (auto intTy = dyn_cast<llvm::IntegerType>(type)) {
237 if (auto vecTy = dyn_cast<llvm::VectorType>(type)) {
tools/clang/lib/CodeGen/TargetInfo.cpp 119 } else if (auto intTy = dyn_cast<llvm::IntegerType>(type)) {
141 const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl());
450 if (auto *C = dyn_cast<llvm::Constant>(Src))
520 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
551 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
1346 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
1475 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
2808 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
3070 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
3125 if (llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType)) {
3133 if (llvm::ArrayType *ATy = dyn_cast<llvm::ArrayType>(IRType)) {
3210 if (llvm::StructType *STy = dyn_cast<llvm::StructType>(IRType)) {
3222 if (llvm::ArrayType *ATy = dyn_cast<llvm::ArrayType>(IRType)) {
3555 if (auto CXXRD = dyn_cast<CXXRecordDecl>(RT->getDecl())) {
4614 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
5312 if (llvm::ArrayType *ArrTy = dyn_cast<llvm::ArrayType>(BaseTy)) {
6220 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
6386 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
6636 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
8334 llvm::StructType *StrTy = dyn_cast<llvm::StructType>(CGT.ConvertType(Ty));
9130 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(AT))
9218 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
9224 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
tools/clang/lib/CodeGen/VarBypassDetector.cpp 36 const VarDecl *VD = dyn_cast<VarDecl>(D);
42 if (const VarDecl *VD = dyn_cast<VarDecl>(D))
117 if (const SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
119 else if (const LabelStmt *LS = dyn_cast<LabelStmt>(SubStmt))
140 if (const GotoStmt *GS = dyn_cast<GotoStmt>(St)) {
143 } else if (const SwitchStmt *SS = dyn_cast<SwitchStmt>(St)) {
tools/clang/lib/CrossTU/CrossTranslationUnit.cpp 212 const auto *SubDC = dyn_cast<DeclContext>(D);
217 const auto *ND = dyn_cast<T>(D);
tools/clang/lib/Driver/Driver.cpp 1831 if (InputAction *IA = dyn_cast<InputAction>(A)) {
1833 } else if (BindArchAction *BIA = dyn_cast<BindArchAction>(A)) {
1836 } else if (OffloadAction *OA = dyn_cast<OffloadAction>(A)) {
2371 if (auto *IA = dyn_cast<InputAction>(HostAction)) {
2402 if (auto *UA = dyn_cast<OffloadUnbundlingJobAction>(HostAction)) {
2839 if (auto *IA = dyn_cast<InputAction>(HostAction)) {
2848 if (auto *UA = dyn_cast<OffloadUnbundlingJobAction>(HostAction)) {
3113 if (auto *UA = dyn_cast<OffloadUnbundlingJobAction>(HostAction))
3457 if (auto *HMA = dyn_cast<HeaderModulePrecompileJobAction>(NewCurrent))
3753 if (auto *OA = dyn_cast<OffloadAction>(CurAction)) {
3765 return dyn_cast<JobAction>(CurAction);
3773 return dyn_cast<JobAction>(CurAction);
3778 return dyn_cast<JobAction>(CurAction);
3832 auto *AJ = dyn_cast<AssembleJobAction>(ActionInfo[0].JA);
3833 auto *BJ = dyn_cast<BackendJobAction>(ActionInfo[1].JA);
3834 auto *CJ = dyn_cast<CompileJobAction>(ActionInfo[2].JA);
3864 auto *AJ = dyn_cast<AssembleJobAction>(ActionInfo[0].JA);
3865 auto *BJ = dyn_cast<BackendJobAction>(ActionInfo[1].JA);
3887 auto *BJ = dyn_cast<BackendJobAction>(ActionInfo[0].JA);
3888 auto *CJ = dyn_cast<CompileJobAction>(ActionInfo[1].JA);
4055 if (const OffloadAction *OA = dyn_cast<OffloadAction>(A)) {
4116 if (const InputAction *IA = dyn_cast<InputAction>(A)) {
4128 if (const BindArchAction *BAA = dyn_cast<BindArchAction>(A)) {
4191 if (auto *ModuleJA = dyn_cast<HeaderModulePrecompileJobAction>(JA))
4216 if (auto *UA = dyn_cast<OffloadUnbundlingJobAction>(JA)) {
tools/clang/lib/Driver/ToolChains/Clang.cpp 6309 if (const auto *OA = dyn_cast<OffloadAction>(CurDep)) {
6340 if (const auto *OA = dyn_cast<OffloadAction>(JA.getInputs()[I])) {
tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp 43 if (const ObjCMessageExpr *Rec = dyn_cast<ObjCMessageExpr>(
118 InnerMsg = dyn_cast<ObjCMessageExpr>(Receiver->IgnoreParenCasts());
448 if (const ObjCMessageExpr *Msg = dyn_cast<ObjCMessageExpr>(E)) {
480 } else if (const ObjCArrayLiteral *ArrLit = dyn_cast<ObjCArrayLiteral>(E)) {
758 if (const CharacterLiteral *CharE = dyn_cast<CharacterLiteral>(Arg))
760 if (const ObjCBoolLiteralExpr *BE = dyn_cast<ObjCBoolLiteralExpr>(Arg))
762 if (const CXXBoolLiteralExpr *BE = dyn_cast<CXXBoolLiteralExpr>(Arg))
766 if (const UnaryOperator *UOE = dyn_cast<UnaryOperator>(literalE)) {
855 if (const IntegerLiteral *IntE = dyn_cast<IntegerLiteral>(literalE))
947 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
968 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
1001 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
1136 StrE = dyn_cast<StringLiteral>(OrigArg->IgnoreParens())) {
tools/clang/lib/Frontend/ASTConsumers.cpp 83 if (DeclContext *DC = dyn_cast<DeclContext>(D)) {
tools/clang/lib/Frontend/ASTMerge.cpp 63 if (const auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/lib/Frontend/ASTUnit.cpp 319 if (const auto *ID = dyn_cast<ObjCInterfaceDecl>(ND)) {
333 } else if (const auto *Record = dyn_cast<RecordDecl>(ND)) {
906 if (const auto *ND = dyn_cast<NamedDecl>(D)) {
907 if (const auto *EnumD = dyn_cast<EnumDecl>(D)) {
927 if (const auto *ImportD = dyn_cast<ImportDecl>(D)) {
967 if (auto *NSD = dyn_cast<NamespaceDecl>(D)) {
tools/clang/lib/Frontend/CompilerInstance.cpp 1351 if (auto *DMD = dyn_cast<DefMacroDirective>(MD))
tools/clang/lib/Frontend/FrontendAction.cpp 92 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
117 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp 55 if (const VarDecl *VD = dyn_cast<VarDecl>(ND))
61 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
65 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
66 if (const auto *RC = dyn_cast<CXXRecordDecl>(MD->getParent()))
79 if (const VarDecl *VD = dyn_cast<VarDecl>(ND))
117 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
141 HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
147 HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
153 HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
212 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
218 if (const auto *VD = dyn_cast<ValueDecl>(ND)) {
tools/clang/lib/Frontend/MultiplexConsumer.cpp 357 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(Consumer.get()))
363 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(Consumer.get()))
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp 192 if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(*I)) {
203 if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(*I)) {
210 if (FunctionDecl *FDecl = dyn_cast<FunctionDecl>(*I)) {
229 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(*I)) {
729 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
731 } else if (VarDecl *FVD = dyn_cast<VarDecl>(D)) {
737 } else if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(D)) {
739 } else if (ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl>(D)) {
742 } else if (LinkageSpecDecl *LSD = dyn_cast<LinkageSpecDecl>(D)) {
747 if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>((*DI))) {
772 if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>((*DI))) {
861 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CDecl))
970 if (const FunctionProtoType *FT = dyn_cast<FunctionProtoType>(FPRetType)){
1070 if (ObjCInterfaceDecl *ForwardDecl = dyn_cast<ObjCInterfaceDecl>(*I)) {
1248 dyn_cast<ObjCCategoryImplDecl>(OMD->getDeclContext())) {
1311 if (const FunctionProtoType *FT = dyn_cast<FunctionProtoType>(FPRetType)) {
1332 ObjCImplementationDecl *IMD = dyn_cast<ObjCImplementationDecl>(OID);
1333 ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(OID);
1695 if (DeclStmt *DS = dyn_cast<DeclStmt>(S->getElement())) {
2164 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E)) {
2193 if (VarDecl *VD = dyn_cast<VarDecl>(Dcl)) {
2197 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Dcl)) {
2203 proto = dyn_cast<FunctionProtoType>(funcType);
2208 else if (FieldDecl *FD = dyn_cast<FieldDecl>(Dcl)) {
2212 else if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(Dcl)) {
2291 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E))
2377 const FunctionProtoType *proto = dyn_cast<FunctionProtoType>(funcType);
2650 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(subExpr)) {
3037 if (const LinkageSpecDecl *LSD = dyn_cast<LinkageSpecDecl>(DC))
3062 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
3065 if (const LinkageSpecDecl *LSD = dyn_cast<LinkageSpecDecl>(DC))
3402 while (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(recExpr))
3427 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(userExpr)) {
3454 else if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(userExpr)) {
3456 while ((CE = dyn_cast<CStyleCastExpr>(userExpr)))
3605 if (RecordDecl *RD = dyn_cast<RecordDecl>(Tag)) {
3614 if (EnumDecl *ED = dyn_cast<EnumDecl>(Tag)) {
3707 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(AT)) {
3730 auto *IDecl = dyn_cast<ObjCContainerDecl>(fieldDecl->getDeclContext());
4032 if (VarDecl *Var = dyn_cast<VarDecl>(VD))
4461 if (BlockExpr *CBE = dyn_cast<BlockExpr>(SubStmt))
4467 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S))
4479 if (BlockExpr *CBE = dyn_cast<BlockExpr>(SubStmt)) {
4489 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S)) {
4527 const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(FT);
4554 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(BlockExp)) {
4556 } else if (const MemberExpr *MExpr = dyn_cast<MemberExpr>(BlockExp)) {
4559 else if (const ParenExpr *PRE = dyn_cast<ParenExpr>(BlockExp)) {
4562 else if (const ImplicitCastExpr *IEXPR = dyn_cast<ImplicitCastExpr>(BlockExp))
4565 dyn_cast<ConditionalOperator>(BlockExp)) {
4577 } else if (const ObjCIvarRefExpr *IRE = dyn_cast<ObjCIvarRefExpr>(BlockExp)) {
4580 = dyn_cast<PseudoObjectExpr>(BlockExp)) {
4588 const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(FT);
4700 if (VarDecl *Var = dyn_cast<VarDecl>(VD))
4863 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
4870 if (VarDecl *VD = dyn_cast<VarDecl>(ND))
4872 else if (TypedefNameDecl *TDD = dyn_cast<TypedefNameDecl>(ND))
4874 else if (FieldDecl *FD = dyn_cast<FieldDecl>(ND))
5082 if (CXXConstructExpr *CExp = dyn_cast<CXXConstructExpr>(ND->getInit())) {
5138 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E))
5416 dyn_cast<ObjCForCollectionStmt>(Stmts.back()))
5436 if (PseudoObjectExpr *PseudoOp = dyn_cast<PseudoObjectExpr>(S)) {
5442 } else if (ObjCIvarRefExpr *IvarRefExpr = dyn_cast<ObjCIvarRefExpr>(S)) {
5459 if (BlockExpr *BE = dyn_cast<BlockExpr>(S)) {
5493 if (ObjCEncodeExpr *AtEncode = dyn_cast<ObjCEncodeExpr>(S))
5496 if (ObjCSelectorExpr *AtSelector = dyn_cast<ObjCSelectorExpr>(S))
5499 if (ObjCStringLiteral *AtString = dyn_cast<ObjCStringLiteral>(S))
5502 if (ObjCBoolLiteralExpr *BoolLitExpr = dyn_cast<ObjCBoolLiteralExpr>(S))
5505 if (ObjCBoxedExpr *BoxedExpr = dyn_cast<ObjCBoxedExpr>(S))
5508 if (ObjCArrayLiteral *ArrayLitExpr = dyn_cast<ObjCArrayLiteral>(S))
5512 dyn_cast<ObjCDictionaryLiteral>(S))
5515 if (ObjCMessageExpr *MessExpr = dyn_cast<ObjCMessageExpr>(S)) {
5539 dyn_cast<ObjCAutoreleasePoolStmt>(S)) {
5543 if (ObjCAtTryStmt *StmtTry = dyn_cast<ObjCAtTryStmt>(S))
5546 if (ObjCAtSynchronizedStmt *StmtTry = dyn_cast<ObjCAtSynchronizedStmt>(S))
5549 if (ObjCAtThrowStmt *StmtThrow = dyn_cast<ObjCAtThrowStmt>(S))
5552 if (ObjCProtocolExpr *ProtocolExp = dyn_cast<ObjCProtocolExpr>(S))
5556 dyn_cast<ObjCForCollectionStmt>(S))
5560 dyn_cast<BreakStmt>(S))
5563 dyn_cast<ContinueStmt>(S))
5568 if (DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
5585 if (ValueDecl *ND = dyn_cast<ValueDecl>(SD)) {
5590 if (VarDecl *VD = dyn_cast<VarDecl>(SD)) {
5602 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(SD)) {
5611 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(S))
5623 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S)) {
5631 if (CallExpr *CE = dyn_cast<CallExpr>(S)) {
5638 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(S)) {
5641 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(S)) {
5750 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(VD->getInit())) {
5772 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(VD->getInit())) {
5780 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {
7501 dyn_cast<ObjCContainerDecl>(D->getDeclContext());
7503 if (ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CDecl))
tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp 172 if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(*I)) {
179 if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(*I)) {
658 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
660 } else if (VarDecl *FVD = dyn_cast<VarDecl>(D)) {
666 } else if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(D)) {
669 } else if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(D)) {
671 } else if (ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl>(D)) {
674 } else if (LinkageSpecDecl *LSD = dyn_cast<LinkageSpecDecl>(D)) {
679 if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>((*DI))) {
698 if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>((*DI))) {
817 if (const FunctionProtoType *FT = dyn_cast<FunctionProtoType>(FPRetType)){
1080 dyn_cast<ObjCCategoryImplDecl>(OMD->getDeclContext())) {
1143 if (const FunctionProtoType *FT = dyn_cast<FunctionProtoType>(FPRetType)) {
1164 ObjCImplementationDecl *IMD = dyn_cast<ObjCImplementationDecl>(OID);
1165 ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(OID);
1486 if (DeclStmt *DS = dyn_cast<DeclStmt>(S->getElement())) {
2080 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E)) {
2109 if (VarDecl *VD = dyn_cast<VarDecl>(Dcl)) {
2113 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Dcl)) {
2119 proto = dyn_cast<FunctionProtoType>(funcType);
2124 else if (FieldDecl *FD = dyn_cast<FieldDecl>(Dcl)) {
2203 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E))
2831 while (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(recExpr))
2856 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(userExpr)) {
2883 else if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(userExpr)) {
2885 while ((CE = dyn_cast<CStyleCastExpr>(userExpr)))
3246 if (VarDecl *Var = dyn_cast<VarDecl>(VD))
3648 if (BlockExpr *CBE = dyn_cast<BlockExpr>(SubStmt))
3654 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S))
3666 if (BlockExpr *CBE = dyn_cast<BlockExpr>(SubStmt)) {
3676 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S)) {
3693 const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(FT);
3722 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(BlockExp)) {
3724 } else if (const MemberExpr *MExpr = dyn_cast<MemberExpr>(BlockExp)) {
3727 else if (const ParenExpr *PRE = dyn_cast<ParenExpr>(BlockExp)) {
3730 else if (const ImplicitCastExpr *IEXPR = dyn_cast<ImplicitCastExpr>(BlockExp))
3733 dyn_cast<ConditionalOperator>(BlockExp)) {
3745 } else if (const ObjCIvarRefExpr *IRE = dyn_cast<ObjCIvarRefExpr>(BlockExp)) {
3748 = dyn_cast<PseudoObjectExpr>(BlockExp)) {
3756 const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(FT);
3869 if (VarDecl *Var = dyn_cast<VarDecl>(VD))
4017 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
4024 if (VarDecl *VD = dyn_cast<VarDecl>(ND))
4026 else if (TypedefNameDecl *TDD = dyn_cast<TypedefNameDecl>(ND))
4028 else if (FieldDecl *FD = dyn_cast<FieldDecl>(ND))
4270 if (const CStyleCastExpr *ECE = dyn_cast<CStyleCastExpr>(E))
4540 dyn_cast<ObjCForCollectionStmt>(Stmts.back()))
4560 if (PseudoObjectExpr *PseudoOp = dyn_cast<PseudoObjectExpr>(S)) {
4566 } else if (ObjCIvarRefExpr *IvarRefExpr = dyn_cast<ObjCIvarRefExpr>(S)) {
4581 if (BlockExpr *BE = dyn_cast<BlockExpr>(S)) {
4615 if (ObjCEncodeExpr *AtEncode = dyn_cast<ObjCEncodeExpr>(S))
4618 if (ObjCSelectorExpr *AtSelector = dyn_cast<ObjCSelectorExpr>(S))
4621 if (ObjCStringLiteral *AtString = dyn_cast<ObjCStringLiteral>(S))
4624 if (ObjCMessageExpr *MessExpr = dyn_cast<ObjCMessageExpr>(S)) {
4647 if (ObjCAtTryStmt *StmtTry = dyn_cast<ObjCAtTryStmt>(S))
4650 if (ObjCAtSynchronizedStmt *StmtTry = dyn_cast<ObjCAtSynchronizedStmt>(S))
4653 if (ObjCAtThrowStmt *StmtThrow = dyn_cast<ObjCAtThrowStmt>(S))
4656 if (ObjCProtocolExpr *ProtocolExp = dyn_cast<ObjCProtocolExpr>(S))
4660 dyn_cast<ObjCForCollectionStmt>(S))
4664 dyn_cast<BreakStmt>(S))
4667 dyn_cast<ContinueStmt>(S))
4672 if (DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
4687 if (ValueDecl *ND = dyn_cast<ValueDecl>(SD)) {
4692 if (VarDecl *VD = dyn_cast<VarDecl>(SD)) {
4704 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(SD)) {
4713 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(S))
4725 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S)) {
4733 if (CallExpr *CE = dyn_cast<CallExpr>(S)) {
4740 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(S)) {
4848 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(VD->getInit())) {
4870 if (CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(VD->getInit())) {
4878 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {
tools/clang/lib/Index/CommentToXML.cpp 899 if (const NamedDecl *ND = dyn_cast<NamedDecl>(DI->CommentDecl)) {
986 const AvailabilityAttr *AA = dyn_cast<AvailabilityAttr>(Attrs[i]);
988 if (const DeprecatedAttr *DA = dyn_cast<DeprecatedAttr>(Attrs[i])) {
997 else if (const UnavailableAttr *UA = dyn_cast<UnavailableAttr>(Attrs[i])) {
tools/clang/lib/Index/FileIndexRecord.cpp 53 if (auto ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/Index/IndexBody.cpp 65 if (auto ICE = dyn_cast<ImplicitCastExpr>(*It)) {
75 if (auto BO = dyn_cast<BinaryOperator>(Parent)) {
79 } else if (auto UO = dyn_cast<UnaryOperator>(Parent)) {
87 } else if (auto CA = dyn_cast<CompoundAssignOperator>(Parent)) {
93 } else if (auto CE = dyn_cast<CallExpr>(Parent)) {
96 if (auto *ME = dyn_cast<MemberExpr>(E)) {
107 } else if (auto CXXOp = dyn_cast<CXXOperatorCallExpr>(CE)) {
130 if (auto *FD = dyn_cast<FunctionDecl>(ParentDC))
132 else if (auto *MD = dyn_cast<ObjCMethodDecl>(ParentDC))
220 if (auto *RecE = dyn_cast<ObjCMessageExpr>(
236 if (const auto *BinOp = dyn_cast<BinaryOperator>(E))
238 const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(E);
432 if (auto *DIE = dyn_cast<DesignatedInitExpr>(init))
tools/clang/lib/Index/IndexDecl.cpp 91 if (const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
93 if (auto *FD = dyn_cast<FunctionDecl>(DC)) {
97 } else if (auto *MD = dyn_cast<ObjCMethodDecl>(DC)) {
103 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
113 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
196 dyn_cast<ClassTemplateSpecializationDecl>(D->getLexicalDeclContext());
206 if (const auto *CTD = dyn_cast<ClassTemplateDecl>(ND))
216 if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
232 if (auto *CXXMD = dyn_cast<CXXMethodDecl>(D)) {
248 if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(D)) {
263 } else if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(D)) {
270 } else if (const auto *Guide = dyn_cast<CXXDeductionGuideDecl>(D)) {
589 const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
600 const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
617 const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
626 const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
659 if (const auto *FD = dyn_cast<FunctionDecl>(D))
661 else if (const auto *TD = dyn_cast<TagDecl>(D))
663 else if (const auto *VD = dyn_cast<VarDecl>(D))
681 if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(TP)) {
684 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(TP)) {
687 } else if (const auto *TTPD = dyn_cast<TemplateTemplateParmDecl>(TP)) {
722 dyn_cast<NamedDecl>(D->getDeclContext()),
tools/clang/lib/Index/IndexSymbol.cpp 66 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
99 if (auto *VT = dyn_cast<VarTemplateDecl>(D)) {
106 if (const TagDecl *TD = dyn_cast<TagDecl>(D)) {
124 if (const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D)) {
143 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
181 CXXRec = dyn_cast<CXXRecordDecl>(D->getDeclContext())) {
192 const ObjCInterfaceDecl *ClsD = dyn_cast<ObjCInterfaceDecl>(D);
208 if (auto *CatD = dyn_cast<ObjCCategoryDecl>(D))
338 dyn_cast<CXXRecordDecl>(D->getDeclContext())) {
368 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
474 if (auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/Index/IndexTypeSourceInfo.cpp 93 if (auto FD = dyn_cast<FunctionDecl>(D->getDeclContext())) {
278 if (auto CXXRD = dyn_cast<CXXRecordDecl>(D)) {
tools/clang/lib/Index/IndexingContext.cpp 153 SD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
155 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
157 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
159 } else if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
162 } else if (const auto *ED = dyn_cast<EnumDecl>(D)) {
167 if (const auto *Parent = dyn_cast<Decl>(D->getDeclContext()))
199 dyn_cast<ClassTemplateSpecializationDecl>(D->getDeclContext()))
201 else if (const auto *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext()))
208 SD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
210 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
212 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
214 } else if (const auto *RD = dyn_cast<CXXRecordDecl>(D)) {
216 } else if (const auto *ED = dyn_cast<EnumDecl>(D)) {
229 } else if (const auto *ECD = dyn_cast<EnumConstantDecl>(D)) {
230 if (const auto *ED = dyn_cast<EnumDecl>(ECD->getDeclContext())) {
241 if (auto VD = dyn_cast<VarDecl>(D))
244 if (auto FD = dyn_cast<FunctionDecl>(D))
247 if (auto TD = dyn_cast<TagDecl>(D))
250 if (auto MD = dyn_cast<ObjCMethodDecl>(D))
278 if (auto NS = dyn_cast<NamespaceDecl>(Parent)) {
281 } else if (auto RD = dyn_cast<RecordDecl>(Parent)) {
284 } else if (auto ND = dyn_cast<NamedDecl>(Parent)) {
294 if (auto TD = dyn_cast<TemplateDecl>(D)) {
tools/clang/lib/Index/USRGeneration.cpp 198 if (const NamedDecl *D = dyn_cast<NamedDecl>(DC))
274 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
314 = dyn_cast<VarTemplatePartialSpecializationDecl>(D)) {
333 = dyn_cast<VarTemplateSpecializationDecl>(D)) {
386 if (const ObjCProtocolDecl *pd = dyn_cast<ObjCProtocolDecl>(container)) {
399 if (auto *CD = dyn_cast<ObjCCategoryDecl>(D->getDeclContext()))
401 if (auto *ICD = dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext()))
505 if (const CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(D)) {
518 = dyn_cast<ClassTemplatePartialSpecializationDecl>(CXXRecord)) {
556 if (auto *ED = dyn_cast<EnumDecl>(D)) {
569 = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
583 if (const NamedDecl *DCN = dyn_cast<NamedDecl>(DC))
911 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) {
930 = dyn_cast<TemplateTemplateParmDecl>(Template)) {
tools/clang/lib/Lex/MacroInfo.cpp 183 if (DefMacroDirective *DefMD = dyn_cast<DefMacroDirective>(MD))
187 if (UndefMacroDirective *UndefMD = dyn_cast<UndefMacroDirective>(MD)) {
232 if (auto *DMD = dyn_cast<DefMacroDirective>(this)) {
tools/clang/lib/Lex/PPLexerChange.cpp 783 if (auto *VisMD = dyn_cast<VisibilityMacroDirective>(MD)) {
793 if (DefMacroDirective *DefMD = dyn_cast<DefMacroDirective>(MD))
tools/clang/lib/Parse/ParseCXXInlineMethods.cpp 73 if (auto *DeclAsFunction = dyn_cast<FunctionDecl>(FnD)) {
82 if (auto *DeclAsFunction = dyn_cast<FunctionDecl>(FnD)) {
412 = dyn_cast<FunctionTemplateDecl>(LM.Method))
tools/clang/lib/Parse/ParseDecl.cpp 1499 NamedDecl *ND = dyn_cast<NamedDecl>(D);
6353 Actions, dyn_cast<CXXRecordDecl>(Actions.CurContext), Q,
6414 NamedDecl *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/Parse/ParseDeclCXX.cpp 2816 ThisDecl ? dyn_cast<VarTemplateDecl>(ThisDecl) : nullptr)
tools/clang/lib/Parse/ParseOpenMP.cpp 639 NamedDecl *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/Rewrite/DeltaTree.cpp 174 if (auto *IN = dyn_cast<DeltaTreeInteriorNode>(this))
308 if (auto *IN = dyn_cast<DeltaTreeInteriorNode>(this)) {
430 const auto *IN = dyn_cast<DeltaTreeInteriorNode>(Node);
tools/clang/lib/Rewrite/RewriteRope.cpp 621 if (auto *Leaf = dyn_cast<RopePieceBTreeLeaf>(this))
635 if (auto *Leaf = dyn_cast<RopePieceBTreeLeaf>(this))
649 if (auto *Leaf = dyn_cast<RopePieceBTreeLeaf>(this))
658 if (auto *Leaf = dyn_cast<RopePieceBTreeLeaf>(this))
676 while (const auto *IN = dyn_cast<RopePieceBTreeInterior>(N))
739 if (auto *Leaf = dyn_cast<RopePieceBTreeLeaf>(getRoot(Root)))
tools/clang/lib/Sema/AnalysisBasedWarnings.cpp 192 const CallExpr *CE = dyn_cast<CallExpr>(B.getAs<CFGStmt>()->getStmt());
199 dyn_cast<DeclRefExpr>(CE->getCallee()->IgnoreParenImpCasts())) {
208 const CXXMemberCallExpr *MCE = dyn_cast<CXXMemberCallExpr>(CE);
330 if (auto *Throw = dyn_cast<CXXThrowExpr>(S->getStmt()))
545 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Func))
550 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(Func))
646 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
647 if (const auto *CBody = dyn_cast<CoroutineBodyStmt>(Body))
653 else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
703 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
705 } else if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
985 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Use.getUser())) {
1279 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(AC.getDecl()))
1397 if (const VarDecl *BaseVar = dyn_cast<VarDecl>(Base))
1479 if (const ObjCPropertyDecl *Prop = dyn_cast<ObjCPropertyDecl>(KeyProp))
2157 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(D))
2226 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
2233 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
tools/clang/lib/Sema/CodeCompleteConsumer.cpp 358 const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
375 if (const auto *ND = dyn_cast<NamedDecl>(DC)) {
395 if (const auto *CatImpl = dyn_cast<ObjCCategoryImplDecl>(CurDC))
398 if (const auto *Cat = dyn_cast<ObjCCategoryDecl>(CurDC)) {
472 const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
696 if (const auto *Function = dyn_cast<FunctionDecl>(Declaration))
tools/clang/lib/Sema/JumpDiagnostics.cpp 134 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
193 if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init)) {
210 if (const TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {
233 if (VarDecl *VD = dyn_cast<VarDecl>(D))
346 if (auto *GS = dyn_cast<GCCAsmStmt>(S))
584 if (SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
586 else if (LabelStmt *LS = dyn_cast<LabelStmt>(SubStmt))
607 if (GotoStmt *GS = dyn_cast<GotoStmt>(Jump)) {
620 if (IndirectGotoStmt *IGS = dyn_cast<IndirectGotoStmt>(Jump)) {
635 if (CaseStmt *CS = dyn_cast<CaseStmt>(SC))
637 else if (DefaultStmt *DS = dyn_cast<DefaultStmt>(SC))
tools/clang/lib/Sema/ScopeInfo.cpp 94 dyn_cast<ObjCPropertyRefExpr>(POE->getSyntacticForm());
100 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(DoubleBase))
160 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {
165 if (const ConditionalOperator *Cond = dyn_cast<ConditionalOperator>(E)) {
172 dyn_cast<BinaryConditionalOperator>(E)) {
180 if (const ObjCPropertyRefExpr *RefExpr = dyn_cast<ObjCPropertyRefExpr>(E)) {
190 else if (const ObjCIvarRefExpr *IvarE = dyn_cast<ObjCIvarRefExpr>(E))
192 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
195 } else if (const ObjCMessageExpr *MsgE = dyn_cast<ObjCMessageExpr>(E)) {
235 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
237 } else if (auto *ME = dyn_cast<MemberExpr>(E)) {
239 } else if (auto *FP = dyn_cast<FunctionParmPackExpr>(E)) {
tools/clang/lib/Sema/Sema.cpp 199 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(&Consumer))
367 if (SemaConsumer *SC = dyn_cast<SemaConsumer>(&Consumer))
409 FunctionDecl *fn = dyn_cast<FunctionDecl>(CurContext);
547 if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(E)) {
584 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
605 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
639 if (auto *FD = dyn_cast<FunctionDecl>(ND))
678 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
742 } else if (auto *FD = dyn_cast<FunctionDecl>(VD)) {
789 if (const CXXMethodDecl *M = dyn_cast<CXXMethodDecl>(*I))
792 else if (const FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(*I))
799 else if (const CXXRecordDecl *R = dyn_cast<CXXRecordDecl>(*I)) {
840 dyn_cast<FunctionDecl>((*I)->getFriendDecl()))
917 if (auto Func = dyn_cast<FunctionDecl>(PII.first))
1149 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
1216 const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext());
1273 return dyn_cast<FunctionDecl>(DC);
1280 return dyn_cast<ObjCMethodDecl>(DC);
1804 auto CurBSI = dyn_cast<BlockScopeInfo>(FunctionScopes.back());
1829 if (auto *LSI = dyn_cast<sema::LambdaScopeInfo>(Scope)) {
1855 auto *CurLSI = dyn_cast<LambdaScopeInfo>(*I);
1946 Overloads = dyn_cast<UnresolvedMemberExpr>(E.IgnoreParens());
1963 = dyn_cast<FunctionDecl>((*it)->getUnderlyingDecl())) {
1998 if (const DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E.IgnoreParens())) {
1999 if (const FunctionDecl *Fun = dyn_cast<FunctionDecl>(DeclRef->getDecl())) {
2096 if (const auto *UO = dyn_cast<UnaryOperator>(E))
2099 if (const auto *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {
2104 if (const auto *FD = dyn_cast<FunctionDecl>(ND))
2178 return dyn_cast<CapturedRegionScopeInfo>(FunctionScopes.back());
2278 if (auto TypedefT = dyn_cast<TypedefType>(QT.getTypePtr()))
2280 if (auto TagT = dyn_cast<TagType>(QT.getCanonicalType().getTypePtr()))
tools/clang/lib/Sema/SemaAccess.cpp 792 if (CXXMethodDecl* MD = dyn_cast<CXXMethodDecl>(EC.Functions.front()))
1105 if (VarDecl *VD = dyn_cast<VarDecl>(D))
1107 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
1109 else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(D))
1111 else if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
1297 dyn_cast<UsingShadowDecl>(Entity.getTargetDecl())) {
1476 } else if (FunctionDecl *FN = dyn_cast<FunctionDecl>(D)) {
1478 } else if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D)) {
1677 dyn_cast<ConstructorUsingShadowDecl>(Found.getDecl())) {
1907 if (ObjCIvarDecl *Ivar = dyn_cast<ObjCIvarDecl>(Target)) {
1920 = dyn_cast<ObjCImplDecl>(FD->getLexicalDeclContext())) {
1922 = dyn_cast<ObjCImplementationDecl>(Impl))
1925 = dyn_cast<ObjCCategoryImplDecl>(Impl))
tools/clang/lib/Sema/SemaAttr.cpp 103 const auto *Parent = dyn_cast<CXXRecordDecl>(ND->getDeclContext());
144 dyn_cast<TemplateSpecializationType>(Canonical.getTypePtr())) {
884 NamedDecl *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/Sema/SemaCUDA.cpp 432 dyn_cast<CXXConstructExpr>(CI->getInit()))
499 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(Init))
527 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(Init)) {
529 } else if (const CallExpr *CE = dyn_cast<CallExpr>(Init)) {
576 if (UsingShadowDecl *Using = dyn_cast<UsingShadowDecl>(D))
630 dyn_cast<FunctionDecl>(CurContext), *this);
656 dyn_cast<FunctionDecl>(CurContext), *this);
669 FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext);
736 FunctionDecl *CurFn = dyn_cast<FunctionDecl>(CurContext);
tools/clang/lib/Sema/SemaCXXScopeSpec.cpp 33 if (const RecordType *RecordTy = dyn_cast<RecordType>(Ty)) {
203 TagDecl *tag = dyn_cast<TagDecl>(DC);
233 auto *EnumD = dyn_cast<EnumDecl>(tag);
284 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(S->getEntity()))
333 if (const TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(SD)) {
713 if (NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(SD)) {
718 if (NamespaceAliasDecl *Alias = dyn_cast<NamespaceAliasDecl>(SD)) {
800 CXXRecordDecl *ContainingClass = dyn_cast<CXXRecordDecl>(DC->getParent());
tools/clang/lib/Sema/SemaCast.cpp 96 for (; auto *ICE = dyn_cast<ImplicitCastExpr>(CE->getSubExpr()); CE = ICE)
1895 if (auto *UO = dyn_cast<UnaryOperator>(Src))
1898 auto *DRE = dyn_cast<DeclRefExpr>(Src);
1901 auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl());
2921 if (auto *BindExpr = dyn_cast<CXXBindTemporaryExpr>(SubExpr))
2923 if (auto *ConstructExpr = dyn_cast<CXXConstructExpr>(SubExpr))
tools/clang/lib/Sema/SemaChecking.cpp 145 StringLiteral *Literal = dyn_cast<StringLiteral>(StrArg);
167 auto *Literal = dyn_cast<StringLiteral>(Arg->IgnoreParenCasts());
1407 if (const auto *FT = dyn_cast<FunctionProtoType>(FuncType)) {
1681 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg))
1973 !dyn_cast<MemberExpr>(Arg->IgnoreParens()) &&
1974 !dyn_cast<ArraySubscriptExpr>(Arg->IgnoreParens()))) {
4123 dyn_cast<CompoundLiteralExpr>(Expr))
4125 dyn_cast<InitListExpr>(CLE->getInitializer()))
4178 if (const CStyleCastExpr *CSCE = dyn_cast<CStyleCastExpr>(FormatExpr))
4182 dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts()))
4185 FormatString = dyn_cast<StringLiteral>(FormatExpr->IgnoreParenImpCasts());
4242 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FDecl))
4263 if (const ValueDecl *VD = dyn_cast<ValueDecl>(FDecl)) {
4442 if (const auto *V = dyn_cast<VarDecl>(NDecl))
4444 else if (const auto *F = dyn_cast<FieldDecl>(NDecl))
5335 NewBuiltinDecl = dyn_cast<FunctionDecl>(Res.getFoundDecl());
5463 StringLiteral *Literal = dyn_cast<StringLiteral>(Arg);
5493 auto *Literal = dyn_cast<StringLiteral>(Arg);
5495 if (auto *ObjcLiteral = dyn_cast<ObjCStringLiteral>(Arg)) {
5557 if (auto *Block = dyn_cast<BlockDecl>(Caller)) {
5560 } else if (auto *FD = dyn_cast<FunctionDecl>(Caller)) {
5563 } else if (auto *MD = dyn_cast<ObjCMethodDecl>(Caller)) {
5633 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Arg)) {
5634 if (const ParmVarDecl *PV = dyn_cast<ParmVarDecl>(DR->getDecl())) {
5789 if (ImplicitCastExpr *Cast = dyn_cast<ImplicitCastExpr>(OrigArg)) {
6030 dyn_cast<UnaryExprOrTypeTraitExpr>(Arg->IgnoreParenImpCasts()))
6889 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) {
6907 if (const InitListExpr *InitList = dyn_cast<InitListExpr>(Init)) {
6934 if (const ParmVarDecl *PV = dyn_cast<ParmVarDecl>(VD)) {
6935 if (const NamedDecl *ND = dyn_cast<NamedDecl>(PV->getDeclContext())) {
6939 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(ND))
6976 if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
7026 if (const ObjCStringLiteral *ObjCFExpr = dyn_cast<ObjCStringLiteral>(E))
7080 auto ASE = dyn_cast<ArraySubscriptExpr>(UnaOp->getSubExpr());
7906 const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl());
7919 if (MemberKind *FK = dyn_cast<MemberKind>(decl))
8179 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(Inside))
8233 if (const ParenExpr *PE = dyn_cast<ParenExpr>(E))
8242 if (const ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E)) {
8334 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
8354 } else if (const CharacterLiteral *CL = dyn_cast<CharacterLiteral>(E)) {
8384 if (const IntegerLiteral *IL = dyn_cast<IntegerLiteral>(E)) {
8394 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(ND))
8473 if (const CStyleCastExpr *CCast = dyn_cast<CStyleCastExpr>(E)) {
9092 if (const UsingShadowDecl *UsingD = dyn_cast<UsingShadowDecl>(I)) {
9093 FDecl = dyn_cast<FunctionDecl>(UsingD->getTargetDecl());
9095 FDecl = dyn_cast<FunctionDecl>(I);
9126 FunctionDecl *FD = dyn_cast<FunctionDecl>(R.getFoundDecl());
9268 const auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E);
9270 const auto *Num = dyn_cast<IntegerLiteral>(MTE->GetTemporaryExpr());
9317 const BinaryOperator *Size = dyn_cast<BinaryOperator>(E);
9373 if (const auto *Unary = dyn_cast<UnaryExprOrTypeTraitExpr>(E))
9491 if (const auto *BO = dyn_cast<BinaryOperator>(SizeofExpr)) {
9647 if (const UnaryOperator *UnaryOp = dyn_cast<UnaryOperator>(Dest))
9772 const BinaryOperator * BO = dyn_cast<BinaryOperator>(Ex);
9826 if (const CallExpr *SizeCall = dyn_cast<CallExpr>(SizeArg)) {
9840 const DeclRefExpr *SrcArgDRE = dyn_cast<DeclRefExpr>(SrcArg);
9844 const DeclRefExpr *CompareWithSrcDRE = dyn_cast<DeclRefExpr>(CompareWithSrc);
9881 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
9916 } else if (const BinaryOperator *BE = dyn_cast<BinaryOperator>(LenArg)) {
10017 if (DeclRefExpr* DRL = dyn_cast<DeclRefExpr>(LeftExprSansParen))
10018 if (DeclRefExpr* DRR = dyn_cast<DeclRefExpr>(RightExprSansParen))
10027 if (FloatingLiteral* FLL = dyn_cast<FloatingLiteral>(LeftExprSansParen)) {
10031 if (FloatingLiteral* FLR = dyn_cast<FloatingLiteral>(RightExprSansParen))
10036 if (CallExpr* CL = dyn_cast<CallExpr>(LeftExprSansParen))
10040 if (CallExpr* CR = dyn_cast<CallExpr>(RightExprSansParen))
10081 if (const VectorType *VT = dyn_cast<VectorType>(T))
10083 if (const ComplexType *CT = dyn_cast<ComplexType>(T))
10085 if (const AtomicType *AT = dyn_cast<AtomicType>(T))
10090 if (const EnumType *ET = dyn_cast<EnumType>(T))
10092 } else if (const EnumType *ET = dyn_cast<EnumType>(T)) {
10126 if (const VectorType *VT = dyn_cast<VectorType>(T))
10128 if (const ComplexType *CT = dyn_cast<ComplexType>(T))
10130 if (const AtomicType *AT = dyn_cast<AtomicType>(T))
10132 if (const EnumType *ET = dyn_cast<EnumType>(T))
10221 if (const auto *CE = dyn_cast<ImplicitCastExpr>(E)) {
10248 if (const auto *CO = dyn_cast<ConditionalOperator>(E)) {
10264 if (const auto *BO = dyn_cast<BinaryOperator>(E)) {
10315 = dyn_cast<IntegerLiteral>(BO->getLHS()->IgnoreParenCasts())) {
10407 if (const auto *UO = dyn_cast<UnaryOperator>(E)) {
10423 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(E))
10482 dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
10633 while (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
10651 if (auto *BL = dyn_cast<CXXBoolLiteralExpr>(Constant))
10722 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Constant))
10723 ED = dyn_cast<EnumConstantDecl>(DR->getDecl());
10730 } else if (auto *BL = dyn_cast<ObjCBoolLiteralExpr>(
10997 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(OriginalInit))
11082 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(Ignored))
11102 if (UnaryOperator *UOp = dyn_cast<UnaryOperator>(InnerE))
11270 dyn_cast<BuiltinType>(ToBool ? Source : Target);
11359 if (auto ICE = dyn_cast<ImplicitCastExpr>(Element)) {
11377 if (auto ArrayLiteral = dyn_cast<ObjCArrayLiteral>(Element))
11379 else if (auto DictionaryLiteral = dyn_cast<ObjCDictionaryLiteral>(Element))
11448 if (auto *IntLit = dyn_cast<IntegerLiteral>(E->IgnoreParenImpCasts())) {
11468 const auto *IL = dyn_cast<IntegerLiteral>(E);
11470 if (auto *UO = dyn_cast<UnaryOperator>(E)) {
11472 return dyn_cast<IntegerLiteral>(UO->getSubExpr());
11509 if (const auto *BO = dyn_cast<BinaryOperator>(E)) {
11528 if (const auto *CO = dyn_cast<ConditionalOperator>(E)) {
11605 if (auto *ArrayLiteral = dyn_cast<ObjCArrayLiteral>(E))
11607 else if (auto *DictionaryLiteral = dyn_cast<ObjCDictionaryLiteral>(E))
11626 if (auto VecTy = dyn_cast<VectorType>(Target))
11645 const BuiltinType *SourceBT = dyn_cast<BuiltinType>(Source);
11646 const BuiltinType *TargetBT = dyn_cast<BuiltinType>(Target);
11889 if (auto *UO = dyn_cast<UnaryOperator>(E))
11953 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
11954 if (EnumConstantDecl *ECD = dyn_cast<EnumConstantDecl>(DRE->getDecl())) {
12049 if (const auto *UO = dyn_cast<UnaryOperator>(E))
12065 if (CallExpr *Call = dyn_cast<CallExpr>(E))
12076 if (PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {
12081 if (auto *OVE = dyn_cast<OpaqueValueExpr>(SE))
12086 if (auto *CE = dyn_cast<ExplicitCastExpr>(E)) {
12093 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
12117 BinaryOperator *BO = dyn_cast<BinaryOperator>(E);
12142 if (const UnaryOperator *U = dyn_cast<UnaryOperator>(E)) {
12176 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
12179 } else if (const MemberExpr *M = dyn_cast<MemberExpr>(E)) {
12182 } else if (const CallExpr *Call = dyn_cast<CallExpr>(E)) {
12248 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
12279 if (auto *Call = dyn_cast<CallExpr>(E->IgnoreParenImpCasts())) {
12290 if (DeclRefExpr *R = dyn_cast<DeclRefExpr>(E)) {
12292 } else if (MemberExpr *M = dyn_cast<MemberExpr>(E)) {
12301 if (const auto* PV = dyn_cast<ParmVarDecl>(D)) {
12309 if (const auto *FD = dyn_cast<FunctionDecl>(PV->getDeclContext())) {
12453 if (auto InitList = dyn_cast<InitListExpr>(OriginalE))
12457 else if (auto Call = dyn_cast<CallExpr>(E))
12459 else if (auto Message = dyn_cast<ObjCMessageExpr>(E))
12655 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
12658 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
12663 } else if (MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
12667 } else if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
13109 if (auto *RD = dyn_cast<CXXRecordDecl>(DC->getParent()))
13123 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
13126 if (const auto *ME = dyn_cast<MemberExpr>(E))
13167 if (auto *CE = dyn_cast<CastExpr>(Op)) {
13170 } else if (auto *UO = dyn_cast<UnaryOperator>(Op)) {
13193 const FieldDecl *FD = dyn_cast<FieldDecl>(ND);
13209 const Expr *SizeExpr = dyn_cast<IntegerLiteral>(CTL.getSizeExpr());
13216 const RecordDecl *RD = dyn_cast<RecordDecl>(FD->getDeclContext());
13219 if (const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
13264 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(BaseExpr))
13266 if (const MemberExpr *ME = dyn_cast<MemberExpr>(BaseExpr))
13355 dyn_cast<ArraySubscriptExpr>(BaseExpr))
13357 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(BaseExpr))
13359 if (const MemberExpr *ME = dyn_cast<MemberExpr>(BaseExpr))
13466 if (CastExpr *cast = dyn_cast<CastExpr>(e)) {
13480 if (ObjCIvarRefExpr *ref = dyn_cast<ObjCIvarRefExpr>(e)) {
13494 if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(e)) {
13495 VarDecl *var = dyn_cast<VarDecl>(ref->getDecl());
13500 if (MemberExpr *member = dyn_cast<MemberExpr>(e)) {
13508 if (PseudoObjectExpr *pseudo = dyn_cast<PseudoObjectExpr>(e)) {
13511 = dyn_cast<ObjCPropertyRefExpr>(pseudo->getSyntacticForm()
13605 if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(e)) {
13613 } else if (CallExpr *CE = dyn_cast<CallExpr>(e)) {
13625 BlockExpr *block = dyn_cast<BlockExpr>(e);
13784 if (OpaqueValueExpr *OE = dyn_cast<OpaqueValueExpr>(Arg)) {
13789 if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {
13799 if (OpaqueValueExpr *OE = dyn_cast<OpaqueValueExpr>(Receiver)) {
13803 if (DeclRefExpr *ReceiverRE = dyn_cast<DeclRefExpr>(Receiver)) {
13804 if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {
13817 } else if (ObjCIvarRefExpr *IvarRE = dyn_cast<ObjCIvarRefExpr>(Receiver)) {
13818 if (ObjCIvarRefExpr *IvarArgRE = dyn_cast<ObjCIvarRefExpr>(Arg)) {
13912 while (ImplicitCastExpr *cast = dyn_cast<ImplicitCastExpr>(RHS)) {
13949 = dyn_cast<ObjCPropertyRefExpr>(LHS->IgnoreParens());
13990 while (ImplicitCastExpr *cast = dyn_cast<ImplicitCastExpr>(RHS)) {
14048 const NullStmt *NBody = dyn_cast<NullStmt>(Body);
14067 if (const ForStmt *FS = dyn_cast<ForStmt>(S)) {
14071 } else if (const WhileStmt *WS = dyn_cast<WhileStmt>(S)) {
14079 const NullStmt *NBody = dyn_cast<NullStmt>(Body);
14142 const CallExpr *CE = dyn_cast<CallExpr>(RHSExpr);
14153 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
14154 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
14176 const MemberExpr *LHSME = dyn_cast<MemberExpr>(LHSExpr);
14177 const MemberExpr *RHSME = dyn_cast<MemberExpr>(RHSExpr);
14188 LHSME = dyn_cast<MemberExpr>(LHSBase);
14189 RHSME = dyn_cast<MemberExpr>(RHSBase);
14192 LHSDeclRef = dyn_cast<DeclRefExpr>(LHSBase);
14193 RHSDeclRef = dyn_cast<DeclRefExpr>(RHSBase);
14252 if (const CXXRecordDecl *D1CXX = dyn_cast<CXXRecordDecl>(RD1)) {
14270 } else if (const CXXRecordDecl *D2CXX = dyn_cast<CXXRecordDecl>(RD2)) {
14571 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(ArgumentExpr))
14670 const auto *ME = dyn_cast<MemberExpr>(E);
14692 auto *FD = dyn_cast<FieldDecl>(MD);
14702 ME = dyn_cast<MemberExpr>(ME->getBase()->IgnoreParens());
14711 const auto *DRE = dyn_cast<DeclRefExpr>(TopBase);
tools/clang/lib/Sema/SemaCodeComplete.cpp 377 } else if (const auto *Function = dyn_cast<FunctionDecl>(S.CurContext)) {
381 } else if (const auto *Method = dyn_cast<ObjCMethodDecl>(S.CurContext)) {
683 if (const auto *Namespace = dyn_cast<NamespaceDecl>(Parent)) {
688 } else if (const auto *TD = dyn_cast<TagDecl>(Parent))
883 if (const auto *Type = dyn_cast<TypeDecl>(ND))
885 if (const auto *Iface = dyn_cast<ObjCInterfaceDecl>(ND))
891 else if (const auto *Method = dyn_cast<ObjCMethodDecl>(ND))
893 else if (const auto *Enumerator = dyn_cast<EnumConstantDecl>(ND))
895 else if (const auto *Property = dyn_cast<ObjCPropertyDecl>(ND))
897 else if (const auto *Value = dyn_cast<ValueDecl>(ND))
945 if (const auto *ImplicitParam = dyn_cast<ImplicitParamDecl>(ND))
989 if (const auto *Method = dyn_cast<ObjCMethodDecl>(R.Declaration))
1027 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(D))
1029 else if ((Record = dyn_cast<CXXRecordDecl>(D))) {
1050 if (const auto *Tmpl = dyn_cast<FunctionTemplateDecl>(ND))
1065 if (const UsingShadowDecl *Using = dyn_cast<UsingShadowDecl>(R.Declaration)) {
1154 if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(Ctx))
1157 else if (const TagDecl *Tag = dyn_cast<TagDecl>(Ctx))
1238 if (const auto *Using = dyn_cast<UsingShadowDecl>(R.Declaration)) {
1277 if (const auto *Namespace = dyn_cast<NamespaceDecl>(Ctx))
1280 else if (const auto *Tag = dyn_cast<TagDecl>(Ctx))
1295 if (const auto *Method = dyn_cast<CXXMethodDecl>(R.Declaration))
1393 if (const auto *ID = dyn_cast<ObjCInterfaceDecl>(ND)) {
1413 if (const auto *VD = dyn_cast<ValueDecl>(ND->getUnderlyingDecl()))
1437 if (const auto *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1451 if (const auto *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1455 if (const auto *RD = dyn_cast<RecordDecl>(ND))
1465 if (const auto *ClassTemplate = dyn_cast<ClassTemplateDecl>(ND))
1468 if (const auto *RD = dyn_cast<RecordDecl>(ND))
1547 const auto *Var = dyn_cast<VarDecl>(ND);
1599 NamingClass = llvm::dyn_cast<CXXRecordDecl>(InitialLookupCtx);
1940 const auto *CR = llvm::dyn_cast<CXXRecordDecl>(S.CurContext);
2298 if (const auto *Function = dyn_cast<FunctionDecl>(SemaRef.CurContext))
2300 else if (const auto *Method = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext))
2605 else if (const auto *Method = dyn_cast<ObjCMethodDecl>(ND)) {
2610 } else if (const auto *Enumerator = dyn_cast<EnumConstantDecl>(ND)) {
2615 } else if (const auto *Ivar = dyn_cast<ObjCIvarDecl>(ND)) {
2620 } else if (const auto *Value = dyn_cast<ValueDecl>(ND)) {
2622 } else if (const auto *Property = dyn_cast<ObjCPropertyDecl>(ND)) {
2991 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(*P)) {
3004 dyn_cast<NonTypeTemplateParmDecl>(*P)) {
3356 if (const auto *Function = dyn_cast<FunctionDecl>(ND)) {
3368 dyn_cast<FunctionTemplateDecl>(ND)) {
3388 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(Param))
3391 dyn_cast<NonTypeTemplateParmDecl>(Param))
3422 if (const auto *Template = dyn_cast<TemplateDecl>(ND)) {
3432 if (const auto *Method = dyn_cast<ObjCMethodDecl>(ND)) {
3538 const auto *M = dyn_cast<ObjCMethodDecl>(ND);
3662 dyn_cast<FunctionProtoType>(getFunctionType());
3818 if (const auto *TD = dyn_cast<TagDecl>(D)) {
3957 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(CurContext);
4422 if (ObjCInterfaceDecl *Interface = dyn_cast<ObjCInterfaceDecl>(Container)) {
4429 if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
4616 if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
4623 dyn_cast<ObjCInterfaceDecl>(Container)) {
4647 dyn_cast<ObjCCategoryDecl>(Container)) {
4991 CaseStmt *Case = dyn_cast<CaseStmt>(SC);
4996 if (auto *DRE = dyn_cast<DeclRefExpr>(CaseVal))
4998 dyn_cast<EnumConstantDecl>(DRE->getDecl())) {
5078 if (const auto *Proto = dyn_cast<FunctionProtoType>(FType))
5124 if (auto ULE = dyn_cast<UnresolvedLookupExpr>(NakedFn))
5127 else if (auto UME = dyn_cast<UnresolvedMemberExpr>(NakedFn)) {
5146 if (auto *MCE = dyn_cast<MemberExpr>(NakedFn))
5147 FD = dyn_cast<FunctionDecl>(MCE->getMemberDecl());
5148 else if (auto *DRE = dyn_cast<DeclRefExpr>(NakedFn))
5149 FD = dyn_cast<FunctionDecl>(DRE->getDecl());
5219 if (auto *FD = dyn_cast<FunctionDecl>(C)) {
5225 } else if (auto *FTD = dyn_cast<FunctionTemplateDecl>(C)) {
5246 dyn_cast<CXXConstructorDecl>(ConstructorDecl);
5566 auto *Constructor = dyn_cast<CXXConstructorDecl>(ConstructorD);
5597 if (const auto *Function = dyn_cast<FunctionDecl>(ND))
5599 else if (const auto *FunTemplDecl = dyn_cast<FunctionTemplateDecl>(ND))
5741 const auto *Var = dyn_cast<VarDecl>(D);
6197 ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(Container);
6222 if (const auto *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
7078 if (const auto *Proto = dyn_cast<ObjCProtocolDecl>(D))
7142 if (const auto *Class = dyn_cast<ObjCInterfaceDecl>(D))
7236 if (const auto *Category = dyn_cast<ObjCCategoryDecl>(D))
7303 if (const auto *PropertyImpl = dyn_cast<ObjCPropertyImplDecl>(D))
7310 dyn_cast<ObjCImplementationDecl>(Container))
7342 dyn_cast<ObjCImplementationDecl>(Container))
7433 if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(Container)) {
7462 if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(Container)) {
7479 if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
8160 ObjCContainerDecl *OCD = dyn_cast<ObjCContainerDecl>(CurContext);
8167 if (ObjCImplementationDecl *Impl = dyn_cast<ObjCImplementationDecl>(D)) {
8171 dyn_cast<ObjCCategoryImplDecl>(D)) {
8175 SearchDecl = dyn_cast<ObjCContainerDecl>(D);
8180 SearchDecl = dyn_cast<ObjCContainerDecl>(DC);
8303 ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(SearchDecl);
8305 if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(SearchDecl))
tools/clang/lib/Sema/SemaConcept.cpp 28 if (auto *BinOp = dyn_cast<BinaryOperator>(ConstraintExpression)) {
32 } else if (auto *C = dyn_cast<ExprWithCleanups>(ConstraintExpression))
56 if (auto *BO = dyn_cast<BinaryOperator>(ConstraintExpr)) {
75 else if (auto *C = dyn_cast<ExprWithCleanups>(ConstraintExpr))
tools/clang/lib/Sema/SemaCoroutine.cpp 77 if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
194 auto *FD = dyn_cast<FunctionDecl>(S.CurContext);
222 auto *MD = dyn_cast<CXXMethodDecl>(FD);
360 if (auto *TE = dyn_cast<TypoExpr>(Result.get())) {
509 if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
1156 if (auto *MD = dyn_cast<CXXMethodDecl>(&FD)) {
1406 if (auto *MbrRef = dyn_cast<CXXMemberCallExpr>(E)) {
tools/clang/lib/Sema/SemaDecl.cpp 95 auto *RD = dyn_cast<CXXRecordDecl>(ND);
202 else if (auto *CTD = dyn_cast<ClassTemplateDecl>(TD)) {
245 RD = dyn_cast<CXXRecordDecl>(DC);
468 if (TypeDecl *TD = dyn_cast<TypeDecl>(IIDecl)) {
473 auto *FoundRD = dyn_cast<CXXRecordDecl>(TD);
484 } else if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(IIDecl)) {
528 auto *ND = dyn_cast<NamespaceDecl>(DC);
531 else if (auto *RD = dyn_cast<CXXRecordDecl>(DC))
548 if (const auto *MD = dyn_cast<CXXMethodDecl>(DC))
1122 if (TypeDecl *Type = dyn_cast<TypeDecl>(FirstDecl)) {
1131 ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(FirstDecl);
1135 dyn_cast<ObjCCompatibleAliasDecl>(FirstDecl))
1218 if (auto *Ivar = dyn_cast<ObjCIvarDecl>(Found->getUnderlyingDecl()))
1278 while (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC->getLexicalParent()))
1597 if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(D))
1617 if (const RecordDecl *RD = dyn_cast<RecordDecl>(DC)){
1647 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
1656 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
1668 } else if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
1702 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
1708 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
1723 if (auto *DD = dyn_cast<DecompositionDecl>(D)) {
1749 if (const auto *R = dyn_cast<CXXRecordDecl>(D->getDeclContext()))
1764 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
1789 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Tag)) {
1795 dyn_cast<ExprWithCleanups>(Init))
1798 dyn_cast<CXXConstructExpr>(Init);
1833 if (const auto *T = dyn_cast<TypedefNameDecl>(TmpD))
1835 else if(const auto *R = dyn_cast<RecordDecl>(TmpD))
1846 if (auto *TD = dyn_cast<TypedefNameDecl>(D)) {
1897 if (const auto *RD = dyn_cast<RecordDecl>(D))
1904 if (LabelDecl *LD = dyn_cast<LabelDecl>(D))
1912 if (const auto *FD = dyn_cast<FieldDecl>(ShadowI->second)) {
2150 if (auto *OldTD = dyn_cast<TypedefNameDecl>(Old)) {
2170 if (TypedefNameDecl *OldTypedef = dyn_cast<TypedefNameDecl>(Old))
2271 if (auto *OldTD = dyn_cast<TypedefNameDecl>(Old)) {
2312 if (TypedefNameDecl *Typedef = dyn_cast<TypedefNameDecl>(Old)) {
2381 const OwnershipAttr *OA = dyn_cast<OwnershipAttr>(A);
2382 const AnnotateAttr *Ann = dyn_cast<AnnotateAttr>(A);
2400 if (VarDecl *VD = dyn_cast<VarDecl>(D))
2402 if (TagDecl *TD = dyn_cast<TagDecl>(D))
2462 if (ValueDecl *VD = dyn_cast<ValueDecl>(New))
2529 if (const auto *AA = dyn_cast<AvailabilityAttr>(Attr))
2535 else if (const auto *VA = dyn_cast<VisibilityAttr>(Attr))
2537 else if (const auto *VA = dyn_cast<TypeVisibilityAttr>(Attr))
2539 else if (const auto *ImportA = dyn_cast<DLLImportAttr>(Attr))
2541 else if (const auto *ExportA = dyn_cast<DLLExportAttr>(Attr))
2543 else if (const auto *FA = dyn_cast<FormatAttr>(Attr))
2546 else if (const auto *SA = dyn_cast<SectionAttr>(Attr))
2548 else if (const auto *CSA = dyn_cast<CodeSegAttr>(Attr))
2550 else if (const auto *IA = dyn_cast<MSInheritanceAttr>(Attr))
2553 else if (const auto *AA = dyn_cast<AlwaysInlineAttr>(Attr))
2562 } else if (const auto *MA = dyn_cast<MinSizeAttr>(Attr))
2564 else if (const auto *OA = dyn_cast<OptimizeNoneAttr>(Attr))
2566 else if (const auto *InternalLinkageA = dyn_cast<InternalLinkageAttr>(Attr))
2568 else if (const auto *CommonA = dyn_cast<CommonAttr>(Attr))
2578 else if (const auto *UA = dyn_cast<UuidAttr>(Attr))
2580 else if (const auto *SLHA = dyn_cast<SpeculativeLoadHardeningAttr>(Attr))
2582 else if (const auto *SLHA = dyn_cast<NoSpeculativeLoadHardeningAttr>(Attr))
2599 if (const TagDecl *TD = dyn_cast<TagDecl>(D))
2601 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
2607 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
2634 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {
2661 if (const VarDecl *VD = dyn_cast<VarDecl>(Def)) {
2678 } else if (const AlignedAttr *AA = dyn_cast<AlignedAttr>(NewAttribute)) {
2854 if (auto *VD = dyn_cast<VarDecl>(New)) {
3072 auto *Old = dyn_cast<ExpectedDecl>(OldS->getTargetDecl());
3140 if (auto *FD = dyn_cast<FunctionDecl>(NewD))
3142 else if (auto *VD = dyn_cast<VarDecl>(NewD))
3162 if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {
3468 const CXXMethodDecl *OldMethod = dyn_cast<CXXMethodDecl>(Old);
3469 CXXMethodDecl *NewMethod = dyn_cast<CXXMethodDecl>(New);
3620 (OldProto = dyn_cast<FunctionProtoType>(OldFuncType))) {
3978 OldTemplate = dyn_cast<VarTemplateDecl>(Previous.getFoundDecl());
3982 dyn_cast<UsingShadowDecl>(Previous.getRepresentativeDecl()))
3986 Old = dyn_cast<VarDecl>(Previous.getFoundDecl());
3989 dyn_cast<UsingShadowDecl>(Previous.getRepresentativeDecl()))
4414 else if (ClassTemplateDecl *CTD = dyn_cast<ClassTemplateDecl>(TagD))
4528 Record = dyn_cast<RecordDecl>(Tag);
4718 if (IndirectFieldDecl *IF = dyn_cast<IndirectFieldDecl>(VD))
4780 const auto *FD = dyn_cast<FieldDecl>(I);
4781 if (const auto *IFD = dyn_cast<IndirectFieldDecl>(I))
4899 if (auto *FD = dyn_cast<FieldDecl>(Mem)) {
4924 } else if (auto *MemRecord = dyn_cast<RecordDecl>(Mem)) {
5006 if (RecordDecl *OwningClass = dyn_cast<RecordDecl>(Owner)) {
5055 if (VarDecl *NewVD = dyn_cast<VarDecl>(Anon)) {
5217 CXXRecordDecl *CurClass = dyn_cast<CXXRecordDecl>(CurContext);
5404 CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(DC);
5406 Record = dyn_cast<CXXRecordDecl>(Record->getParent());
5747 if (const PointerType* PTy = dyn_cast<PointerType>(Ty)) {
5756 if (const ParenType* PTy = dyn_cast<ParenType>(Ty)) {
6082 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
6107 if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
6140 if (auto *VD = dyn_cast<VarDecl>(&ND)) {
6162 auto *VD = dyn_cast<VarDecl>(&ND);
6166 const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(VD->getDeclContext());
6169 NS = dyn_cast<NamespaceDecl>(NS->getParent());
6188 if (auto *MD = dyn_cast<CXXMethodDecl>(&ND))
6197 if (const auto *FD = dyn_cast<FunctionDecl>(&ND)) {
6209 const auto *MD = dyn_cast<CXXMethodDecl>(FD);
6230 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) {
6236 if (TemplateDecl *NewTD = dyn_cast<TemplateDecl>(NewDecl)) {
6264 auto *VD = dyn_cast<VarDecl>(OldDecl);
6267 auto *FD = dyn_cast<FunctionDecl>(OldDecl);
6298 if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) {
6304 } else if (const auto *FD = dyn_cast<FunctionDecl>(NewDecl)) {
6344 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDecl)) {
6470 if (const auto *FD = dyn_cast<FunctionDecl>(D))
6472 if (const auto *VD = dyn_cast<VarDecl>(D))
6688 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC)) {
7263 if (FieldDecl *FD = dyn_cast<FieldDecl>(ShadowedDecl)) {
7265 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDC))
7272 if (const auto PVD = dyn_cast<ParmVarDecl>(D)) {
7280 if (VarDecl *shadowedVar = dyn_cast<VarDecl>(ShadowedDecl))
7297 if (const auto *RD = dyn_cast<CXXRecordDecl>(NewDC->getParent())) {
7400 auto *DRE = dyn_cast<DeclRefExpr>(E);
7482 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Prev))
7822 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
7868 if (CXXMethodDecl *OldMD = dyn_cast<CXXMethodDecl>(I)) {
7922 FunctionDecl *FD = dyn_cast<FunctionDecl>(*CDecl);
7926 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
7989 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewFD);
7995 FunctionDecl *FD = dyn_cast<FunctionDecl>(*Func);
8018 FunctionDecl *FD = dyn_cast<FunctionDecl>(*CDecl);
8077 if (CXXMethodDecl *NewMD = dyn_cast<CXXMethodDecl>(NewFD))
8084 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
8471 if (const FieldDecl *Field = dyn_cast<FieldDecl>(Next)) {
8631 dyn_cast<CXXRecordDecl>(NewFD->getDeclContext())) {
8972 auto *TD = dyn_cast<TagDecl>(NonParmDecl);
8977 if (auto *ECD = dyn_cast<EnumConstantDecl>(NonParmDecl))
9546 const auto *Method = dyn_cast<CXXMethodDecl>(FD);
9561 while ((Parent = dyn_cast<CXXRecordDecl>(Parent->getParent()))) {
9654 auto *VD = dyn_cast<ValueDecl>(D);
9655 auto *PrevVD = dyn_cast<ValueDecl>(PrevDecl);
9759 if (const auto *NewCXXFD = dyn_cast<CXXMethodDecl>(NewFD)) {
10318 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewFD);
10359 dyn_cast<FunctionTemplateDecl>(OldDecl)) {
10413 const auto *FD = dyn_cast<FunctionDecl>(ND);
10432 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(NewFD)) {
10435 dyn_cast<CXXDestructorDecl>(NewFD)) {
10452 = dyn_cast<CXXConversionDecl>(NewFD)) {
10454 } else if (auto *Guide = dyn_cast<CXXDeductionGuideDecl>(NewFD)) {
10466 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(NewFD)) {
10791 if (ValueDecl *VD = dyn_cast<ValueDecl>(OrigDecl)) {
10802 InitListExpr *InitList = dyn_cast<InitListExpr>(E);
10826 while (MemberExpr *ME = dyn_cast<MemberExpr>(Base)) {
10827 FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
10837 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Base);
10874 if (DeclRefExpr* DRE = dyn_cast<DeclRefExpr>(E)) {
10879 if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E)) {
10887 dyn_cast<BinaryConditionalOperator>(E)) {
10893 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E)) {
10898 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
10914 while (MemberExpr *ME = dyn_cast<MemberExpr>(Base)) {
10920 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Base))
10955 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(E->getMemberDecl());
10958 while (MemberExpr *ME = dyn_cast<MemberExpr>(Base)) {
10964 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Base)) {
11008 if (InitListExpr *ILE = dyn_cast<InitListExpr>(ArgExpr))
11011 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(ArgExpr))
11085 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E))
11087 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(ICE->getSubExpr()))
11159 if (auto *IL = dyn_cast<InitListExpr>(Init))
11277 if (auto *CE = dyn_cast<ConstantExpr>(Init))
11284 if (auto *ILE = dyn_cast<InitListExpr>(Init)) {
11556 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(RealDecl)) {
11564 VarDecl *VDecl = dyn_cast<VarDecl>(RealDecl);
11688 ParenListExpr *CXXDirectInit = dyn_cast<ParenListExpr>(Init);
11822 if (auto *E = dyn_cast<ExprWithCleanups>(Init))
11823 if (auto *BE = dyn_cast<BlockExpr>(E->getSubExpr()->IgnoreParens()))
11992 VarDecl *VD = dyn_cast<VarDecl>(D);
11996 if (auto *DD = dyn_cast<DecompositionDecl>(D))
12034 if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {
12272 VarDecl *VD = dyn_cast<VarDecl>(D);
12473 if (auto *DD = dyn_cast<DecompositionDecl>(var))
12645 if (auto *DD = dyn_cast<DecompositionDecl>(ThisDecl)) {
12796 auto *VD = dyn_cast<VarDecl>(DD);
12817 if (auto *DD = dyn_cast<DeclaratorDecl>(D)) {
12821 FirstDecompDeclaratorInGroup = dyn_cast<DecompositionDecl>(D);
12879 VarDecl *D = dyn_cast<VarDecl>(Group[i]);
12889 auto *AT = dyn_cast<AutoType>(DT);
13495 if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D))
13580 auto *NonParmDecl = dyn_cast<NamedDecl>(NPD);
13592 if (auto *ED = dyn_cast<EnumDecl>(NonParmDecl)) {
13704 else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(Decl))
13832 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(FD))
13834 else if (CXXDestructorDecl *Destructor = dyn_cast<CXXDestructorDecl>(FD))
13894 if (const auto *CmpndBody = dyn_cast<CompoundStmt>(Body))
13899 if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
14003 if (CXXDestructorDecl *Destructor = dyn_cast<CXXDestructorDecl>(dcl)) {
14034 if (auto *DS = dyn_cast<DeclStmt>(S)) {
14036 if (const auto *Var = dyn_cast<VarDecl>(Decl)) {
14082 if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D))
14554 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(Previous))
14643 NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(DC);
14834 if (RecordDecl *RD = dyn_cast<RecordDecl>(New)) {
15103 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(PrevDecl)) {
15121 if (auto *Shadow = dyn_cast<UsingShadowDecl>(DirectPrevDecl)) {
15122 auto *OldTag = dyn_cast<TagDecl>(PrevDecl);
15138 if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {
15248 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Def))
15252 else if (EnumDecl *ED = dyn_cast<EnumDecl>(Def))
15369 } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) {
15501 if (RecordDecl *RD = dyn_cast<RecordDecl>(New)) {
15608 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(New))
15623 if (auto RD = dyn_cast<RecordDecl>(New))
15713 if (RecordDecl *RD = dyn_cast<RecordDecl>(Tag))
15756 if (RecordDecl *RD = dyn_cast<RecordDecl>(Tag))
16300 dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {
16310 dyn_cast<ObjCCategoryDecl>(EnclosingDecl)) {
16376 ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CurContext);
16378 if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(CurContext)) {
16423 RecordDecl *Record = dyn_cast<RecordDecl>(EnclosingDecl);
16424 CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(EnclosingDecl);
16431 if (const auto *IFD = dyn_cast<IndirectFieldDecl>(I))
16793 if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(EnclosingDecl)) {
16805 dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {
16815 dyn_cast<ObjCCategoryDecl>(EnclosingDecl)) {
17180 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(InitExpr)) {
17183 IntegerLiteral *IL = dyn_cast<IntegerLiteral>(BO->getRHS());
17193 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(InitExpr);
17197 EnumConstantDecl *EnumConstant = dyn_cast<EnumConstantDecl>(DRE->getDecl());
17647 if (NamedDecl *ND = dyn_cast<NamedDecl>(PrevDecl))
tools/clang/lib/Sema/SemaDeclAttr.cpp 91 if (const auto *BD = dyn_cast<BlockDecl>(D))
98 if (const auto *FD = dyn_cast<FunctionDecl>(D))
100 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
102 if (const auto *BD = dyn_cast<BlockDecl>(D))
110 if (const auto *BD = dyn_cast<BlockDecl>(D))
129 if (const auto *FD = dyn_cast<FunctionDecl>(D))
131 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
139 if (const auto *BD = dyn_cast<BlockDecl>(D))
145 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(D))
385 const auto *Literal = dyn_cast<StringLiteral>(ArgExpr->IgnoreParenCasts());
479 const CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(Record);
543 if (const auto *CRD = dyn_cast<CXXRecordDecl>(RD)) {
605 if (const auto *E = dyn_cast<CastExpr>(Ex))
607 else if (const auto *E = dyn_cast<ParenExpr>(Ex))
609 else if (const auto *E = dyn_cast<UnaryOperator>(Ex)) {
614 } else if (const auto *E = dyn_cast<BinaryOperator>(Ex)) {
638 const auto *MD = dyn_cast<const CXXMethodDecl>(D);
662 if (const auto *StrLit = dyn_cast<StringLiteral>(ArgExp)) {
682 if (const auto *UOp = dyn_cast<UnaryOperator>(ArgExp))
684 if (const auto *DRE = dyn_cast<DeclRefExpr>(UOp->getSubExpr()))
693 const auto *FD = dyn_cast<FunctionDecl>(D);
694 const auto *IL = dyn_cast<IntegerLiteral>(ArgExp);
1014 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
1036 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
1066 if (const auto *FD = dyn_cast<FunctionDecl>(D))
1304 if (auto *TD = dyn_cast<TagDecl>(D))
1306 else if (auto *FD = dyn_cast<FieldDecl>(D)) {
1335 if (const auto *VD = dyn_cast<ObjCIvarDecl>(D)) {
1342 else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {
1826 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
1884 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
2004 ValueDecl *VD = dyn_cast<ValueDecl>(D);
2221 const auto *OldAA = dyn_cast<AvailabilityAttr>(Attrs[i]);
2360 auto *ND = dyn_cast<NamedDecl>(D);
2580 if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {
2587 else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {
2607 if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {
2679 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
2690 } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
2695 } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {
2700 } else if (const auto *V = dyn_cast<VarDecl>(D)) {
2731 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
2861 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
2930 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
3033 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
3036 FD = dyn_cast<FunctionDecl>(DRE->getDecl());
3043 } else if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {
3449 const auto *CalleeFnProtoType = dyn_cast<FunctionProtoType>(CalleeFnType);
3486 const auto *TD = dyn_cast<TypedefNameDecl>(D);
3490 RD = dyn_cast<RecordDecl>(D);
3579 if (const auto *TD = dyn_cast<TypedefNameDecl>(D))
3581 else if (const auto *VD = dyn_cast<ValueDecl>(D))
3662 } else if (const auto *VD = dyn_cast<VarDecl>(D)) {
3667 } else if (const auto *FD = dyn_cast<FieldDecl>(D)) {
3687 if (const auto *TND = dyn_cast<TypedefNameDecl>(D)) {
3740 const auto *VD = dyn_cast<VarDecl>(D);
3767 if (const auto *VD = dyn_cast<ValueDecl>(D)) {
3771 if (const auto *ED = dyn_cast<EnumDecl>(D))
3948 if (const auto *TD = dyn_cast<TypedefNameDecl>(D))
3950 else if (const auto *ED = dyn_cast<EnumDecl>(D)) {
4035 if (auto *TD = dyn_cast<TypedefNameDecl>(D))
4037 else if (auto *ED = dyn_cast<EnumDecl>(D))
4080 if (const auto *VD = dyn_cast<VarDecl>(D)) {
4103 if (const auto *VD = dyn_cast<VarDecl>(D)) {
4237 if (const auto *Method = dyn_cast<CXXMethodDecl>(FD)) {
4956 const auto *PVD = dyn_cast<ParmVarDecl>(D);
4969 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
4974 } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {
4976 } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
4978 } else if (const auto *Param = dyn_cast<ParmVarDecl>(D)) {
5150 if (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {
5210 if (auto *CatDecl = dyn_cast<ObjCCategoryDecl>(Ctx))
5237 auto *RD = dyn_cast<RecordDecl>(D);
5409 if (const auto *NS = dyn_cast<NamespaceDecl>(D)) {
5910 const auto *VD = dyn_cast<ValueDecl>(D);
5914 const auto *TD = dyn_cast<TypedefNameDecl>(D);
5982 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
5992 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
6122 if (const auto *NSD = dyn_cast<NamespaceDecl>(D)) {
6152 if (const auto *S = dyn_cast<VarDecl>(D))
6294 if (const auto *PDecl = dyn_cast<ParmVarDecl>(D)) {
6369 if (auto *VD = dyn_cast<VarDecl>(D)) {
6427 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
6686 if (auto *PVD = dyn_cast<ParmVarDecl>(D))
7336 if (auto *FD = dyn_cast<FunctionDecl>(ND)) {
7363 } else if (auto *VD = dyn_cast<VarDecl>(ND)) {
7407 if (auto *VD = dyn_cast<VarDecl>(D))
7410 if (auto *FD = dyn_cast<FunctionDecl>(D))
7496 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
7516 if (const auto *Avail = dyn_cast<AvailabilityAttr>(A)) {
7556 while (const auto *TD = dyn_cast<TypedefNameDecl>(D)) {
7568 if (const auto *IDecl = dyn_cast<ObjCInterfaceDecl>(D)) {
7575 if (const auto *ECD = dyn_cast<EnumConstantDecl>(D))
7578 if (const auto *TheEnumDecl = dyn_cast<EnumDecl>(DC)) {
7585 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
7624 if (const auto *MD = dyn_cast<ObjCMethodDecl>(OffendingDecl)) {
7625 if (const auto *Impl = dyn_cast<ObjCImplDecl>(C)) {
7643 if (const auto *MethodD = dyn_cast<ObjCMethodDecl>(Ctx))
7648 if (const auto *CatOrImpl = dyn_cast<ObjCImplDecl>(Ctx)) {
7654 else if (const auto *CatD = dyn_cast<ObjCCategoryDecl>(Ctx))
7694 if (auto *CD = dyn_cast<ObjCContainerDecl>(Ctx)) {
7695 if (auto *Imp = dyn_cast<ObjCImplDecl>(Ctx))
7701 return dyn_cast<NamedDecl>(OrigCtx);
7770 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
7775 if (const auto *TD = dyn_cast<TagDecl>(D)) {
7870 if (const auto *TD = dyn_cast<TagDecl>(Enclosing))
7985 if (const auto *MethodDecl = dyn_cast<ObjCMethodDecl>(ReferringDecl)) {
8346 if (const auto *CS = dyn_cast<CompoundStmt>(S)) {
8413 if (const auto *TT = dyn_cast<TagType>(TyPtr)) {
8417 } else if (const auto *TD = dyn_cast<TypedefType>(TyPtr)) {
8421 } else if (const auto *ObjCO = dyn_cast<ObjCObjectType>(TyPtr)) {
8431 if (auto *E = dyn_cast<ObjCAvailabilityCheckExpr>(If->getCond())) {
8462 } else if (auto *MD = dyn_cast<ObjCMethodDecl>(D))
8464 else if (auto *BD = dyn_cast<BlockDecl>(D))
8504 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
tools/clang/lib/Sema/SemaDeclCXX.cpp 88 if (ParmVarDecl *Param = dyn_cast<ParmVarDecl>(Decl)) {
100 } else if (VarDecl *VDecl = dyn_cast<VarDecl>(Decl)) {
130 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E)) {
515 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(New);
605 = dyn_cast<CXXRecordDecl>(New->getDeclContext())) {
1147 dyn_cast<FunctionTemplateDecl>(D->getUnderlyingDecl())) {
1678 const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewFD);
1707 const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(NewFD);
1739 if (auto *Dtor = dyn_cast<CXXDestructorDecl>(NewFD)) {
2176 = dyn_cast<CXXConstructorDecl>(Dcl)) {
2557 CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(classdecl);
2969 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
3032 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D);
3378 if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(Member))
3380 else if (VarTemplateDecl *VarTmpl = dyn_cast<VarTemplateDecl>(Member))
3393 if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(NonTemplateMember)) {
3405 if (const auto *AccessSpec = dyn_cast<AccessSpecDecl>(D))
3488 FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl());
3494 ME = dyn_cast<MemberExpr>(ME->getBase()->IgnoreParenImpCasts());
3536 dyn_cast<MemberExpr>(Base->IgnoreParenImpCasts())) {
3541 if (FieldDecl *FD = dyn_cast<FieldDecl>(SubME->getMemberDecl()))
3559 if (ImplicitCastExpr *BaseCast = dyn_cast<ImplicitCastExpr>(Base)) {
3604 if (MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
3610 if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E)) {
3618 dyn_cast<BinaryConditionalOperator>(E)) {
3624 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E)) {
3629 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
3651 if (InitListExpr *SubList = dyn_cast<InitListExpr>(Child)) {
3670 InitListExpr *ILE = dyn_cast<InitListExpr>(E);
3705 if (InitListExpr *ILE = dyn_cast<InitListExpr>(ArgExpr))
3708 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(ArgExpr))
3754 if (MemberExpr *ME = dyn_cast<MemberExpr>(E->getLHS()))
3755 if (FieldDecl *FD = dyn_cast<FieldDecl>(ME->getMemberDecl()))
3774 if (MemberExpr *ME = dyn_cast<MemberExpr>(E->getSubExpr())) {
3811 if (auto *FD = dyn_cast<FieldDecl>(I)) {
3813 } else if (auto *IFD = dyn_cast<IndirectFieldDecl>(I)) {
3838 dyn_cast<CXXDefaultInitExpr>(InitExpr)) {
3873 FieldDecl *FD = dyn_cast<FieldDecl>(D);
4011 if (FieldDecl *Member = dyn_cast<FieldDecl>(ND))
4038 if ((Member = dyn_cast<FieldDecl>(Result.front())) ||
4039 (Member = dyn_cast<IndirectFieldDecl>(Result.front())))
4066 = dyn_cast<CXXConstructorDecl>(ConstructorD);
4220 FieldDecl *DirectMember = dyn_cast<FieldDecl>(Member);
4221 IndirectFieldDecl *IndirectMember = dyn_cast<IndirectFieldDecl>(Member);
4232 if (ParenListExpr *ParenList = dyn_cast<ParenListExpr>(Init)) {
4234 } else if (InitListExpr *InitList = dyn_cast<InitListExpr>(Init)) {
4304 if (ParenListExpr *ParenList = dyn_cast<ParenListExpr>(Init)) {
4441 if (ParenListExpr *ParenList = dyn_cast<ParenListExpr>(Init)) {
4828 FieldDecl *Field = dyn_cast<FieldDecl>(C);
4984 FieldDecl *FD = dyn_cast<FieldDecl>(C);
5063 if (auto *F = dyn_cast<FieldDecl>(Mem)) {
5086 if (auto *F = dyn_cast<IndirectFieldDecl>(Mem)) {
5311 = dyn_cast<CXXConstructorDecl>(ConstructorDecl);
5496 = dyn_cast<CXXConstructorDecl>(CDtorDecl)) {
5770 auto *VD = dyn_cast<VarDecl>(Member);
5776 auto *MD = dyn_cast<CXXMethodDecl>(Member);
5825 auto *CD = dyn_cast<CXXConstructorDecl>(Member);
5869 if (auto *Spec = dyn_cast<ClassTemplatePartialSpecializationDecl>(Class)) {
5938 VarDecl *VD = dyn_cast<VarDecl>(Member);
5939 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Member);
5962 auto *Ctor = dyn_cast<CXXConstructorDecl>(MD);
6051 if (auto *ImportAttr = dyn_cast<DLLImportAttr>(NewAttr))
6096 if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
6097 if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(FD)) {
6276 auto *CD = dyn_cast<CXXConstructorDecl>(MD);
7059 CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(FD->getLexicalDeclContext());
7074 if (auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
7913 dyn_cast<CXXConstructorDecl>(TI->getTemplatedDecl()))
8219 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
8281 if (UsingShadowDecl *shad = dyn_cast<UsingShadowDecl>(*I))
8283 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(ND))
8475 if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D))
8478 if (auto *PSD = dyn_cast<ClassTemplatePartialSpecializationDecl>(D))
8481 if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
8485 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
8491 if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
8495 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(TD)) {
8592 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Method))
8692 = dyn_cast<CXXRecordDecl>(Constructor->getDeclContext());
9286 if (auto *ND = dyn_cast<NamedDecl>(I))
9366 if (TranslationUnitDecl *TU = dyn_cast<TranslationUnitDecl>(Parent)) {
9400 if (TranslationUnitDecl *TU = dyn_cast<TranslationUnitDecl>(Parent)) {
9661 dyn_cast<ClassTemplateSpecializationDecl>(RT->getDecl());
10017 if (TypedefNameDecl *TD1 = dyn_cast<TypedefNameDecl>(D1))
10018 if (TypedefNameDecl *TD2 = dyn_cast<TypedefNameDecl>(D2))
10102 if (auto *RD = dyn_cast<CXXRecordDecl>(D)) {
10116 if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(*I))
10208 if (auto *TargetTD = dyn_cast<TemplateDecl>(Target))
10328 auto *FoundRecord = dyn_cast<CXXRecordDecl>(ND);
10357 auto *RD = dyn_cast<CXXRecordDecl>(ND->getDeclContext());
10364 auto *FoundRecord = dyn_cast<CXXRecordDecl>(ND);
10408 if (auto *RD = dyn_cast<CXXRecordDecl>(CurContext))
10536 dyn_cast<CXXRecordDecl>(CurContext));
10553 auto *RD = dyn_cast<CXXRecordDecl>(ND);
10736 if (UsingDecl *UD = dyn_cast<UsingDecl>(D)) {
10740 = dyn_cast<UnresolvedUsingValueDecl>(D)) {
10744 = dyn_cast<UnresolvedUsingTypenameDecl>(D)) {
11157 if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {
11823 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(CurContext)) {
12142 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D))
12203 CXXMemberCallExpr *CE = dyn_cast<CXXMemberCallExpr>(Call.get());
13465 if (auto *Shadow = dyn_cast<ConstructorUsingShadowDecl>(FoundDecl)) {
13533 FieldDecl *Pattern = dyn_cast<FieldDecl>(Lookup[0]);
13805 auto *MD = dyn_cast<CXXMethodDecl>(FnDecl);
13864 if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {
13983 dyn_cast<NonTypeTemplateParmDecl>(TemplateParams->getParam(0));
13992 dyn_cast<TemplateTypeParmDecl>(TemplateParams->getParam(0));
13994 dyn_cast<NonTypeTemplateParmDecl>(TemplateParams->getParam(1));
15102 if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(ND))
15174 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Fn)) {
15207 auto *FD = dyn_cast<FunctionDecl>(Dcl);
15209 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(Dcl)) {
15485 else if (auto *M = dyn_cast<CXXMethodDecl>(D))
16017 if (const auto *G = dyn_cast<GuardedByAttr>(A))
16019 else if (const auto *G = dyn_cast<PtGuardedByAttr>(A))
16021 else if (const auto *AA = dyn_cast<AcquiredAfterAttr>(A))
16023 else if (const auto *AB = dyn_cast<AcquiredBeforeAttr>(A))
16025 else if (const auto *ETLF = dyn_cast<ExclusiveTrylockFunctionAttr>(A)) {
16028 } else if (const auto *STLF = dyn_cast<SharedTrylockFunctionAttr>(A)) {
16031 } else if (const auto *LR = dyn_cast<LockReturnedAttr>(A))
16033 else if (const auto *LE = dyn_cast<LocksExcludedAttr>(A))
16035 else if (const auto *RC = dyn_cast<RequiresCapabilityAttr>(A))
16037 else if (const auto *AC = dyn_cast<AcquireCapabilityAttr>(A))
16039 else if (const auto *AC = dyn_cast<TryAcquireCapabilityAttr>(A))
16041 else if (const auto *RC = dyn_cast<ReleaseCapabilityAttr>(A))
16115 if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(MethodD))
16118 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(MethodD);
tools/clang/lib/Sema/SemaDeclObjC.cpp 148 = dyn_cast<ObjCInterfaceDecl>(NewMethod->getDeclContext());
151 if (ObjCCategoryDecl *Cat = dyn_cast<ObjCCategoryDecl>(DC))
153 else if (ObjCImplDecl *Impl = dyn_cast<ObjCImplDecl>(DC))
156 = dyn_cast<ObjCCategoryImplDecl>(DC))
305 if (const auto *CD = dyn_cast<ObjCCategoryDecl>(ND)) {
442 dyn_cast<ObjCImplDecl>(MDecl->getDeclContext());
444 dyn_cast<ObjCContainerDecl>(IMD->getDeclContext());
446 if (ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(ContDeclOfMethodDecl))
448 else if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(ContDeclOfMethodDecl)) {
590 SuperClassDecl = dyn_cast<ObjCInterfaceDecl>(IDecl);
1545 if (auto typeDecl = dyn_cast<TypeDecl>(decl)) {
1551 if (auto objcClass = dyn_cast<ObjCInterfaceDecl>(decl)) {
2680 ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl);
2682 : dyn_cast<ObjCInterfaceDecl>(CDecl);
2866 if (ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl> (CDecl)) {
2875 if (ObjCInterfaceDecl *I = dyn_cast<ObjCInterfaceDecl> (CDecl)) {
2976 if (const ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
3000 dyn_cast<ObjCCategoryImplDecl>(IMPDecl))
3010 if (ObjCInterfaceDecl *I = dyn_cast<ObjCInterfaceDecl> (CDecl)) {
3014 } else if (ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl)) {
3049 TypedefNameDecl *TDD = dyn_cast<TypedefNameDecl>(PrevDecl);
3263 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext());
3265 dyn_cast<ObjCProtocolDecl>(MethodInList->getDeclContext());
3286 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext()))
3451 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext());
3811 if ((IntfDecl = dyn_cast<ObjCInterfaceDecl>(OCD))) {
3813 } else if (auto *ImplDecl = dyn_cast<ObjCImplementationDecl>(OCD)) {
3816 } else if (auto *CategoryDecl = dyn_cast<ObjCCategoryDecl>(OCD)) {
3966 } else if (ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(ClassDecl)) {
3976 if (ObjCContainerDecl *CDecl = dyn_cast<ObjCContainerDecl>(ClassDecl)) {
3985 if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) {
4074 dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {
4085 } else if (const auto *IntfDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {
4104 if (VarDecl *VDecl = dyn_cast<VarDecl>(*I)) {
4204 dyn_cast<ObjCCategoryDecl>(container)) {
4660 if (ObjCImplDecl *ImpDecl = dyn_cast<ObjCImplDecl>(ClassDecl)) {
4716 ObjCInterfaceDecl *CurrentClass = dyn_cast<ObjCInterfaceDecl>(ClassDecl);
4718 if (ObjCCategoryDecl *Cat = dyn_cast<ObjCCategoryDecl>(ClassDecl))
4720 else if (ObjCImplDecl *Impl = dyn_cast<ObjCImplDecl>(ClassDecl))
4723 = dyn_cast<ObjCCategoryImplDecl>(ClassDecl))
4830 RecordDecl *Record = dyn_cast<RecordDecl>(TagD);
4845 else if (RecordDecl *Record = dyn_cast<RecordDecl>(TagD))
tools/clang/lib/Sema/SemaExceptionSpec.cpp 42 auto *RD = dyn_cast<CXXRecordDecl>(CurContext);
51 auto *ND = dyn_cast<NamespaceDecl>(RD->getDeclContext());
233 auto *MD = dyn_cast<CXXMethodDecl>(FD);
1001 if (auto *Op = dyn_cast<BinaryOperator>(E)) {
tools/clang/lib/Sema/SemaExpr.cpp 59 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
102 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Decl);
118 auto *Ctor = dyn_cast<CXXConstructorDecl>(Decl);
173 const FunctionDecl *UsedFn = dyn_cast<FunctionDecl>(D);
253 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
255 auto *Ctor = dyn_cast<CXXConstructorDecl>(FD);
276 if (auto *MD = dyn_cast<CXXMethodDecl>(D)) {
289 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
304 auto *DRD = dyn_cast<OMPDeclareReductionDecl>(CurContext);
317 auto *DMD = dyn_cast<OMPDeclareMapperDecl>(CurContext);
353 if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
356 } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
373 if (const FunctionProtoType *proto = dyn_cast<FunctionProtoType>(fn)) {
452 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()))
453 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl()))
484 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts()))
595 if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(E->IgnoreParenCasts())) {
608 dyn_cast<ObjCIvarRefExpr>(E->IgnoreParenCasts()))
1799 if (VarDecl *VD = dyn_cast<VarDecl>(D)) {
1833 FieldDecl *FD = dyn_cast<FieldDecl>(D);
1834 if (IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(D))
1845 if (auto *BD = dyn_cast<BindingDecl>(D))
1955 CXXMethodDecl *CurMethod = dyn_cast<CXXMethodDecl>(CurContext);
2029 dyn_cast<FunctionTemplateDecl>(CD))
2033 else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(CD))
2129 else if (auto *MD = dyn_cast<CXXMethodDecl>(S.CurContext))
2554 dyn_cast<ObjCIvarDecl>(Lookup.getFoundDecl())) {
2668 CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Member->getDeclContext());
2693 } else if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Member)) {
2901 const auto *FD = dyn_cast<FunctionDecl>(R.getFoundDecl());
2957 if (TemplateDecl *Template = dyn_cast<TemplateDecl>(D)) {
2965 ValueDecl *VD = dyn_cast<ValueDecl>(D);
2987 if (IndirectFieldDecl *indirectField = dyn_cast<IndirectFieldDecl>(VD))
3806 ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E);
3883 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParens())) {
3884 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) {
3898 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E->IgnoreParens())) {
3986 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Inner)) {
3988 } else if (MemberExpr *ME = dyn_cast<MemberExpr>(Inner)) {
4163 auto *CSI = dyn_cast<CapturingScopeInfo>(*I);
4167 if (auto *LSI = dyn_cast<LambdaScopeInfo>(CSI))
4169 else if (auto *CRSI = dyn_cast<CapturedRegionScopeInfo>(CSI))
4171 else if (auto *BSI = dyn_cast<BlockScopeInfo>(CSI))
4324 if (auto *MSProp = dyn_cast<MSPropertyRefExpr>(BaseNoParens))
4426 while ((Member = dyn_cast<MemberExpr>(StrippedExpr)) && !Member->isArrow())
4454 while ((Member = dyn_cast<MemberExpr>(Base->IgnoreParenCasts())) &&
4780 auto *CSI = dyn_cast<CapturingScopeInfo>(*I);
4784 if (auto *LSI = dyn_cast<LambdaScopeInfo>(CSI))
4786 else if (auto *CRSI = dyn_cast<CapturedRegionScopeInfo>(CSI))
4788 else if (auto *BSI = dyn_cast<BlockScopeInfo>(CSI))
4907 if (auto Init = dyn_cast<ExprWithCleanups>(Param->getInit())) {
4984 MemberExpr *ME = dyn_cast<MemberExpr>(Fn);
4998 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(CD))
5176 if (auto *BE = dyn_cast<BlockExpr>(Arg->IgnoreParenNoopCasts(Context)))
5283 const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(AT);
5513 if (const auto *MD = dyn_cast<CXXMethodDecl>(DC))
5517 if (const auto *RD = dyn_cast<CXXRecordDecl>(DC))
5593 if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(Fn)) {
5650 *this, dyn_cast<UnresolvedMemberExpr>(Fn->IgnoreParens()),
5685 if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(ovl))
5705 if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(NakedFn)) {
5712 if (auto *DRE = dyn_cast<DeclRefExpr>(NakedFn)) {
5715 FunctionDecl *FDecl = dyn_cast<FunctionDecl>(NDecl);
5893 TheCall = dyn_cast<CallExpr>(Result.get());
6106 if (auto ILE = dyn_cast<InitListExpr>(LiteralExpr))
6158 if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {
6679 ParenExpr *PE = dyn_cast<ParenExpr>(CastExpr);
6680 ParenListExpr *PLE = dyn_cast<ParenListExpr>(CastExpr);
6733 if (ParenListExpr *PE = dyn_cast<ParenListExpr>(E)) {
6807 ParenListExpr *E = dyn_cast<ParenListExpr>(OrigExpr);
7314 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
7641 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E)) {
7647 if (BinaryOperator *OP = dyn_cast<BinaryOperator>(E)) {
7656 if (CXXOperatorCallExpr *Call = dyn_cast<CXXOperatorCallExpr>(E)) {
7686 if (BinaryOperator *OP = dyn_cast<BinaryOperator>(E))
7688 if (UnaryOperator *OP = dyn_cast<UnaryOperator>(E))
8697 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(Op))
8699 if (auto *BTE = dyn_cast<CXXBindTemporaryExpr>(Op))
8701 if (auto *ICE = dyn_cast<ImplicitCastExpr>(Op)) {
8833 if (auto *ICE = dyn_cast<ImplicitCastExpr>(E))
9209 const auto *LUE = dyn_cast<UnaryExprOrTypeTraitExpr>(LHS);
9210 const auto *RUE = dyn_cast<UnaryExprOrTypeTraitExpr>(RHS);
9231 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSArg)) {
9245 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSArg)) {
9492 StringLiteral* StrExpr = dyn_cast<StringLiteral>(LHSExpr->IgnoreImpCasts());
9495 StrExpr = dyn_cast<StringLiteral>(RHSExpr->IgnoreImpCasts());
9524 dyn_cast<CharacterLiteral>(RHSExpr->IgnoreImpCasts());
9527 CharExpr = dyn_cast<CharacterLiteral>(LHSExpr->IgnoreImpCasts());
10258 UnaryOperator *UO = dyn_cast<UnaryOperator>(LHS.get()->IgnoreImpCasts());
10298 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) {
10300 } else if (const MemberExpr *Mem = dyn_cast<MemberExpr>(E)) {
10464 if (const auto *ICE = dyn_cast<ImplicitCastExpr>(E))
10625 if (const auto *CL = dyn_cast<CharacterLiteral>(E.get())) {
10631 } else if (const auto *CE = dyn_cast<CStyleCastExpr>(E.get())) {
10883 if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(DC)) {
11173 const auto *LHSInt = dyn_cast<IntegerLiteral>(XorLHS.get());
11174 const auto *RHSInt = dyn_cast<IntegerLiteral>(XorRHS.get());
11180 if (const auto *UO = dyn_cast<UnaryOperator>(XorRHS.get())) {
11184 RHSInt = dyn_cast<IntegerLiteral>(UO->getSubExpr());
11347 if (const auto *DREHS = dyn_cast<DeclRefExpr>(HS.get())) {
11348 const auto *ECDHS = dyn_cast<EnumConstantDecl>(DREHS->getDecl());
11442 const MemberExpr *ME = dyn_cast<MemberExpr>(E);
11445 ObjCMessageExpr *Base = dyn_cast<ObjCMessageExpr>(
11460 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E);
11465 VarDecl *var = dyn_cast<VarDecl>(DRE->getDecl());
11476 if (auto *FD = dyn_cast<FunctionDecl>(DC))
11531 if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
11534 if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {
11554 } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(VD)) {
11571 dyn_cast<ArraySubscriptExpr>(E)) {
11575 dyn_cast<ExtVectorElementExpr>(E)) {
11582 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
11596 } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
11611 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) {
11687 if (const MemberExpr *ME = dyn_cast<MemberExpr>(E))
11690 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
11732 DeclRefExpr *declRef = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts());
11843 MemberExpr *ML = dyn_cast<MemberExpr>(LHSExpr);
11844 MemberExpr *MR = dyn_cast<MemberExpr>(RHSExpr);
11864 ObjCIvarRefExpr *OL = dyn_cast<ObjCIvarRefExpr>(LHSExpr);
11865 ObjCIvarRefExpr *OR = dyn_cast<ObjCIvarRefExpr>(RHSExpr);
11867 DeclRefExpr *RL = dyn_cast<DeclRefExpr>(OL->getBase()->IgnoreImpCasts());
11868 DeclRefExpr *RR = dyn_cast<DeclRefExpr>(OR->getBase()->IgnoreImpCasts());
11923 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(RHSCheck))
11925 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(RHSCheck)) {
11946 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(InnerLHS);
12011 if (const CastExpr *CE = dyn_cast<CastExpr>(E)) {
12057 while (const BinaryOperator *BO = dyn_cast<BinaryOperator>(LHS)) {
12232 if (ImplicitCastExpr* ICE = dyn_cast<ImplicitCastExpr>(Base)) {
12334 auto* VarRef = dyn_cast<DeclRefExpr>(op);
12343 if (UnaryOperator* uOp = dyn_cast<UnaryOperator>(op)) {
12438 if (const VarDecl *vd = dyn_cast<VarDecl>(dcl)) {
12502 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Exp);
12508 const ParmVarDecl *Param = dyn_cast<ParmVarDecl>(D);
12511 if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(Param->getDeclContext()))
12654 const DeclRefExpr *LHSDeclRef = dyn_cast<DeclRefExpr>(LHSExpr);
12655 const DeclRefExpr *RHSDeclRef = dyn_cast<DeclRefExpr>(RHSExpr);
12709 if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(Ex)) {
12724 if (auto *DRE = dyn_cast<DeclRefExpr>(E))
12726 if (auto *ME = dyn_cast<MemberExpr>(E))
12728 if (auto *IRE = dyn_cast<ObjCIvarRefExpr>(E))
12892 if (auto *BE = dyn_cast<BlockExpr>(RHS.get()->IgnoreParens()))
12893 if (auto *DRE = dyn_cast<DeclRefExpr>(LHS.get()->IgnoreParens()))
12894 if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
13028 if (const ObjCIsaExpr *OISA = dyn_cast<ObjCIsaExpr>(LHS.get()->IgnoreParenCasts())) {
13045 dyn_cast<ObjCIvarRefExpr>(LHS.get()->IgnoreParenCasts()))
13080 BinaryOperator *LHSBO = dyn_cast<BinaryOperator>(LHSExpr);
13081 BinaryOperator *RHSBO = dyn_cast<BinaryOperator>(RHSExpr);
13150 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) {
13159 if (BinaryOperator *RBop = dyn_cast<BinaryOperator>(Bop->getRHS())) {
13172 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(RHSExpr)) {
13189 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {
13204 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {
13218 CXXOperatorCallExpr *OCE = dyn_cast<CXXOperatorCallExpr>(LHSExpr);
13382 auto *OE = dyn_cast<OverloadExpr>(LHSExpr);
13675 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
13685 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(VD))
13691 if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {
13696 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
13808 dyn_cast<ValueStmt>(Compound->getStmtExprResult())) {
13844 auto *Cast = dyn_cast<ImplicitCastExpr>(E);
13940 if (CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD)) {
14439 if (const FunctionDecl *F = dyn_cast<FunctionDecl>(CurContext)) {
14597 if (OpaqueValueExpr *OV = dyn_cast<OpaqueValueExpr>(SrcExpr))
14601 StringLiteral *SL = dyn_cast<StringLiteral>(SrcExpr);
14618 auto *DRE = dyn_cast<DeclRefExpr>(SrcExpr->IgnoreParenImpCasts());
14622 auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl());
15092 if (const auto *E = dyn_cast<UnaryOperator>(PossibleDeref)) {
15095 } else if (const auto *E = dyn_cast<ArraySubscriptExpr>(PossibleDeref)) {
15097 } else if (const auto *E = dyn_cast<MemberExpr>(PossibleDeref)) {
15099 } else if (const auto E = dyn_cast<DeclRefExpr>(PossibleDeref)) {
15144 if (auto *BO = dyn_cast<BinaryOperator>(E->IgnoreParenImpCasts())) {
15388 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(Func);
15421 if (auto *Constructor = dyn_cast<CXXConstructorDecl>(Func))
15490 dyn_cast<CXXConstructorDecl>(Func)) {
15507 dyn_cast<CXXDestructorDecl>(Func)) {
15516 } else if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(Func)) {
16128 if (auto *RSI = dyn_cast<CapturedRegionScopeInfo>(CSI)) {
16221 if (BlockScopeInfo *BSI = dyn_cast<BlockScopeInfo>(CSI)) {
16225 } else if (CapturedRegionScopeInfo *RSI = dyn_cast<CapturedRegionScopeInfo>(CSI)) {
16330 auto *VD = dyn_cast<VarDecl>(D);
16667 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
16670 } else if (auto *ME = dyn_cast<MemberExpr>(E)) {
16673 } else if (auto *FP = dyn_cast<FunctionParmPackExpr>(E)) {
16715 dyn_cast<VarTemplateSpecializationDecl>(Var);
16869 if (VarDecl *Var = dyn_cast<VarDecl>(D)) {
16878 const MemberExpr *ME = dyn_cast<MemberExpr>(E);
16881 CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(ME->getMemberDecl());
16904 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(E->getDecl()))
16921 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(E->getMemberDecl()))
16943 if (auto *VD = dyn_cast<VarDecl>(D)) {
16948 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
17014 if (VarDecl *VD = dyn_cast<VarDecl>(E->getDecl()))
17189 if (BinaryOperator *Op = dyn_cast<BinaryOperator>(E)) {
17197 = dyn_cast<ObjCMessageExpr>(Op->getRHS()->IgnoreParenCasts())) {
17210 } else if (CXXOperatorCallExpr *Op = dyn_cast<CXXOperatorCallExpr>(E)) {
17216 } else if (PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E))
17252 if (BinaryOperator *opE = dyn_cast<BinaryOperator>(E))
17271 if (ParenExpr *parenE = dyn_cast<ParenExpr>(E))
17549 const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FnType);
17682 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(VD)) {
17703 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E);
17728 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
17793 ExplicitCastExpr *castArg = dyn_cast<ExplicitCastExpr>(arg->IgnoreParens());
17817 if (CallExpr *call = dyn_cast<CallExpr>(E)) {
17827 if (DeclRefExpr *ref = dyn_cast<DeclRefExpr>(E)) {
17830 } else if (MemberExpr *mem = dyn_cast<MemberExpr>(E)) {
17833 } else if (ObjCMessageExpr *msg = dyn_cast<ObjCMessageExpr>(E)) {
17900 } else if (const auto *ME = dyn_cast<MemberExpr>(BME)) {
17927 auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts());
17986 if (TypedefDecl *TD = dyn_cast<TypedefDecl>(ND))
tools/clang/lib/Sema/SemaExprCXX.cpp 109 auto *RD = dyn_cast<CXXRecordDecl>(ND);
283 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(Ctx))
298 = dyn_cast<ClassTemplateSpecializationDecl>(Record->getDecl())) {
611 if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(TD)) {
735 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Ex->IgnoreParens()))
736 if (VarDecl *Var = dyn_cast<VarDecl>(DRE->getDecl())) {
1085 if (CXXMethodDecl *method = dyn_cast<CXXMethodDecl>(DC)) {
1125 if (ClassTemplateDecl *Template = dyn_cast<ClassTemplateDecl>(ContextDecl))
1184 dyn_cast<CapturingScopeInfo>(FunctionScopes[idx])) {
1190 LambdaScopeInfo *LSI = dyn_cast<LambdaScopeInfo>(CSI);
1231 dyn_cast<LambdaScopeInfo>(FunctionScopes[MaxFunctionScopesIndex])) &&
1436 const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext);
1459 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FD))
1487 : Found(Found), FD(dyn_cast<FunctionDecl>(Found->getUnderlyingDecl())),
1515 if (auto *Caller = dyn_cast<FunctionDecl>(S.CurContext))
1724 if (ParenListExpr *PLE = dyn_cast<ParenListExpr>(Init))
1728 else if (CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init))
2234 if (FunctionTemplateDecl *FnTemplate = dyn_cast<FunctionTemplateDecl>(D)) {
2539 dyn_cast<FunctionTemplateDecl>((*D)->getUnderlyingDecl())) {
2557 EraseUnwantedCUDAMatches(dyn_cast<FunctionDecl>(CurContext), Matches);
2778 if (FunctionDecl *Func = dyn_cast<FunctionDecl>(*Alloc)) {
3054 if (const MemberExpr *ME = dyn_cast<const MemberExpr>(E)) {
3056 } else if (const DeclRefExpr *D = dyn_cast<const DeclRefExpr>(E)) {
3067 if (const InitListExpr *ILE = dyn_cast<const InitListExpr>(E)) {
3069 E = dyn_cast<const CXXNewExpr>(ILE->getInit(0)->IgnoreParenImpCasts());
3141 if (FieldDecl *F = dyn_cast<FieldDecl>(ME->getMemberDecl()))
3148 if (const VarDecl *VD = dyn_cast<const VarDecl>(D->getDecl())) {
3467 if (FunctionTemplateDecl *FnTemplate = dyn_cast<FunctionTemplateDecl>(D)) {
3564 auto Callee = dyn_cast<ImplicitCastExpr>(TheCall->getCallee());
3692 if (ImplicitCastExpr *Cast = dyn_cast<ImplicitCastExpr>(From))
3699 if (StringLiteral *StrLit = dyn_cast<StringLiteral>(From->IgnoreParens()))
3815 if (const CXXConversionDecl *Conv = dyn_cast<CXXConversionDecl>(FD)) {
6376 if (CallExpr *Call = dyn_cast<CallExpr>(E)) {
6382 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Callee))
6384 else if (MemberExpr *Mem = dyn_cast<MemberExpr>(Callee))
6415 if (ObjCMessageExpr *Send = dyn_cast<ObjCMessageExpr>(E)) {
6417 } else if (ObjCBoxedExpr *BoxedExpr = dyn_cast<ObjCBoxedExpr>(E)) {
6419 } else if (ObjCArrayLiteral *ArrayLit = dyn_cast<ObjCArrayLiteral>(E)) {
6428 = dyn_cast<ObjCDictionaryLiteral>(E)) {
6591 if (ParenExpr *PE = dyn_cast<ParenExpr>(E)) {
6599 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
6612 CXXBindTemporaryExpr *TopBind = dyn_cast<CXXBindTemporaryExpr>(E);
6613 CallExpr *TopCall = TopBind ? dyn_cast<CallExpr>(TopBind->getSubExpr())
6739 FunctionDecl *CurFD = dyn_cast<FunctionDecl>(CurContext);
6775 CallExpr *CE = dyn_cast<CallExpr>(Base);
6784 if (CXXOperatorCallExpr *OpCall = dyn_cast<CXXOperatorCallExpr>(Base))
7198 CastExpr *CE = dyn_cast<CastExpr>(SubE);
7202 if (CXXBindTemporaryExpr *BE = dyn_cast<CXXBindTemporaryExpr>(SubE))
7296 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E))
7300 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
7312 if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E))
7317 dyn_cast<BinaryConditionalOperator>(E)) {
7318 if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(BCO->getTrueExpr()))
7564 dyn_cast<CXXRecordDecl>(ND->getDeclContext()->getRedeclContext());
7588 } else if (auto *Ivar = dyn_cast<ObjCIvarDecl>(ND)) {
7680 if (auto *DRE = dyn_cast<DeclRefExpr>(E))
7682 if (auto *ME = dyn_cast<MemberExpr>(E))
7853 if (auto *OE = dyn_cast<OverloadExpr>(Callee)) {
7856 if (auto *BE = dyn_cast<CXXBindTemporaryExpr>(ResultCall))
7858 if (auto *CE = dyn_cast<CallExpr>(ResultCall))
tools/clang/lib/Sema/SemaExprMember.cpp 163 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC))
208 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FunctionLevelDC);
210 CXXRecordDecl *RepClass = dyn_cast<CXXRecordDecl>(Rep->getDeclContext());
617 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Record)) {
1116 if (FieldDecl *FD = dyn_cast<FieldDecl>(MemberDecl))
1120 if (MSPropertyDecl *PD = dyn_cast<MSPropertyDecl>(MemberDecl))
1124 if (IndirectFieldDecl *FD = dyn_cast<IndirectFieldDecl>(MemberDecl))
1131 if (VarDecl *Var = dyn_cast<VarDecl>(MemberDecl)) {
1138 if (CXXMethodDecl *MemberFn = dyn_cast<CXXMethodDecl>(MemberDecl)) {
1155 if (EnumConstantDecl *Enum = dyn_cast<EnumConstantDecl>(MemberDecl)) {
1161 if (VarTemplateDecl *VarTempl = dyn_cast<VarTemplateDecl>(MemberDecl)) {
1367 if (auto *Category = dyn_cast<ObjCCategoryDecl>(D))
1370 if (auto *Implementation = dyn_cast<ObjCImplementationDecl>(D))
1372 else if (auto *Interface = dyn_cast<ObjCInterfaceDecl>(D))
1417 dyn_cast<ObjCImplementationDecl>(ObjCImpDecl))
1420 dyn_cast<ObjCCategoryImplDecl>(ObjCImpDecl))
1438 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(BaseExp))
1442 if (DeclRefExpr *DE = dyn_cast<DeclRefExpr>(BaseExp))
1499 if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(PMDecl)) {
1509 if (ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(PMDecl)) {
1518 SMD = dyn_cast<ObjCMethodDecl>(SDecl);
1604 if (PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(BaseExpr.get()))
1803 auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext);
tools/clang/lib/Sema/SemaExprObjC.cpp 317 if (CharacterLiteral *Char = dyn_cast<CharacterLiteral>(Number)) {
448 else if (StringLiteral *String = dyn_cast<StringLiteral>(OrigElement)) {
471 dyn_cast<ObjCStringLiteral>(OrigElement)) {
530 if (auto *CE = dyn_cast<ImplicitCastExpr>(ValueExpr))
533 dyn_cast<StringLiteral>(CE->getSubExpr()->IgnoreParens())) {
606 dyn_cast<CharacterLiteral>(ValueExpr->IgnoreParens())) {
1270 ObjCMethodDecl *method = dyn_cast<ObjCMethodDecl>(DC);
1444 if (auto attributed = dyn_cast<AttributedType>(resultType.getTypePtr())) {
1473 dyn_cast<ObjCImplDecl>(MD->getDeclContext())) {
1476 dyn_cast<ObjCCategoryImplDecl>(impl)) {
1501 ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(CurContext);
1529 const ObjCMessageExpr *MsgSend = dyn_cast<ObjCMessageExpr>(E);
1667 if (auto *BE = dyn_cast<BlockExpr>(
1770 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(receiver))
2178 if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(ND))
2180 else if (TypeDecl *Type = dyn_cast<TypeDecl>(ND)) {
2342 const auto *SE = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens());
2407 dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts())) {
2545 dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext());
2627 const auto *Protocol = dyn_cast<ObjCProtocolDecl>(M->getDeclContext());
2861 dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext())) {
3071 dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {
3164 ObjCMethodDecl *method = dyn_cast<ObjCMethodDecl>(CurContext);
3199 dyn_cast<ObjCSelectorExpr>(Arg->IgnoreParenCasts())) {
3426 VarDecl *var = dyn_cast<VarDecl>(e->getDecl());
3567 if (const CXXNamedCastExpr *NCE = dyn_cast<CXXNamedCastExpr>(realCast)) {
3583 if (CStyleCastExpr *CCE = dyn_cast<CStyleCastExpr>(castedE))
3614 if (const CXXNamedCastExpr *NCE = dyn_cast<CXXNamedCastExpr>(realCast)) {
3659 while (const TypedefType *TD = dyn_cast<TypedefType>(T.getTypePtr())) {
3806 while (const TypedefType *TD = dyn_cast<TypedefType>(T.getTypePtr())) {
3872 while (const TypedefType *TD = dyn_cast<TypedefType>(T.getTypePtr())) {
3988 if (ObjCPropertyRefExpr *PRE = dyn_cast<ObjCPropertyRefExpr>(castExpr)) {
4218 if (const ParenType *PT = dyn_cast<ParenType>(DT))
4220 else if (const TypeOfType *TP = dyn_cast<TypeOfType>(DT))
4222 else if (const AttributedType *AT = dyn_cast<AttributedType>(DT))
4317 if (CStyleCastExpr *cast = dyn_cast<CStyleCastExpr>(realCast)) {
4321 } else if (ExplicitCastExpr *cast = dyn_cast<ExplicitCastExpr>(realCast)) {
4344 if (ParenExpr *pe = dyn_cast<ParenExpr>(e)) {
4347 } else if (UnaryOperator *uo = dyn_cast<UnaryOperator>(e)) {
4353 } else if (GenericSelectionExpr *gse = dyn_cast<GenericSelectionExpr>(e)) {
4403 if (auto *pe = dyn_cast<ParenExpr>(curExpr)) {
4409 if (auto *ce = dyn_cast<CastExpr>(curExpr)) {
4410 if (auto *ice = dyn_cast<ImplicitCastExpr>(ce))
4414 if (auto *pe = dyn_cast<ParenExpr>(prevExpr))
tools/clang/lib/Sema/SemaFixItUtils.cpp 105 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(Expr)) {
139 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(Expr)) {
tools/clang/lib/Sema/SemaInit.cpp 75 StringLiteral *SL = dyn_cast<StringLiteral>(Init);
151 } else if (ParenExpr *PE = dyn_cast<ParenExpr>(E)) {
153 } else if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
156 } else if (GenericSelectionExpr *GSE = dyn_cast<GenericSelectionExpr>(E)) {
158 } else if (ChooseExpr *CE = dyn_cast<ChooseExpr>(E)) {
173 } else if (ParenExpr *PE = dyn_cast<ParenExpr>(E)) {
175 } else if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
178 } else if (GenericSelectionExpr *GSE = dyn_cast<GenericSelectionExpr>(E)) {
180 } else if (ChooseExpr *CE = dyn_cast<ChooseExpr>(E)) {
195 if (const IncompleteArrayType *IAT = dyn_cast<IncompleteArrayType>(AT)) {
213 if (StringLiteral *SL = dyn_cast<StringLiteral>(Str->IgnoreParens())) {
539 for (NamespaceDecl *ND = dyn_cast<NamespaceDecl>(R->getDeclContext());
540 ND && !IsInStd; ND = dyn_cast<NamespaceDecl>(ND->getParent())) {
625 dyn_cast<InitListExpr>(ILE->getInit(Init))) {
629 dyn_cast<DesignatedInitUpdateExpr>(ILE->getInit(Init))) {
719 = dyn_cast<InitListExpr>(ILE->getInit(Init))) {
723 dyn_cast<DesignatedInitUpdateExpr>(ILE->getInit(Init))) {
795 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RDecl)) {
836 if (const auto *CAType = dyn_cast<ConstantArrayType>(AType))
979 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(structDecl))
1008 if (CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(ParentRD))
1271 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD))
1321 if (InitListExpr *SubInitList = dyn_cast<InitListExpr>(expr)) {
1523 if (InitListExpr *SubIList = dyn_cast<InitListExpr>(expr)) {
1851 if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(arrayType)) {
1869 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(arrayType)) {
1879 if (DesignatedInitExpr *DIE = dyn_cast<DesignatedInitExpr>(Init)) {
2095 if (DesignatedInitExpr *DIE = dyn_cast<DesignatedInitExpr>(Init)) {
2431 else if (InitListExpr *Result = dyn_cast<InitListExpr>(ExistingInit))
2451 dyn_cast<DesignatedInitUpdateExpr>(ExistingInit))
2499 if (auto *FD = dyn_cast<FieldDecl>(ND)) {
2503 if (auto *IFD = dyn_cast<IndirectFieldDecl>(ND)) {
2553 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RT->getDecl()))
2870 if (StringLiteral *SL = dyn_cast<StringLiteral>(SubExpr)) {
3055 if (const ConstantArrayType *CAType = dyn_cast<ConstantArrayType>(AType)) {
3947 FunctionTemplateDecl *ConvTemplate = dyn_cast<FunctionTemplateDecl>(D);
4100 if (auto *CD = dyn_cast<CXXConversionDecl>(Best->Function)) {
4542 FunctionTemplateDecl *ConvTemplate = dyn_cast<FunctionTemplateDecl>(D);
5023 if (CXXRecordDecl *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) {
5197 FunctionTemplateDecl *ConvTemplate = dyn_cast<FunctionTemplateDecl>(D);
5327 if (UnaryOperator *op = dyn_cast<UnaryOperator>(e)) {
5333 } else if (CastExpr *ce = dyn_cast<CastExpr>(e)) {
5360 VarDecl *var = dyn_cast<VarDecl>(cast<DeclRefExpr>(e)->getDecl());
5366 } else if (ConditionalOperator *cond = dyn_cast<ConditionalOperator>(e)) {
5543 auto *DRE = dyn_cast<DeclRefExpr>(E);
6423 if (auto *Shadow = dyn_cast<ConstructorUsingShadowDecl>(
6716 if (const auto *ND = dyn_cast<NamespaceDecl>(DC))
6802 if (auto *MCE = dyn_cast<CXXMemberCallExpr>(Call)) {
6807 } else if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(Call)) {
6813 } else if (auto *CE = dyn_cast<CallExpr>(Call)) {
6820 if (auto *CCE = dyn_cast<CXXConstructExpr>(Call)) {
6850 if (auto *CE = dyn_cast<CallExpr>(Call)) {
6865 } else if (auto *MCE = dyn_cast<CXXMemberCallExpr>(Call)) {
6905 if (auto *FE = dyn_cast<FullExpr>(Init))
6908 if (InitListExpr *ILE = dyn_cast<InitListExpr>(Init)) {
6920 if (CastExpr *CE = dyn_cast<CastExpr>(Init))
6926 if (auto *ASE = dyn_cast<ArraySubscriptExpr>(Init)) {
6928 auto *ICE = dyn_cast<ImplicitCastExpr>(Init);
6940 if (auto *DIE = dyn_cast<CXXDefaultInitExpr>(Init)) {
6947 if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(Init)) {
6964 auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
7034 if (auto *DIE = dyn_cast<CXXDefaultInitExpr>(Init)) {
7039 if (auto *FE = dyn_cast<FullExpr>(Init))
7045 if (CXXBindTemporaryExpr *BTE = dyn_cast<CXXBindTemporaryExpr>(Init))
7051 if (auto *CE = dyn_cast<CastExpr>(Init)) {
7060 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) {
7061 auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
7068 } else if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(L)) {
7119 if (auto *ILE = dyn_cast<CXXStdInitializerListExpr>(Init))
7124 if (InitListExpr *ILE = dyn_cast<InitListExpr>(Init)) {
7187 if (auto *LE = dyn_cast<LambdaExpr>(Init)) {
7334 auto *MTE = dyn_cast<MaterializeTemporaryExpr>(L);
7462 auto *DRE = dyn_cast<DeclRefExpr>(L);
7463 auto *VD = DRE ? dyn_cast<VarDecl>(DRE->getDecl()) : nullptr;
7501 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) {
7595 dyn_cast<CXXConstructExpr>(InitExpr->IgnoreParens());
7606 const CallExpr *CE = dyn_cast<CallExpr>(InitExpr->IgnoreParens());
7613 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg->IgnoreParenImpCasts());
7617 const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl());
7681 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts()))
7989 if (auto *DRE = dyn_cast<DeclRefExpr>(CurInit.get()->IgnoreParens())) {
7990 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl())) {
8050 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Fn)) {
8493 } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Init)) {
8699 auto *List = dyn_cast<InitListExpr>(Args[0]);
8948 auto *InitList = dyn_cast<InitListExpr>(Args[0]);
9662 auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(Candidate);
9671 auto *DeducedTST = dyn_cast<DeducedTemplateSpecializationType>(
9724 ? dyn_cast<InitListExpr>(Inits[0])
9753 auto *TD = dyn_cast<FunctionTemplateDecl>(D);
9755 TD ? TD->getTemplatedDecl() : dyn_cast<FunctionDecl>(D));
9824 auto *FD = dyn_cast<FunctionDecl>(D->getUnderlyingDecl());
tools/clang/lib/Sema/SemaLambda.cpp 265 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(DC))
294 if (ParmVarDecl *Param = dyn_cast<ParmVarDecl>(ManglingContextDecl)) {
299 } else if (VarDecl *Var = dyn_cast<VarDecl>(ManglingContextDecl)) {
306 else if (auto *VTS = dyn_cast<VarTemplateSpecializationDecl>(Var)) {
327 while (auto *CD = dyn_cast<CapturedDecl>(DC))
455 while (auto *CD = dyn_cast<CapturedDecl>(DC))
579 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
581 = dyn_cast<EnumConstantDecl>(DRE->getDecl())) {
589 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
597 if (StmtExpr *SE = dyn_cast<StmtExpr>(E)) {
606 if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E)) {
616 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
679 ExprWithCleanups *cleanups = dyn_cast<ExprWithCleanups>(retValue);
821 ParenListExpr *CXXDirectInit = dyn_cast<ParenListExpr>(Init);
tools/clang/lib/Sema/SemaLookup.cpp 393 if (auto *DFD = dyn_cast<FunctionDecl>(DUnderlying)) {
405 if (auto *DTD = dyn_cast<TemplateDecl>(DUnderlying)) {
429 if (VarDecl *DVD = dyn_cast<VarDecl>(DUnderlying)) {
528 if (TypeDecl *TD = dyn_cast<TypeDecl>(D)) {
952 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(DC))
966 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(DC))
976 if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(DC)) {
1045 FunctionTemplateDecl *ConvTemplate = dyn_cast<FunctionTemplateDecl>(*U);
1342 if (ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(Ctx)) {
1517 if (auto *TD = dyn_cast<TemplateDecl>(ND))
1524 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Entity)) {
1529 } else if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Entity)) {
1532 } else if (EnumDecl *ED = dyn_cast<EnumDecl>(Entity)) {
1535 } else if (VarDecl *VD = dyn_cast<VarDecl>(Entity)) {
1608 if (auto *P = dyn_cast<TemplateTypeParmDecl>(D))
1610 if (auto *P = dyn_cast<NonTypeTemplateParmDecl>(D))
1646 if (auto *RD = dyn_cast<CXXRecordDecl>(D))
1648 if (auto *FD = dyn_cast<FunctionDecl>(D))
1650 if (auto *VD = dyn_cast<VarDecl>(D))
1712 if (const auto *DCD = dyn_cast<Decl>(DC)) {
1865 if (auto *ND = dyn_cast<NamespaceDecl>(D)) {
2244 CXXRecordDecl *LookupRec = dyn_cast<CXXRecordDecl>(LookupCtx);
2582 if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
2689 = dyn_cast<ClassTemplateDecl>(Template.getAsTemplateDecl())) {
2691 if (CXXRecordDecl *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))
2734 if (CXXRecordDecl *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))
2750 = dyn_cast<ClassTemplateSpecializationDecl>(Class)) {
2752 if (CXXRecordDecl *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))
2876 if (CXXRecordDecl *EnclosingClass = dyn_cast<CXXRecordDecl>(Ctx))
3220 if (CXXMethodDecl *M = dyn_cast<CXXMethodDecl>(Cand->getUnderlyingDecl())) {
3232 dyn_cast<FunctionTemplateDecl>(Cand->getUnderlyingDecl())) {
3396 if (UsingShadowDecl *USD = dyn_cast<UsingShadowDecl>(D))
3410 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
3425 if (FunctionTemplateDecl *FD = dyn_cast<FunctionTemplateDecl>(D)) {
3560 if (auto *USD = dyn_cast<UsingShadowDecl>(D))
3800 if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx))
3830 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(Ctx)) {
3887 if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(Ctx)) {
3916 } else if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Ctx)) {
3922 } else if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(Ctx)) {
3955 if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
3974 if (ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(Ctx)) {
4605 if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(MemberContext)) {
5178 if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(D))
5180 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
5216 if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(ND))
5219 if (!(FD = dyn_cast<FunctionDecl>(ND)) && isa<ValueDecl>(ND)) {
5251 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
5279 if (VarDecl *VD = dyn_cast<VarDecl>(D))
5281 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
5283 if (TagDecl *TD = dyn_cast<TagDecl>(D))
5288 if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(D))
5290 if (ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl>(D))
5292 if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D))
tools/clang/lib/Sema/SemaModule.cpp 27 if (auto *LSD = dyn_cast<LinkageSpecDecl>(DC)) {
338 if (auto *ED = dyn_cast<ExportDecl>(DC))
550 if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {
650 if (auto *ND = dyn_cast<NamedDecl>(D)) {
663 if (auto *USD = dyn_cast<UsingShadowDecl>(D)) {
675 if (auto *DC = dyn_cast<DeclContext>(D))
tools/clang/lib/Sema/SemaObjCProperty.cpp 119 if (ObjCPropertyDecl *ProtoProp = dyn_cast<ObjCPropertyDecl>(R[I])) {
199 if (ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(ClassDecl)) {
233 if (ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {
240 if (ObjCPropertyDecl *SuperProp = dyn_cast<ObjCPropertyDecl>(R[I])) {
263 } else if (ObjCCategoryDecl *Cat = dyn_cast<ObjCCategoryDecl>(ClassDecl)) {
400 if (auto Category = dyn_cast<ObjCCategoryDecl>(OldDC))
1020 auto Category = dyn_cast<ObjCCategoryDecl>(Prop->getDeclContext());
1026 if (ObjCPropertyDecl *OrigProp = dyn_cast<ObjCPropertyDecl>(Found))
1053 dyn_cast<ObjCContainerDecl>(CurContext);
1070 if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {
1098 dyn_cast<ObjCCategoryDecl>(property->getDeclContext())) {
1115 if (ObjCPropertyDecl *ExtProp = dyn_cast<ObjCPropertyDecl>(R[0])) {
1143 } else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {
1705 if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl)) {
1725 if (ObjCCategoryDecl *CATDecl = dyn_cast<ObjCCategoryDecl>(CDecl)) {
1739 else if (ObjCProtocolDecl *PDecl = dyn_cast<ObjCProtocolDecl>(CDecl)) {
1873 dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {
1969 if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl))
1979 ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl);
1987 if (ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl)) {
2050 ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl);
2336 if (const ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CD))
2347 if (const ObjCCategoryDecl *CatDecl = dyn_cast<ObjCCategoryDecl>(CD))
2525 ObjCInterfaceDecl *CurrentClass = dyn_cast<ObjCInterfaceDecl>(CD);
2527 if (ObjCCategoryDecl *Cat = dyn_cast<ObjCCategoryDecl>(CD))
2529 else if (ObjCImplDecl *Impl = dyn_cast<ObjCImplDecl>(CD))
tools/clang/lib/Sema/SemaOpenMP.cpp 861 if (const auto *FE = dyn_cast<FullExpr>(E))
864 if (const auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
867 while (const auto *Binder = dyn_cast<CXXBindTemporaryExpr>(E))
870 if (const auto *ICE = dyn_cast<ImplicitCastExpr>(E))
880 if (const auto *CED = dyn_cast<OMPCapturedExprDecl>(D))
881 if (const auto *ME = dyn_cast<MemberExpr>(getExprAsWritten(CED->getInit())))
883 const auto *VD = dyn_cast<VarDecl>(D);
884 const auto *FD = dyn_cast<FieldDecl>(D);
904 auto *VD = dyn_cast<VarDecl>(D);
905 const auto *FD = dyn_cast<FieldDecl>(D);
1275 const VarDecl *VD = dyn_cast<VarDecl>(D);
1292 auto *VD = dyn_cast<VarDecl>(D);
1897 auto *VD = dyn_cast<VarDecl>(D);
1937 if (auto *RSI = dyn_cast<CapturedRegionScopeInfo>(FSI))
2012 if (const auto *VD = dyn_cast<VarDecl>(D)) {
2074 const auto *VD = dyn_cast<VarDecl>(D);
2157 if (auto *Clause = dyn_cast<OMPLastprivateClause>(C)) {
2399 if (const auto *VD = dyn_cast<VarDecl>(E->getDecl())) {
2732 auto *VD = dyn_cast<VarDecl>(D);
2789 if (auto *VD = dyn_cast<VarDecl>(E->getDecl())) {
2792 if (auto *CED = dyn_cast<OMPCapturedExprDecl>(VD))
2911 auto *FD = dyn_cast<FieldDecl>(E->getMemberDecl());
2913 if (auto *TE = dyn_cast<CXXThisExpr>(E->getBase()->IgnoreParens())) {
4092 while (auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
4098 while (auto *TempOASE = dyn_cast<OMPArraySectionExpr>(Base))
4100 while (auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base))
4282 if (auto *IRC = dyn_cast<OMPInReductionClause>(C)) {
4727 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(ADecl))
4730 auto *FD = dyn_cast<FunctionDecl>(ADecl);
4752 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
4753 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
4779 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
4780 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
4849 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
4850 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
4918 if (const auto *DRE = dyn_cast<DeclRefExpr>(Step))
4919 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
4971 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(ADecl))
4975 auto *FD = dyn_cast<FunctionDecl>(ADecl);
5023 auto *Method = dyn_cast<CXXMethodDecl>(FD);
5065 if (auto *UO = dyn_cast<UnaryOperator>(
5082 auto *DRE = dyn_cast<DeclRefExpr>(ER.get()->IgnoreParenImpCasts());
5115 if (const auto *CXXFD = dyn_cast<CXXMethodDecl>(FD)) {
5207 auto *DRE = dyn_cast<DeclRefExpr>(VariantRef->IgnoreParenImpCasts());
5655 if (auto *ExprTemp = dyn_cast<ExprWithCleanups>(S))
5660 if (Expr *E = dyn_cast<Expr>(S))
5662 if (auto *BO = dyn_cast<BinaryOperator>(S)) {
5665 if (auto *DRE = dyn_cast<DeclRefExpr>(LHS)) {
5666 if (auto *CED = dyn_cast<OMPCapturedExprDecl>(DRE->getDecl()))
5667 if (auto *ME = dyn_cast<MemberExpr>(getExprAsWritten(CED->getInit())))
5672 if (auto *ME = dyn_cast<MemberExpr>(LHS)) {
5679 } else if (auto *DS = dyn_cast<DeclStmt>(S)) {
5697 } else if (auto *CE = dyn_cast<CXXOperatorCallExpr>(S)) {
5700 if (auto *DRE = dyn_cast<DeclRefExpr>(LHS)) {
5701 if (auto *CED = dyn_cast<OMPCapturedExprDecl>(DRE->getDecl()))
5702 if (auto *ME = dyn_cast<MemberExpr>(getExprAsWritten(CED->getInit())))
5707 if (auto *ME = dyn_cast<MemberExpr>(LHS)) {
5738 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
5763 if (auto *BO = dyn_cast<BinaryOperator>(S)) {
5780 } else if (auto *CE = dyn_cast<CXXOperatorCallExpr>(S)) {
5824 if (auto *BO = dyn_cast<BinaryOperator>(RHS)) {
5832 } else if (auto *CE = dyn_cast<CXXOperatorCallExpr>(RHS)) {
5866 if (auto *ExprTemp = dyn_cast<ExprWithCleanups>(S))
5872 if (auto *UO = dyn_cast<UnaryOperator>(S)) {
5880 } else if (auto *BO = dyn_cast<BinaryOperator>(S)) {
5894 } else if (auto *CE = dyn_cast<CXXOperatorCallExpr>(S)) {
6367 auto *VD = dyn_cast<VarDecl>(LCDecl);
6475 auto *VD = dyn_cast<VarDecl>(D);
6953 if (auto *For = dyn_cast<ForStmt>(CurStmt)) {
6980 if (auto *For = dyn_cast<ForStmt>(CurStmt)) {
7667 if (auto *LC = dyn_cast<OMPLinearClause>(C))
7706 if (auto *LC = dyn_cast<OMPLinearClause>(C))
7742 if (auto *LC = dyn_cast<OMPLinearClause>(C))
7944 if (auto *LC = dyn_cast<OMPLinearClause>(C))
7985 if (auto *LC = dyn_cast<OMPLinearClause>(C))
8109 if (auto *DC = dyn_cast<OMPDependClause>(C)) {
8267 if (const auto *AtomicInnerBinOp = dyn_cast<BinaryOperator>(
8338 if (auto *AtomicBody = dyn_cast<Expr>(S)) {
8342 if (const auto *AtomicCompAssignOp = dyn_cast<CompoundAssignOperator>(
8351 } else if (auto *AtomicBinOp = dyn_cast<BinaryOperator>(
8356 } else if (const auto *AtomicUnaryOp = dyn_cast<UnaryOperator>(
8449 if (auto *EWC = dyn_cast<ExprWithCleanups>(Body))
8492 if (const auto *AtomicBody = dyn_cast<Expr>(Body)) {
8494 dyn_cast<BinaryOperator>(AtomicBody->IgnoreParenImpCasts());
8555 if (const auto *AtomicBody = dyn_cast<Expr>(Body)) {
8557 dyn_cast<BinaryOperator>(AtomicBody->IgnoreParenImpCasts());
8637 if (const auto *AtomicBody = dyn_cast<Expr>(Body)) {
8647 dyn_cast<BinaryOperator>(AtomicBody->IgnoreParenImpCasts());
8695 if (auto *CS = dyn_cast<CompoundStmt>(Body)) {
8700 if (auto *EWC = dyn_cast<ExprWithCleanups>(First))
8702 if (auto *EWC = dyn_cast<ExprWithCleanups>(Second))
8709 BinOp = dyn_cast<BinaryOperator>(First);
8739 BinOp = dyn_cast<BinaryOperator>(Second);
8768 auto *FirstExpr = dyn_cast<Expr>(First);
8769 auto *SecondExpr = dyn_cast<Expr>(Second);
8773 auto *FirstBinOp = dyn_cast<BinaryOperator>(First);
8782 auto *SecondBinOp = dyn_cast<BinaryOperator>(Second);
8882 if (const auto *CS = dyn_cast<CompoundStmt>(S)) {
8885 const auto *OED = dyn_cast<OMPExecutableDirective>(*I);
8897 const auto *OED = dyn_cast<OMPExecutableDirective>(S);
8986 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9308 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9393 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9584 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9640 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9696 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9751 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9855 if (auto *LC = dyn_cast<OMPLinearClause>(C))
9917 if (auto *LC = dyn_cast<OMPLinearClause>(C))
10100 if (auto *LC = dyn_cast<OMPLinearClause>(C))
10157 if (auto *LC = dyn_cast<OMPLinearClause>(C))
10214 if (auto *LC = dyn_cast<OMPLinearClause>(C))
12033 auto *VD = dyn_cast<VarDecl>(D);
12201 auto *VD = dyn_cast<VarDecl>(D);
12477 auto *VD = dyn_cast<VarDecl>(D);
12629 auto *VD = dyn_cast<VarDecl>(D);
12667 if (auto *VD = dyn_cast<VarDecl>(E->getDecl())) {
12781 if (auto *USD = dyn_cast<UsingShadowDecl>(D))
12792 if (auto *USD = dyn_cast<UsingShadowDecl>(D))
12830 else if (auto *DRD = dyn_cast<OMPDeclareReductionDecl>(D))
13012 while (const auto *TempOASE = dyn_cast<OMPArraySectionExpr>(Base)) {
13038 while (const auto *TempASE = dyn_cast<ArraySubscriptExpr>(Base)) {
13187 auto *ASE = dyn_cast<ArraySubscriptExpr>(RefExpr->IgnoreParens());
13188 auto *OASE = dyn_cast<OMPArraySectionExpr>(RefExpr->IgnoreParens());
13202 auto *VD = dyn_cast<VarDecl>(D);
13822 auto *VD = dyn_cast<VarDecl>(D);
14051 auto *VD = dyn_cast<VarDecl>(D);
14130 auto *DE = dyn_cast<DeclRefExpr>(RefExpr);
14226 auto *VD = dyn_cast<VarDecl>(D);
14390 if (auto *BO = dyn_cast<BinaryOperator>(SimpleExpr)) {
14395 } else if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(SimpleExpr)) {
14400 } else if (auto *MCE = dyn_cast<CXXMemberCallExpr>(SimpleExpr)) {
14444 auto *ASE = dyn_cast<ArraySubscriptExpr>(SimpleExpr);
14535 const auto *OASE = dyn_cast<OMPArraySectionExpr>(E);
14541 if (const auto *ATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr()))
14574 const auto *CATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr());
14592 const auto *OASE = dyn_cast<OMPArraySectionExpr>(E);
14606 if (const auto *ATy = dyn_cast<ConstantArrayType>(BaseQTy.getTypePtr()))
14676 if (auto *CurE = dyn_cast<DeclRefExpr>(E)) {
14689 } else if (auto *CurE = dyn_cast<MemberExpr>(E)) {
14755 } else if (auto *CurE = dyn_cast<ArraySubscriptExpr>(E)) {
14774 if (const auto *TE = dyn_cast<CXXThisExpr>(E)) {
14789 } else if (auto *CurE = dyn_cast<OMPArraySectionExpr>(E)) {
14833 if (const auto *TE = dyn_cast<CXXThisExpr>(E)) {
14954 dyn_cast<ArraySubscriptExpr>(SI->getAssociatedExpression())) {
14956 } else if (const auto *OASE = dyn_cast<OMPArraySectionExpr>(
15343 if (const auto *TE = dyn_cast<CXXThisExpr>(BE)) {
15371 auto *VD = dyn_cast<VarDecl>(CurDeclaration);
15372 const auto *FD = dyn_cast<FieldDecl>(CurDeclaration);
16292 if (auto *VD = dyn_cast<VarDecl>(D)) {
16305 if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(D))
16307 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
16325 if (auto *VD = dyn_cast<ValueDecl>(D)) {
16409 auto *VD = dyn_cast<VarDecl>(D);
16596 auto *VD = dyn_cast<VarDecl>(D);
tools/clang/lib/Sema/SemaOverload.cpp 264 if (auto *EWC = dyn_cast<ExprWithCleanups>(Converted)) {
271 while (auto *ICE = dyn_cast<ImplicitCastExpr>(Converted)) {
1052 } else if (auto *UUD = dyn_cast<UnresolvedUsingValueDecl>(OldD)) {
1179 CXXMethodDecl *OldMethod = dyn_cast<CXXMethodDecl>(Old);
1180 CXXMethodDecl *NewMethod = dyn_cast<CXXMethodDecl>(New);
1300 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1533 if (const auto *FromFPT = dyn_cast<FunctionProtoType>(FromFn)) {
1679 CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn);
1753 if (auto *DRE = dyn_cast<DeclRefExpr>(From->IgnoreParenCasts()))
1754 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl()))
3363 = dyn_cast<CXXRecordDecl>(ToRecordType->getDecl())) {
3368 if (InitListExpr *InitList = dyn_cast<InitListExpr>(From)) {
3432 = dyn_cast<CXXRecordDecl>(FromRecordType->getDecl())) {
3444 if ((ConvTemplate = dyn_cast<FunctionTemplateDecl>(D)))
3472 = dyn_cast<CXXConstructorDecl>(Best->Function)) {
3500 = dyn_cast<CXXConversionDecl>(Best->Function)) {
3589 CXXConversionDecl *Conv2 = dyn_cast<CXXConversionDecl>(Function2);
4471 = dyn_cast<CXXRecordDecl>(T2->castAs<RecordType>()->getDecl());
4483 = dyn_cast<FunctionTemplateDecl>(D);
5132 if (InitListExpr *FromInitList = dyn_cast<InitListExpr>(From))
5817 if ((ConvTemplate = dyn_cast<FunctionTemplateDecl>(D)))
5917 FunctionTemplateDecl *ConvTemplate = dyn_cast<FunctionTemplateDecl>(D);
6089 = dyn_cast<FunctionProtoType>(Function->getType()->getAs<FunctionType>());
6094 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Function)) {
6119 CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Function);
6180 auto *Shadow = dyn_cast<ConstructorUsingShadowDecl>(FoundDecl.getDecl());
6232 if (const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext))
6406 if (auto *MD = dyn_cast<CXXMethodDecl>(Function)) {
6573 FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D);
6644 if (FunctionTemplateDecl *TD = dyn_cast<FunctionTemplateDecl>(Decl)) {
6676 = dyn_cast<FunctionProtoType>(Method->getType()->getAs<FunctionType>());
6752 if (const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext))
6952 auto *Method = dyn_cast<CXXMethodDecl>(FD);
7388 FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D);
7877 if (CXXConversionDecl *Conv = dyn_cast<CXXConversionDecl>(D)) {
9161 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
9500 FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext);
9548 if (auto *EA = dyn_cast<EnumConstantDecl>(VA)) {
9549 if (auto *EB = dyn_cast<EnumConstantDecl>(VB)) {
9607 const FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext);
9723 if (CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(Fn)) {
9742 if (CXXMethodDecl *Meth = dyn_cast<CXXMethodDecl>(Fn)) {
9767 if (auto *Shadow = dyn_cast<ConstructorUsingShadowDecl>(FoundDecl))
9880 dyn_cast<FunctionTemplateDecl>((*I)->getUnderlyingDecl()) ) {
9884 = dyn_cast<FunctionDecl>((*I)->getUnderlyingDecl()) ) {
10338 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(ParamD))
10341 = dyn_cast<NonTypeTemplateParmDecl>(ParamD))
10515 CXXMethodDecl *Meth = dyn_cast<CXXMethodDecl>(Callee);
11326 if (UnresolvedMemberExpr *UME = dyn_cast<UnresolvedMemberExpr>(OvlExpr))
11334 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn))
11432 = dyn_cast<CXXMethodDecl>(FunctionTemplate->getTemplatedDecl())) {
11477 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn)) {
11486 if (FunctionDecl *FunDecl = dyn_cast<FunctionDecl>(Fn)) {
11488 if (FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext))
11542 = dyn_cast<FunctionTemplateDecl>(Fn)) {
11605 S.EraseUnwantedCUDAMatches(dyn_cast<FunctionDecl>(S.CurContext), Matches);
11625 dyn_cast<FunctionDecl>((*I)->getUnderlyingDecl()))
11757 auto *FD = dyn_cast<FunctionDecl>(I->getUnderlyingDecl());
11988 if (FunctionDecl *Func = dyn_cast<FunctionDecl>(Callee)) {
11994 if (!dyn_cast<FunctionProtoType>(Func->getType()->getAs<FunctionType>()))
12004 = dyn_cast<FunctionTemplateDecl>(Callee)) {
12151 NamespaceDecl *NS = dyn_cast<NamespaceDecl>(*it);
12262 dyn_cast<MemberExpr>(Fn));
12323 (F = dyn_cast<FunctionDecl>(*ULE->decls_begin())) &&
12417 if (auto *DRE = dyn_cast<DeclRefExpr>(Arg->IgnoreParenImpCasts())) {
12418 auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl());
12607 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FnDecl)) {
12908 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FnDecl)) {
13316 if (BinaryOperator *op = dyn_cast<BinaryOperator>(NakedMemExpr)) {
13416 } else if ((Method = dyn_cast<CXXMethodDecl>(Func))) {
13538 if (auto *MemE = dyn_cast<MemberExpr>(NakedMemExpr)) {
13570 dyn_cast<CXXDestructorDecl>(TheCall->getMethodDecl())) {
14136 if (ParenExpr *PE = dyn_cast<ParenExpr>(E)) {
14145 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E)) {
14161 if (auto *GSE = dyn_cast<GenericSelectionExpr>(E)) {
14186 if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(E)) {
14189 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn)) {
14241 if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {
14257 if (UnresolvedMemberExpr *MemExpr = dyn_cast<UnresolvedMemberExpr>(E)) {
tools/clang/lib/Sema/SemaPseudoObject.cpp 108 if (auto *PRE = dyn_cast<ObjCPropertyRefExpr>(e))
110 if (auto *SRE = dyn_cast<ObjCSubscriptRefExpr>(e))
112 if (auto *MSPRE = dyn_cast<MSPropertyRefExpr>(e))
114 if (auto *MSPSE = dyn_cast<MSPropertySubscriptExpr>(e))
120 if (ParenExpr *parens = dyn_cast<ParenExpr>(e)) {
127 if (UnaryOperator *uop = dyn_cast<UnaryOperator>(e)) {
138 if (GenericSelectionExpr *gse = dyn_cast<GenericSelectionExpr>(e)) {
163 if (ChooseExpr *ce = dyn_cast<ChooseExpr>(e)) {
211 if (auto *OVE = dyn_cast<OpaqueValueExpr>(Semantics.back()))
233 if (auto *OVE = dyn_cast<OpaqueValueExpr>(Semantics.back()))
666 dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {
721 refE = dyn_cast<ObjCPropertyRefExpr>(syntacticBase->IgnoreParens()))
1093 dyn_cast<CXXConversionDecl>(D->getUnderlyingDecl())) {
1448 while (auto *MSPropSubscript = dyn_cast<MSPropertySubscriptExpr>(Base)) {
1538 = dyn_cast<ObjCPropertyRefExpr>(opaqueRef)) {
1543 = dyn_cast<ObjCSubscriptRefExpr>(opaqueRef)) {
1547 = dyn_cast<MSPropertyRefExpr>(opaqueRef)) {
1551 dyn_cast<MSPropertySubscriptExpr>(opaqueRef)) {
1570 = dyn_cast<ObjCPropertyRefExpr>(opaqueRef)) {
1577 = dyn_cast<MSPropertyRefExpr>(opaqueRef)) {
1581 = dyn_cast<MSPropertySubscriptExpr>(opaqueRef)) {
1608 = dyn_cast<ObjCPropertyRefExpr>(opaqueRef)) {
1612 = dyn_cast<ObjCSubscriptRefExpr>(opaqueRef)) {
1616 = dyn_cast<MSPropertyRefExpr>(opaqueRef)) {
1620 = dyn_cast<MSPropertySubscriptExpr>(opaqueRef)) {
1647 if (UnaryOperator *uop = dyn_cast<UnaryOperator>(syntax)) {
1653 = dyn_cast<CompoundAssignOperator>(syntax)) {
1664 } else if (BinaryOperator *bop = dyn_cast<BinaryOperator>(syntax)) {
tools/clang/lib/Sema/SemaStmt.cpp 95 VarDecl *var = dyn_cast<VarDecl>(decl);
133 if (const BinaryOperator *Op = dyn_cast<BinaryOperator>(E)) {
149 } else if (const CXXOperatorCallExpr *Op = dyn_cast<CXXOperatorCallExpr>(E)) {
267 if (const FullExpr *Temps = dyn_cast<FullExpr>(E))
269 if (const CXXBindTemporaryExpr *TempExpr = dyn_cast<CXXBindTemporaryExpr>(E))
276 if (const auto *Cast = dyn_cast<CastExpr>(E))
281 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
306 } else if (const auto *CE = dyn_cast<CXXConstructExpr>(E)) {
313 } else if (const auto *ILE = dyn_cast<InitListExpr>(E)) {
324 if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(E)) {
335 } else if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {
342 = dyn_cast<CXXFunctionalCastExpr>(E)) {
344 if (const CXXBindTemporaryExpr *TE = dyn_cast<CXXBindTemporaryExpr>(E))
348 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(E))
354 else if (const CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(E)) {
653 if (const auto *FE = dyn_cast<FullExpr>(E))
655 while (const auto *ImpCast = dyn_cast<ImplicitCastExpr>(E)) {
798 dyn_cast<DeclRefExpr>(CaseExpr->IgnoreParenImpCasts())) {
799 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
908 if (DefaultStmt *DS = dyn_cast<DefaultStmt>(SC)) {
993 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(PrevCase)) {
996 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(CurrCase)) {
1435 VarDecl *VD = dyn_cast<VarDecl>(E->getDecl());
1491 if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(E)) {
1499 dyn_cast<BinaryConditionalOperator>(E)) {
1509 if (VarDecl *VD = dyn_cast<VarDecl>(E->getDecl()))
1518 if (auto *OVE = dyn_cast<OpaqueValueExpr>(S))
1580 if (auto Cleanups = dyn_cast<ExprWithCleanups>(Statement))
1584 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(Statement)) {
1596 DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr());
1600 if (CXXOperatorCallExpr *Call = dyn_cast<CXXOperatorCallExpr>(Statement)) {
1612 DRE = dyn_cast<DeclRefExpr>(Call->getArg(0));
1718 CompoundStmt *CS = dyn_cast<CompoundStmt>(Body);
1776 VarDecl *VD = dyn_cast<VarDecl>(DI);
1912 if (DeclStmt *DS = dyn_cast<DeclStmt>(First)) {
1917 VarDecl *D = dyn_cast<VarDecl>(DS->getSingleDecl());
2036 CallExpr *CE = dyn_cast<CallExpr>(E);
2039 FunctionDecl *D = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
2109 DeclStmt *DS = dyn_cast<DeclStmt>(First);
2397 if (auto *DD = dyn_cast<DecompositionDecl>(LoopVar))
2458 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(UnqAT))
2462 dyn_cast<VariableArrayType>(UnqAT)) {
2541 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Range)) {
2542 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
2716 if (auto Cleanups = dyn_cast<ExprWithCleanups>(InitExpr))
2721 dyn_cast<MaterializeTemporaryExpr>(InitExpr);
2732 if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(E)) {
2734 } else if (const CXXMemberCallExpr *Call = dyn_cast<CXXMemberCallExpr>(E)) {
2789 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(InitExpr)) {
2792 } else if (const CastExpr *CE = dyn_cast<CastExpr>(InitExpr)) {
2969 DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E->IgnoreParens());
2972 VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl());
3243 LambdaScopeInfo *CurLambda = dyn_cast<LambdaScopeInfo>(CurCap);
3313 if (auto *CurBlock = dyn_cast<BlockScopeInfo>(CurCap)) {
3318 } else if (auto *CurRegion = dyn_cast<CapturedRegionScopeInfo>(CurCap)) {
3422 auto *R = dyn_cast<CXXRecordDecl>(RT->getDecl());
3427 if (auto *T = dyn_cast<TypedefNameDecl>(TmpD))
tools/clang/lib/Sema/SemaStmtAsm.cpp 37 if (auto *ParenE = dyn_cast<ParenExpr>(Parent)) {
43 CastExpr *ParentCast = dyn_cast<CastExpr>(Parent);
49 if (auto *CastE = dyn_cast<CastExpr>(Child))
128 FunctionDecl *Func = dyn_cast<FunctionDecl>(S.CurContext);
143 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
194 if (const DeclRefExpr *AsmDeclRef = dyn_cast<DeclRefExpr>(Expression)) {
196 const VarDecl *Variable = dyn_cast<VarDecl>(AsmDeclRef->getDecl());
790 if (VarDecl *VD = dyn_cast<VarDecl>(FoundDecl))
792 else if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(FoundDecl)) {
799 } else if (TypeDecl *TD = dyn_cast<TypeDecl>(FoundDecl))
801 else if (FieldDecl *TD = dyn_cast<FieldDecl>(FoundDecl))
821 FieldDecl *FD = dyn_cast<FieldDecl>(FoundDecl);
861 ValueDecl *FD = dyn_cast<FieldDecl>(FieldResult.getFoundDecl());
863 FD = dyn_cast<IndirectFieldDecl>(FieldResult.getFoundDecl());
tools/clang/lib/Sema/SemaStmtAttr.cpp 193 const LoopHintAttr *LH = dyn_cast<LoopHintAttr>(I);
tools/clang/lib/Sema/SemaTemplate.cpp 67 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {
85 = dyn_cast<ClassTemplateSpecializationDecl>(Record))
580 if (auto *DRE = dyn_cast<DeclRefExpr>(TemplateName.get())) {
585 } else if (auto *ME = dyn_cast<MemberExpr>(TemplateName.get())) {
592 dyn_cast<DependentScopeDeclRefExpr>(TemplateName.get())) {
597 dyn_cast<CXXDependentScopeMemberExpr>(TemplateName.get())) {
764 if (TagDecl *TD = dyn_cast<TagDecl>(Instantiation))
1864 if (auto *TTP = dyn_cast<TemplateTypeParmDecl>(TemplateParam)) {
1884 if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(TemplateParam))
2084 auto *FTD = dyn_cast<FunctionTemplateDecl>(D);
2180 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) {
2191 = dyn_cast<TemplateTemplateParmDecl>(P))
2263 = dyn_cast<TemplateTypeParmDecl>(*NewParam)) {
2298 = dyn_cast<NonTypeTemplateParmDecl>(*NewParam)) {
2433 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(*NewParam))
2436 = dyn_cast<NonTypeTemplateParmDecl>(*NewParam))
2471 if (TemplateTypeParmDecl *PD = dyn_cast<TemplateTypeParmDecl>(ND)) {
2474 dyn_cast<NonTypeTemplateParmDecl>(ND)) {
2527 dyn_cast<NonTypeTemplateParmDecl>(E->getDecl()))
2642 = dyn_cast<ClassTemplateSpecializationDecl>(Record)) {
2654 if (TypeDecl *Parent = dyn_cast<TypeDecl>(Record->getParent()))
2664 if (TypeDecl *Parent = dyn_cast<TypeDecl>(Template->getDeclContext()))
2698 if (TypeDecl *Parent = dyn_cast<TypeDecl>(Enum->getParent()))
2771 = dyn_cast<ClassTemplatePartialSpecializationDecl>(Record)) {
2781 = dyn_cast<ClassTemplateSpecializationDecl>(Record)) {
3074 if (auto BinOp = dyn_cast<BinaryOperator>(Clause->IgnoreParenImpCasts())) {
3091 auto *BinOp = dyn_cast<BinaryOperator>(Cond->IgnoreParenImpCasts());
3098 auto *InnerBinOp = dyn_cast<BinaryOperator>(LHS->IgnoreParenImpCasts());
3129 const auto *DR = dyn_cast<DeclRefExpr>(E);
3137 if (const auto *IV = dyn_cast<VarTemplateSpecializationDecl>(VD)) {
3237 dyn_cast<TypeAliasTemplateDecl>(Template)) {
3320 CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(Ctx);
3346 = dyn_cast<ClassTemplateDecl>(Template)) {
3379 } else if (auto *BTD = dyn_cast<BuiltinTemplateDecl>(Template)) {
3667 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg.getAsExpr());
3671 dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl());
4181 dyn_cast<VarTemplatePartialSpecializationDecl>(InstantiationPattern))
4433 auto *LookupRD = dyn_cast<CXXRecordDecl>(LookupCtx);
4513 if (DeclRefExpr *ArgExpr = dyn_cast<DeclRefExpr>(Arg.getAsExpr())) {
4517 dyn_cast<DependentScopeDeclRefExpr>(Arg.getAsExpr())) {
4521 dyn_cast<CXXDependentScopeMemberExpr>(Arg.getAsExpr())) {
4779 if (TemplateTypeParmDecl *TypeParm = dyn_cast<TemplateTypeParmDecl>(Param)) {
4796 = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
4860 dyn_cast<ClassTemplateSpecializationDecl>(RecLoc.getDecl()))
4902 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(Param))
4906 if (NonTypeTemplateParmDecl *NTTP =dyn_cast<NonTypeTemplateParmDecl>(Param)) {
5152 = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
5158 = dyn_cast<TemplateTemplateParmDecl>(Param)) {
5356 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(*Param)) {
5373 = dyn_cast<NonTypeTemplateParmDecl>(*Param)) {
5936 while (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(Arg)) {
5983 while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {
5997 dyn_cast<SubstNonTypeTemplateParmExpr>(Arg))
6000 if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(Arg)) {
6009 dyn_cast<SubstNonTypeTemplateParmExpr>(Arg))
6013 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg);
6066 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Entity)) {
6075 FunctionDecl *Func = dyn_cast<FunctionDecl>(Entity);
6076 VarDecl *Var = dyn_cast<VarDecl>(Entity);
6224 while (ParenExpr *Parens = dyn_cast<ParenExpr>(Arg)) {
6238 dyn_cast<SubstNonTypeTemplateParmExpr>(Arg))
6242 if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(Arg)) {
6244 DRE = dyn_cast<DeclRefExpr>(UnOp->getSubExpr());
6250 else if ((DRE = dyn_cast<DeclRefExpr>(Arg))) {
6362 if (auto *PE = dyn_cast<PackExpansionExpr>(DeductionArg))
6422 auto *PE = dyn_cast<PackExpansionExpr>(Arg);
7169 = dyn_cast<NonTypeTemplateParmDecl>(Old)) {
7207 = dyn_cast<TemplateTemplateParmDecl>(Old)) {
7400 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Ctx)) {
7423 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D))
7425 if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D))
7427 if (VarDecl *Var = dyn_cast<VarDecl>(D))
7570 if (PackExpansionExpr *Expansion = dyn_cast<PackExpansionExpr>(ArgExpr))
7574 while (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(ArgExpr))
7585 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(ArgExpr))
7660 = dyn_cast<NonTypeTemplateParmDecl>(TemplateParams->getParam(I));
7732 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
7739 = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
8107 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
8409 if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(Ovl)) {
8424 dyn_cast<CXXMethodDecl>(FunTmpl->getTemplatedDecl());
8491 if (auto *OldFD = dyn_cast<FunctionDecl>(OldND->getUnderlyingDecl()))
8639 } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(Member)) {
8643 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
8661 (PrevVar = dyn_cast<VarDecl>(Previous.getFoundDecl())))
8671 (PrevRecord = dyn_cast<CXXRecordDecl>(Previous.getFoundDecl()))) {
8680 (PrevEnum = dyn_cast<EnumDecl>(Previous.getFoundDecl()))) {
8751 if (auto *MemberFunction = dyn_cast<FunctionDecl>(Member)) {
8768 } else if (auto *MemberVar = dyn_cast<VarDecl>(Member)) {
8771 } else if (auto *MemberClass = dyn_cast<CXXRecordDecl>(Member)) {
8774 } else if (auto *MemberEnum = dyn_cast<EnumDecl>(Member)) {
8813 if (auto *Function = dyn_cast<CXXMethodDecl>(Instantiation))
8815 else if (auto *Var = dyn_cast<VarDecl>(Instantiation))
8817 else if (auto *Record = dyn_cast<CXXRecordDecl>(Instantiation))
8819 else if (auto *Enum = dyn_cast<EnumDecl>(Instantiation))
8856 if (NamespaceDecl *NS = dyn_cast<NamespaceDecl>(OrigContext)) {
8963 ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(TD);
9585 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Prev)) {
9600 FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(Prev);
9714 if (auto *RD = dyn_cast<CXXRecordDecl>(Specialization->getDeclContext()))
10038 = dyn_cast<UnresolvedUsingValueDecl>(Result.getRepresentativeDecl())){
10055 if (TypeDecl *Type = dyn_cast<TypeDecl>(Result.getFoundDecl())) {
10071 auto *FoundRD = dyn_cast<CXXRecordDecl>(Type);
10240 = dyn_cast<TemplateTemplateParmDecl>(Param)) {
10341 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(CurContext)) {
10380 if (auto *FD = dyn_cast<FunctionDecl>(ND))
10382 if (auto *RD = dyn_cast<CXXRecordDecl>(ND))
10384 if (auto *VD = dyn_cast<VarDecl>(ND))
10386 if (auto *ED = dyn_cast<EnumDecl>(ND))
10439 auto *SD = dyn_cast<ClassTemplateSpecializationDecl>(RD);
10455 auto *SD = dyn_cast<VarTemplateSpecializationDecl>(RD);
tools/clang/lib/Sema/SemaTemplateDeduction.cpp 178 if (ImplicitCastExpr *IC = dyn_cast<ImplicitCastExpr>(E))
180 else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(E))
183 dyn_cast<SubstNonTypeTemplateParmExpr>(E))
189 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
190 if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl()))
200 if (NamedDecl *NX = dyn_cast<NamedDecl>(X))
202 if (NamedDecl *NY = dyn_cast<NamedDecl>(Y))
493 = dyn_cast<TemplateTemplateParmDecl>(ParamDecl)) {
586 = dyn_cast<ClassTemplateSpecializationDecl>(RecordArg->getDecl());
635 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(D))
637 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D))
645 if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param))
649 if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(Param))
1170 auto *Guide = dyn_cast<CXXDeductionGuideDecl>(FTD->getTemplatedDecl());
1642 = dyn_cast<ConstantArrayType>(ArrayArg)) {
1650 = dyn_cast<DependentSizedArrayType>(ArrayArg))
2567 if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
2575 } else if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(Param)) {
2655 TemplateDecl *TD = dyn_cast<TemplateDecl>(Template);
2695 if (auto *DC = dyn_cast<DeclContext>(D))
3082 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Function)) {
3457 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn))
3523 if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D)) {
3768 if (InitListExpr *ILE = dyn_cast<InitListExpr>(Arg))
4513 InitListExpr *InitList = dyn_cast<InitListExpr>(Init);
4738 CXXMethodDecl *Method1 = dyn_cast<CXXMethodDecl>(FD1);
4739 CXXMethodDecl *Method2 = dyn_cast<CXXMethodDecl>(FD2);
5264 if (const PackExpansionExpr *Expansion = dyn_cast<PackExpansionExpr>(E))
5270 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(E))
5272 else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(E))
5275 dyn_cast<SubstNonTypeTemplateParmExpr>(E))
5283 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E);
5288 = dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl());
5328 = dyn_cast<TemplateTemplateParmDecl>(Template)) {
tools/clang/lib/Sema/SemaTemplateInstantiate.cpp 66 DeclContext *Ctx = dyn_cast<DeclContext>(D);
74 dyn_cast<VarTemplateSpecializationDecl>(D);
108 = dyn_cast<TemplateTemplateParmDecl>(D)) {
119 = dyn_cast<ClassTemplateSpecializationDecl>(Ctx);
135 else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(Ctx)) {
173 } else if (CXXRecordDecl *Rec = dyn_cast<CXXRecordDecl>(Ctx)) {
493 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {
499 } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
508 } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {
515 } else if (EnumDecl *ED = dyn_cast<EnumDecl>(D)) {
520 } else if (FieldDecl *FD = dyn_cast<FieldDecl>(D)) {
561 dyn_cast<FunctionTemplateDecl>(Active->Entity)) {
574 if (auto *D = dyn_cast<TemplateDecl>(Active->Entity)) {
577 } else if (auto *D = dyn_cast<ClassTemplatePartialSpecializationDecl>(
580 } else if (auto *D = dyn_cast<VarTemplatePartialSpecializationDecl>(
620 if (TemplateDecl *Template = dyn_cast<TemplateDecl>(Active->Template))
639 if (TemplateDecl *Template = dyn_cast<TemplateDecl>(Active->Template))
676 auto *MD = dyn_cast<CXXMethodDecl>(Active->Entity);
695 if (auto *CD = dyn_cast<ConceptDecl>(Active->Entity)) {
898 auto *NewMD = dyn_cast<CXXMethodDecl>(New);
900 auto *OldMD = dyn_cast<CXXMethodDecl>(Old);
913 if (auto *DC = dyn_cast<DeclContext>(Old))
1049 if (TemplateTemplateParmDecl *TTP = dyn_cast<TemplateTemplateParmDecl>(D)) {
1474 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D)) {
1483 if (VarDecl *PD = dyn_cast<VarDecl>(D))
2103 = dyn_cast<ClassTemplateSpecializationDecl>(Instantiation)) {
2182 if (FieldDecl *Field = dyn_cast<FieldDecl>(NewMember)) {
2184 } else if (EnumDecl *Enum = dyn_cast<EnumDecl>(NewMember)) {
2196 } else if (StaticAssertDecl *SA = dyn_cast<StaticAssertDecl>(NewMember)) {
2203 } else if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewMember)) {
2236 NamedDecl *ND = dyn_cast<NamedDecl>(I->NewDecl);
2669 if (auto *Function = dyn_cast<FunctionDecl>(D)) {
2713 } else if (auto *Var = dyn_cast<VarDecl>(D)) {
2751 } else if (auto *Record = dyn_cast<CXXRecordDecl>(D)) {
2825 } else if (auto *Enum = dyn_cast<EnumDecl>(D)) {
2855 } else if (auto *Field = dyn_cast<FieldDecl>(D)) {
2981 if (const ParmVarDecl *PV = dyn_cast<ParmVarDecl>(D)) {
2982 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(PV->getDeclContext())) {
3009 if (const TagDecl *Tag = dyn_cast<TagDecl>(CheckD))
3027 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D))
tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 273 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
281 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
282 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
356 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(New))
362 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts()))
363 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {
482 if (NamedDecl *ND = dyn_cast<NamedDecl>(New)) {
518 const AlignedAttr *Aligned = dyn_cast<AlignedAttr>(TmplAttr);
524 if (const auto *AssumeAligned = dyn_cast<AssumeAlignedAttr>(TmplAttr)) {
529 if (const auto *AlignValue = dyn_cast<AlignValueAttr>(TmplAttr)) {
534 if (const auto *AllocAlign = dyn_cast<AllocAlignAttr>(TmplAttr)) {
540 if (const auto *EnableIf = dyn_cast<EnableIfAttr>(TmplAttr)) {
546 if (const auto *DiagnoseIf = dyn_cast<DiagnoseIfAttr>(TmplAttr)) {
553 dyn_cast<CUDALaunchBoundsAttr>(TmplAttr)) {
559 if (const auto *Mode = dyn_cast<ModeAttr>(TmplAttr)) {
564 if (const auto *OMPAttr = dyn_cast<OMPDeclareSimdDeclAttr>(TmplAttr)) {
569 if (const auto *OMPAttr = dyn_cast<OMPDeclareVariantAttr>(TmplAttr)) {
575 dyn_cast<AMDGPUFlatWorkGroupSizeAttr>(TmplAttr)) {
581 dyn_cast<AMDGPUWavesPerEUAttr>(TmplAttr)) {
594 if (const auto *ABIAttr = dyn_cast<ParameterABIAttr>(TmplAttr)) {
606 if (auto *A = dyn_cast<PointerAttr>(TmplAttr)) {
612 if (auto *A = dyn_cast<OwnerAttr>(TmplAttr)) {
628 NamedDecl *ND = dyn_cast<NamedDecl>(New);
728 CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext());
816 PrevAliasTemplate = dyn_cast<TypeAliasTemplateDecl>(Found.front());
1006 if (CXXRecordDecl *Parent= dyn_cast<CXXRecordDecl>(Field->getDeclContext())) {
1338 PrevClassTemplate = dyn_cast<ClassTemplateDecl>(Found.front());
1508 = dyn_cast<ClassTemplateDecl>(Found.front());
1537 PrevVarTemplate = dyn_cast<VarTemplateDecl>(Found.front());
1590 VarTemplateDecl *InstVarTemplate = dyn_cast<VarTemplateDecl>(Found.front());
1614 if (CXXMethodDecl *DMethod = dyn_cast<CXXMethodDecl>(D->getTemplatedDecl()))
1794 if (auto *DGuide = dyn_cast<CXXDeductionGuideDecl>(D)) {
1836 if (auto *DGuide = dyn_cast<CXXDeductionGuideDecl>(D)) {
2156 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
2162 } else if (CXXDestructorDecl *Destructor = dyn_cast<CXXDestructorDecl>(D)) {
2167 } else if (CXXConversionDecl *Conversion = dyn_cast<CXXConversionDecl>(D)) {
2370 if (const auto *A = dyn_cast<CXXRecordDecl>(Owner)) {
2375 else if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(A))
2583 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P))
2586 if (TemplateTemplateParmDecl *TTP = dyn_cast<TemplateTemplateParmDecl>(P))
2752 if (auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.CurContext))
2807 if (auto *CUSD = dyn_cast<ConstructorUsingShadowDecl>(Shadow))
2914 UnresolvedUsingTypenameDecl *TD = dyn_cast<UnresolvedUsingTypenameDecl>(D);
3821 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
4042 = dyn_cast<FunctionTemplateDecl>(ActiveInst.Entity)) {
4332 if (CXXRecordDecl *Rec = dyn_cast<CXXRecordDecl>(Function->getDeclContext()))
4364 if (CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(Function)) {
4434 dyn_cast<VarTemplatePartialSpecializationDecl>(FromVar))
4577 dyn_cast<VarTemplateSpecializationDecl>(OldVar)) {
4715 dyn_cast<VarTemplateSpecializationDecl>(Var);
5170 if (auto *OtherUUD = dyn_cast<T>(Other)) {
5173 } else if (auto *OtherUPD = dyn_cast<UsingPackDecl>(Other)) {
5176 } else if (auto *OtherUD = dyn_cast<UsingDecl>(Other)) {
5204 if (auto *UUD = dyn_cast<UnresolvedUsingTypenameDecl>(D))
5207 if (auto *UUD = dyn_cast<UnresolvedUsingValueDecl>(D))
5213 if (auto *Record = dyn_cast<CXXRecordDecl>(Other))
5216 if (auto *Function = dyn_cast<FunctionDecl>(Other))
5219 if (auto *Enum = dyn_cast<EnumDecl>(Other))
5222 if (auto *Var = dyn_cast<VarDecl>(Other))
5226 if (auto *Temp = dyn_cast<ClassTemplateDecl>(Other))
5229 if (auto *Temp = dyn_cast<FunctionTemplateDecl>(Other))
5233 dyn_cast<ClassTemplatePartialSpecializationDecl>(Other))
5237 if (auto *Field = dyn_cast<FieldDecl>(Other)) {
5245 if (auto *Using = dyn_cast<UsingDecl>(Other))
5248 if (auto *Shadow = dyn_cast<UsingShadowDecl>(Other))
5273 if (NamedDecl *D = dyn_cast<NamedDecl>(DC)) {
5374 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D))
5395 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {
5405 = dyn_cast<ClassTemplatePartialSpecializationDecl>(Record))
5417 if (CXXRecordDecl *InstRecord = dyn_cast<CXXRecordDecl>(DC)) {
5421 = dyn_cast<ClassTemplateSpecializationDecl>(InstRecord)){
5433 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(DC)) {
5440 auto *Guide = dyn_cast<CXXDeductionGuideDecl>(FD);
5499 if (CXXRecordDecl *Spec = dyn_cast<CXXRecordDecl>(ParentDC)) {
5526 if (auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(D)) {
5567 } else if (EnumConstantDecl *ED = dyn_cast<EnumConstantDecl>(D)) {
5609 if (FunctionDecl *Function = dyn_cast<FunctionDecl>(Inst.first)) {
tools/clang/lib/Sema/SemaTemplateVariadic.cpp 42 if (auto *VD = dyn_cast<VarDecl>(ND)) {
46 auto *FD = dyn_cast<FunctionDecl>(VD->getDeclContext());
306 auto *TTPD = dyn_cast<TemplateTypeParmDecl>(LocalPack);
1103 dyn_cast<SubstNonTypeTemplateParmPackExpr>(Arg.getAsExpr()))
1105 else if (auto *Subst = dyn_cast<FunctionParmPackExpr>(Arg.getAsExpr())) {
1146 auto *OCE = dyn_cast<CXXOperatorCallExpr>(E);
tools/clang/lib/Sema/SemaType.cpp 2956 AutoType *Auto = dyn_cast<AutoType>(Deduced);
3131 auto *DTST = dyn_cast<DeducedTemplateSpecializationType>(Deduced);
6561 while (auto attributed = dyn_cast<AttributedType>(desugared.getTypePtr())) {
7034 const FunctionProtoType *FnP = dyn_cast<FunctionProtoType>(fn);
7731 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParens())) {
7732 if (VarDecl *Var = dyn_cast<VarDecl>(DRE->getDecl())) {
7877 } else if (auto *RD = dyn_cast<CXXRecordDecl>(D)) {
7881 } else if (auto *ED = dyn_cast<EnumDecl>(D)) {
7899 } else if (auto *FD = dyn_cast<FunctionDecl>(D)) {
7903 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
8076 dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
8327 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
8330 } else if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {
8334 } else if (const ObjCIvarRefExpr *IR = dyn_cast<ObjCIvarRefExpr>(E)) {
8336 } else if (const ObjCPropertyRefExpr *PR = dyn_cast<ObjCPropertyRefExpr>(E)) {
8339 } else if (auto *PE = dyn_cast<PredefinedExpr>(E)) {
8353 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParens())) {
8354 if (VarDecl *Var = dyn_cast<VarDecl>(DRE->getDecl())) {
tools/clang/lib/Sema/TreeTransform.h 2081 if (DeclStmt *RangeStmt = dyn_cast<DeclStmt>(Range)) {
2083 if (VarDecl *RangeVar = dyn_cast<VarDecl>(RangeStmt->getSingleDecl())) {
3451 if (auto *FE = dyn_cast<FullExpr>(Init))
3454 if (auto *AIL = dyn_cast<ArrayInitLoopExpr>(Init))
3457 if (MaterializeTemporaryExpr *MTE = dyn_cast<MaterializeTemporaryExpr>(Init))
3460 while (CXXBindTemporaryExpr *Binder = dyn_cast<CXXBindTemporaryExpr>(Init))
3463 if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Init))
3467 dyn_cast<CXXStdInitializerListExpr>(Init))
3473 CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init);
3478 if (CXXScalarValueInitExpr *VIE = dyn_cast<CXXScalarValueInitExpr>(Init)) {
3543 if (PackExpansionExpr *Expansion = dyn_cast<PackExpansionExpr>(Inputs[I])) {
9417 if (DependentScopeDeclRefExpr *DRE = dyn_cast<DependentScopeDeclRefExpr>(E))
9572 auto *PE = dyn_cast<ParenExpr>(E->getArgumentExpr());
9574 PE ? dyn_cast<DependentScopeDeclRefExpr>(PE->getSubExpr()) : nullptr)
9807 auto *Op = dyn_cast<CXXOperatorCallExpr>(PossibleBinOp->IgnoreImplicit());
9810 auto *Callee = dyn_cast<DeclRefExpr>(Op->getCallee()->IgnoreImplicit());
10706 = dyn_cast<ConstantArrayType>(ArrayT)) {
10712 = dyn_cast<DependentSizedArrayType>(ArrayT)) {
10867 if (auto *UPD = dyn_cast<UsingPackDecl>(InstD))
10872 if (auto *UD = dyn_cast<UsingDecl>(D)) {
12013 if (auto *TTPD = dyn_cast<TemplateTypeParmDecl>(Pack)) {
12016 } else if (auto *TTPD = dyn_cast<TemplateTemplateParmDecl>(Pack)) {
13047 if (auto *UPD = dyn_cast<UsingPackDecl>(D)) {
13075 } else if (auto *Using = dyn_cast<UsingDecl>(D)) {
13255 if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(Callee)) {
13287 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Callee)) {
tools/clang/lib/Serialization/ASTCommon.cpp 428 if (auto *FD = dyn_cast<FunctionDecl>(D))
430 if (auto *RD = dyn_cast<CXXRecordDecl>(D))
440 if (auto *VD = dyn_cast<VarDecl>(D))
tools/clang/lib/Serialization/ASTCommon.h 62 if (const BuiltinType *BT = dyn_cast<BuiltinType>(T.getTypePtr()))
101 if (auto *FD = dyn_cast<FriendDecl>(LexicalD))
122 if (auto *VD = dyn_cast<VarDecl>(D))
tools/clang/lib/Serialization/ASTReader.cpp 3999 if (ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(D)) {
7644 if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D))
7646 if (auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(D))
7648 if (auto *FD = dyn_cast<FunctionDecl>(D)) {
8120 if (ObjCImplDecl *ImplD = dyn_cast<ObjCImplDecl>(D))
9960 if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
9961 if (const TagType *TagT = dyn_cast<TagType>(TD->getTypeForDecl())) {
9966 if (auto RD = dyn_cast<CXXRecordDecl>(D)) {
9979 if (auto ID = dyn_cast<ObjCInterfaceDecl>(D)) {
9990 if (auto PD = dyn_cast<ObjCProtocolDecl>(D)) {
10010 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(PB->first)) {
10020 if (auto *RD = dyn_cast<CXXRecordDecl>(FD->getLexicalParent()))
10158 if (auto *ND = dyn_cast<NamedDecl>(CanonMember))
tools/clang/lib/Serialization/ASTReaderDecl.cpp 511 if (auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
529 if (auto *DD = dyn_cast<DeclaratorDecl>(D)) {
534 if (auto *TD = dyn_cast<TypeDecl>(D)) {
543 } else if (auto *ID = dyn_cast<ObjCInterfaceDecl>(D)) {
546 } else if (auto *FD = dyn_cast<FunctionDecl>(D)) {
2099 if (auto *CTD = dyn_cast<ClassTemplateDecl>(InstD)) {
2128 if (auto *Partial = dyn_cast<ClassTemplatePartialSpecializationDecl>(D)) {
2212 if (auto *VTD = dyn_cast<VarTemplateDecl>(InstD)) {
2251 if (auto *Partial = dyn_cast<VarTemplatePartialSpecializationDecl>(D)) {
2459 if (auto *DClass = dyn_cast<CXXRecordDecl>(DPattern)) {
2479 if (auto *DFunction = dyn_cast<FunctionDecl>(DPattern))
2482 if (auto *DVar = dyn_cast<VarDecl>(DPattern))
2484 if (auto *DAlias = dyn_cast<TypeAliasDecl>(DPattern))
2514 if (auto *Namespace = dyn_cast<NamespaceDecl>(D))
2519 if (auto *DTemplate = dyn_cast<RedeclarableTemplateDecl>(D))
2559 !allowODRLikeMergeInC(dyn_cast<NamedDecl>(static_cast<T*>(D))))
2776 if (const auto *Var = dyn_cast<VarDecl>(D))
2780 if (const auto *Func = dyn_cast<FunctionDecl>(D))
2823 if (const auto *TX = dyn_cast<TemplateTypeParmDecl>(X)) {
2828 if (const auto *TX = dyn_cast<NonTypeTemplateParmDecl>(X)) {
2953 if (const auto *TypedefX = dyn_cast<TypedefNameDecl>(X))
2954 if (const auto *TypedefY = dyn_cast<TypedefNameDecl>(Y))
2973 if (const auto *TagX = dyn_cast<TagDecl>(X)) {
2985 if (const auto *FuncX = dyn_cast<FunctionDecl>(X)) {
2987 if (const auto *CtorX = dyn_cast<CXXConstructorDecl>(X)) {
3038 if (const auto *VarX = dyn_cast<VarDecl>(X)) {
3061 if (const auto *NamespaceX = dyn_cast<NamespaceDecl>(X)) {
3068 if (const auto *TemplateX = dyn_cast<TemplateDecl>(X)) {
3077 if (const auto *FDX = dyn_cast<FieldDecl>(X)) {
3084 if (const auto *IFDX = dyn_cast<IndirectFieldDecl>(X)) {
3096 if (const auto *USX = dyn_cast<UsingShadowDecl>(X)) {
3103 if (const auto *UX = dyn_cast<UsingDecl>(X)) {
3109 if (const auto *UX = dyn_cast<UnresolvedUsingValueDecl>(X)) {
3114 if (const auto *UX = dyn_cast<UnresolvedUsingTypenameDecl>(X))
3120 if (const auto *NAX = dyn_cast<NamespaceAliasDecl>(X)) {
3132 if (auto *ND = dyn_cast<NamespaceDecl>(DC))
3135 if (auto *RD = dyn_cast<CXXRecordDecl>(DC)) {
3159 if (auto *ED = dyn_cast<EnumDecl>(DC))
3165 if (auto *TU = dyn_cast<TranslationUnitDecl>(DC))
3215 if (auto *TND = dyn_cast<TypedefNameDecl>(Found))
3227 if (auto *RD = dyn_cast<CXXRecordDecl>(LexicalDC)) {
3236 if (auto *FD = dyn_cast<FunctionDecl>(D))
3239 if (auto *MD = dyn_cast<ObjCMethodDecl>(D))
3527 if (auto *FTTP = dyn_cast<TemplateTypeParmDecl>(FromParam))
3529 else if (auto *FNTTP = dyn_cast<NonTypeTemplateParmDecl>(FromParam))
3561 if (auto *TD = dyn_cast<TemplateDecl>(D))
3902 if (auto *DC = dyn_cast<DeclContext>(D)) {
3918 if (auto *Class = dyn_cast<ObjCInterfaceDecl>(D))
4024 if (auto *CTD = dyn_cast<ClassTemplateDecl>(D))
4026 else if (auto *FTD = dyn_cast<FunctionTemplateDecl>(D))
4028 else if (auto *VTD = dyn_cast<VarTemplateDecl>(D))
4267 if (auto *TU = dyn_cast<TranslationUnitDecl>(D))
4293 if (auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(D)) {
4295 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
tools/clang/lib/Serialization/ASTWriter.cpp 2566 if (auto *DefMD = dyn_cast<DefMacroDirective>(MD)) {
2568 } else if (auto *VisMD = dyn_cast<VisibilityMacroDirective>(MD)) {
2736 if (auto *MD = dyn_cast<MacroDefinitionRecord>(*E)) {
2745 if (auto *ME = dyn_cast<MacroExpansion>(*E)) {
2755 if (auto *ID = dyn_cast<InclusionDirective>(*E)) {
4091 if (auto *D = dyn_cast<CXXRecordDecl>(DC)) {
4113 if (auto *ChildND = dyn_cast<NamedDecl>(ChildD)) {
6330 if (auto *RD = dyn_cast<CXXRecordDecl>(D)) {
6480 if (auto *VD = dyn_cast<VarDecl>(D))
tools/clang/lib/Serialization/ASTWriterDecl.cpp 271 if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
279 if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
288 if (DeclContext *DC = dyn_cast<DeclContext>(D))
320 while (auto *NS = dyn_cast<NamespaceDecl>(DC->getRedeclContext())) {
962 if (const auto *IPD = dyn_cast<ImplicitParamDecl>(D))
1276 Record.AddDeclRef(dyn_cast<Decl>(D->getCommonAncestor()));
2423 if (auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp 42 const ElementRegion *ER = dyn_cast<ElementRegion>(R);
tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp 88 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(SymVal->getSymbol())) {
317 if (const SubRegion *subReg = dyn_cast<SubRegion>(region)) {
tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp 472 const TypedValueRegion* R = dyn_cast<TypedValueRegion>(LV->stripCasts());
895 if (const DeclStmt *DS = dyn_cast<DeclStmt>(Element)) {
tools/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp 110 if (const auto *Ctor = dyn_cast<CXXConstructorCall>(&Call)) {
128 if (const auto *Dtor = dyn_cast<CXXDestructorCall>(&Call)) {
tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp 323 const ElementRegion *ER = dyn_cast<ElementRegion>(R);
592 if (const auto *Ex = dyn_cast<Expr>(S))
878 const StringRegion *strRegion= dyn_cast<StringRegion>(bufRegion);
929 const ElementRegion *ER = dyn_cast<ElementRegion>(R);
969 if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) {
1011 const TypedValueRegion *TVR = dyn_cast<TypedValueRegion>(MR);
2280 const VarDecl *D = dyn_cast<VarDecl>(I);
2331 while (const SubRegion *SR = dyn_cast<SubRegion>(MR)) {
2352 while (const SubRegion *SR = dyn_cast<SubRegion>(Super)) {
tools/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp 39 if (const auto *D1 = dyn_cast<DeclRefExpr>(A1->IgnoreParenCasts()))
40 if (const auto *D2 = dyn_cast<DeclRefExpr>(A2->IgnoreParenCasts()))
47 if (const auto *UE = dyn_cast<UnaryExprOrTypeTraitExpr>(E))
55 if (const auto *CE = dyn_cast<CallExpr>(E)) {
67 if (const auto *IL = dyn_cast<IntegerLiteral>(E))
73 if (const auto *D = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()))
130 if (const auto *BE = dyn_cast<BinaryOperator>(LenArg->IgnoreParenCasts())) {
159 const auto *DstArgDRE = dyn_cast<DeclRefExpr>(DstArg->IgnoreParenImpCasts());
161 dyn_cast<DeclRefExpr>(LenArg->IgnoreParenLValueCasts());
168 const auto *LenArgVal = dyn_cast<VarDecl>(LenArgDRE->getDecl());
181 if (const auto *IL = dyn_cast<IntegerLiteral>(LenArg->IgnoreParenImpCasts())) {
189 dyn_cast<BinaryOperator>(DstArg->IgnoreParenImpCasts())) {
190 DstArgDRE = dyn_cast<DeclRefExpr>(BE->getLHS()->IgnoreParenImpCasts());
192 if ((IL = dyn_cast<IntegerLiteral>(BE->getRHS()->IgnoreParenImpCasts()))) {
tools/clang/lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp 42 const auto *MD = dyn_cast<CXXMethodDecl>(LCtx->getDecl());
tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp 374 if (const CXXInstanceCall *CC = dyn_cast<CXXInstanceCall>(&Call)) {
tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp 91 const PointerType *ToPTy = dyn_cast<PointerType>(ToTy.getTypePtr());
107 const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R);
tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp 45 const PointerType *OrigPTy = dyn_cast<PointerType>(OrigTy.getTypePtr());
46 const PointerType *ToPTy = dyn_cast<PointerType>(ToTy.getTypePtr());
73 const auto *U = dyn_cast<UnaryOperator>(E);
79 if (const auto *SE = dyn_cast<DeclRefExpr>(U->getSubExpr()))
81 else if (const auto *SE = dyn_cast<MemberExpr>(U->getSubExpr()))
tools/clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp 120 if (const auto *DRE = dyn_cast<DeclRefExpr>(Object)) {
122 } else if (const auto *ME = dyn_cast<MemberExpr>(Object)) {
420 const auto *InstanceCall = dyn_cast<CXXInstanceCall>(&Call);
tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp 423 if (auto *SIE = dyn_cast<SymIntExpr>(CondBSE)) {
428 } else if (auto *SIE = dyn_cast<IntSymExpr>(CondBSE)) {
812 auto *CatDecl = dyn_cast<ObjCCategoryDecl>(PropDecl->getDeclContext());
821 auto *ShadowedPropDecl = dyn_cast<ObjCPropertyDecl>(*I);
978 auto *MD = dyn_cast<ObjCMethodDecl>(LCtx->getDecl());
tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp 188 if (CallExpr *CE = dyn_cast<CallExpr>(Child))
213 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(expr)) {
227 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(expr)) {
232 if (const UnaryOperator *U = dyn_cast<UnaryOperator>(expr))
264 const BinaryOperator *B = dyn_cast<BinaryOperator>(condition);
275 dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParenLValueCasts());
277 dyn_cast<DeclRefExpr>(B->getRHS()->IgnoreParenLValueCasts());
286 const VarDecl *vdLHS = drLHS ? dyn_cast<VarDecl>(drLHS->getDecl()) : nullptr;
287 const VarDecl *vdRHS = drRHS ? dyn_cast<VarDecl>(drRHS->getDecl()) : nullptr;
595 dyn_cast<StringLiteral>(CE->getArg((unsigned)ArgSuffix.first)
671 if (const auto *String = dyn_cast<StringLiteral>(Source)) {
768 dyn_cast<StringLiteral>(CE->getArg(ArgIndex)->IgnoreParenImpCasts());
tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp 103 if (const StringRegion* StrRegion= dyn_cast<StringRegion>(R)) {
tools/clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp 77 if (const auto *B = dyn_cast<BinaryOperator>(Parent)) {
tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp 56 if (const VarDecl *D = dyn_cast<VarDecl>(DR->getDecl()))
106 dyn_cast<BinaryOperator>(Ex->IgnoreParenCasts());
290 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()))
299 const BinaryOperator* BRHS = dyn_cast<BinaryOperator>(RHS);
306 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getLHS()->IgnoreParenCasts())))
310 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getRHS()->IgnoreParenCasts())))
328 if (const BinaryOperator* B = dyn_cast<BinaryOperator>(S)) {
331 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(B->getLHS()))
332 if (VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) {
349 if (const DeclRefExpr *RhsDR = dyn_cast<DeclRefExpr>(RHS))
350 if (VD == dyn_cast<VarDecl>(RhsDR->getDecl()))
361 else if (const UnaryOperator* U = dyn_cast<UnaryOperator>(S)) {
371 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex))
374 else if (const DeclStmt *DS = dyn_cast<DeclStmt>(S))
378 const auto *V = dyn_cast<VarDecl>(DI);
390 while (const FullExpr *FE = dyn_cast<FullExpr>(E))
419 dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()))
420 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
464 if (auto *LE = dyn_cast<LambdaExpr>(S)) {
469 const UnaryOperator *U = dyn_cast<UnaryOperator>(S);
476 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E))
477 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()))
517 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
tools/clang/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp 115 const auto *CastE = dyn_cast<CastExpr>(S);
121 if (const auto *ImplCastE = dyn_cast<ImplicitCastExpr>(CastE)) {
tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp 64 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) {
95 if (const Expr *expr = dyn_cast<Expr>(S))
114 if (const auto *DRE = dyn_cast<DeclRefExpr>(E))
tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp 169 dyn_cast<ObjCIvarRefExpr>(BO->getLHS()->IgnoreParenCasts());
tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp 38 if (const auto *BE = dyn_cast<BinaryOperator>(S))
tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp 119 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
127 } else if (const auto *ImplicitCast = dyn_cast<ImplicitCastExpr>(S)) {
tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp 146 if (const CXXConstructorCall *Ctor = dyn_cast<CXXConstructorCall>(&Call)) {
170 if (const CXXDestructorCall *Dtor = dyn_cast<CXXDestructorCall>(&Call)) {
191 if (const ObjCMethodCall *Msg = dyn_cast<ObjCMethodCall>(&Call)) {
236 if (const CXXConstructorCall *Ctor = dyn_cast<CXXConstructorCall>(&Call)) {
326 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(RecE)) {
331 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(SFCtx->getDecl()))
333 dyn_cast<ObjCObjectType>(MD->getClassInterface()->getTypeForDecl()))
612 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E))
614 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E))
952 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
960 } else if (const auto *ImplicitCast = dyn_cast<ImplicitCastExpr>(S)) {
tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp 328 const auto *E = dyn_cast<StringLiteral>(CE->getArg(1)->IgnoreParenCasts());
tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp 76 if (const auto* ND = dyn_cast<NamedDecl>(D)) {
81 if (const auto *OD = dyn_cast<ObjCMethodDecl>(D)) {
82 if (const auto *CD = dyn_cast<ObjCContainerDecl>(OD->getParent())) {
tools/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp 189 auto *CtorCall = dyn_cast<CXXConstructorCall>(&Call);
257 auto *SuccessField = dyn_cast<FieldDecl>(Result.front());
tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp 676 dyn_cast<SymbolRegionValue>(SymReg->getSymbol());
688 const auto *PtrTy = dyn_cast<PointerType>(D->getType().getTypePtr());
tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp 88 while (const BinaryOperator *B2 = dyn_cast<BinaryOperator>(LHS)) {
115 if (const CompoundStmt *CS = dyn_cast<CompoundStmt>(Stmt1)) {
117 const IfStmt *InnerIf = dyn_cast<IfStmt>(*CS->body_begin());
161 if (const CompoundStmt *CompStmt = dyn_cast<CompoundStmt>(Stmt1)) {
165 if (const CompoundStmt *CompStmt = dyn_cast<CompoundStmt>(Stmt2)) {
225 const DeclRefExpr *DeclRef1 = dyn_cast<DeclRefExpr>(LHS);
226 const DeclRefExpr *DeclRef2 = dyn_cast<DeclRefExpr>(RHS);
227 const FloatingLiteral *FloatLit1 = dyn_cast<FloatingLiteral>(LHS);
228 const FloatingLiteral *FloatLit2 = dyn_cast<FloatingLiteral>(RHS);
318 const Expr *Expr1 = dyn_cast<Expr>(Stmt1);
319 const Expr *Expr2 = dyn_cast<Expr>(Stmt2);
tools/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp 118 if (const auto *MemOpCall = dyn_cast<CXXMemberOperatorCall>(&Call)) {
153 if (const auto *FC = dyn_cast<AnyFunctionCall>(&Call)) {
198 if (const auto *ICall = dyn_cast<CXXInstanceCall>(&Call)) {
tools/clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp 379 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
388 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
397 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
405 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
422 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
431 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
451 } else if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
525 const auto *TPDecl = dyn_cast<TemplateTypeParmDecl>(TParams->getParam(I));
583 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
593 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
611 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
621 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
632 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
702 if (const auto *InstCall = dyn_cast<CXXInstanceCall>(&Call)) {
802 if(const auto *SIE = dyn_cast<SymIntExpr>(CData.getBegin()))
807 if(const auto *SIE = dyn_cast<SymIntExpr>(CData.getEnd()))
1664 if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(Method)) {
1670 if (const auto *Dtor = dyn_cast<CXXDestructorDecl>(Method)) {
tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp 254 if (const ObjCInterfaceDecl *InterfD = dyn_cast<ObjCInterfaceDecl>(D)) {
270 if (const ObjCProtocolDecl *ProtD = dyn_cast<ObjCProtocolDecl>(D)) {
591 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E))
593 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E))
651 if (const ObjCIvarRefExpr *IvarRef = dyn_cast<ObjCIvarRefExpr>(E)) {
656 if (const ObjCPropertyRefExpr *PropRef = dyn_cast<ObjCPropertyRefExpr>(E)) {
661 if (const ObjCMessageExpr *MsgExpr = dyn_cast<ObjCMessageExpr>(E)) {
tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp 40 const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(D->getDeclContext());
146 if (VarDecl *VD = dyn_cast<VarDecl>(I))
159 ExprWithCleanups *Ex1 = dyn_cast<ExprWithCleanups>(Init);
162 CXXConstructExpr *Ex2 = dyn_cast<CXXConstructExpr>(Ex1->getSubExpr());
165 ImplicitCastExpr *Ex3 = dyn_cast<ImplicitCastExpr>(Ex2->getArg(0));
168 CXXConstructExpr *Ex4 = dyn_cast<CXXConstructExpr>(Ex3->getSubExpr());
171 ImplicitCastExpr *Ex5 = dyn_cast<ImplicitCastExpr>(Ex4->getArg(0));
174 CXXBindTemporaryExpr *Ex6 = dyn_cast<CXXBindTemporaryExpr>(Ex5->getSubExpr());
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp 731 if (auto *ND = dyn_cast<NamedDecl>(D)) {
738 if (auto *CD = dyn_cast<ObjCContainerDecl>(DC)) {
1011 auto *LiteralExpr = dyn_cast<ObjCStringLiteral>(Point->getStmt());
1245 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Condition)) {
1246 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
1250 dyn_cast<BinaryOperator>(InitExpr->IgnoreParenImpCasts())) {
1259 } else if (const BinaryOperator *B = dyn_cast<BinaryOperator>(Condition)) {
tools/clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp 130 const auto *VR = dyn_cast<VarRegion>(MR);
173 if (const auto *MD = dyn_cast<CXXMethodDecl>(D))
tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp 33 const ElementRegion *const ER = dyn_cast<ElementRegion>(MR);
63 const ElementRegion *const ER = dyn_cast<ElementRegion>(MR);
tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp 161 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
363 if (const DeclRefExpr *DE = dyn_cast<DeclRefExpr>(DeallocatorExpr)) {
522 if (auto *SIE = dyn_cast<SymIntExpr>(CondBSE)) {
611 if (const auto *SD = dyn_cast<SymbolDerived>(Sym)) {
tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp 55 const SubRegion *SR = dyn_cast<SubRegion>(R);
57 if (const ObjCIvarRegion *IR = dyn_cast<ObjCIvarRegion>(SR))
59 SR = dyn_cast<SubRegion>(SR->getSuperRegion());
95 if (const VarRegion *VR = dyn_cast<VarRegion>(RB)) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp 1241 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
1244 else if (const CXXNewExpr *NE = dyn_cast<CXXNewExpr>(E)) {
1636 if (const CallExpr *CE = dyn_cast<CallExpr>(S)) {
1640 FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
1667 if (const CXXNewExpr *NE = dyn_cast<CXXNewExpr>(S))
1670 if (const CXXDeleteExpr *DE = dyn_cast<CXXDeleteExpr>(S))
1681 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
1693 if (const ObjCMessageExpr *Msg = dyn_cast<ObjCMessageExpr>(E)) {
1702 if (const CXXNewExpr *NE = dyn_cast<CXXNewExpr>(E)) {
1709 if (const CXXDeleteExpr *DE = dyn_cast<CXXDeleteExpr>(E)) {
1815 const SymbolicRegion *SrBase = dyn_cast<SymbolicRegion>(R->getBaseRegion());
1993 const VarRegion *VR = dyn_cast<VarRegion>(MR);
2008 const VarRegion *VR = dyn_cast<VarRegion>(MR);
2023 const VarRegion *VR = dyn_cast<VarRegion>(MR);
2681 if (const CXXDestructorCall *DC = dyn_cast<CXXDestructorCall>(&Call)) {
2688 if (const AnyFunctionCall *FC = dyn_cast<AnyFunctionCall>(&Call)) {
2703 if (const CXXInstanceCall *CC = dyn_cast<CXXInstanceCall>(&Call)) {
2755 dyn_cast<SymbolicRegion>(MR->getBaseRegion()))
2813 if (const auto *FD = dyn_cast<FunctionDecl>(C.getStackFrame()->getDecl()))
2940 if (const ObjCMethodCall *Msg = dyn_cast<ObjCMethodCall>(Call)) {
3020 if (const DeclRefExpr *DE = dyn_cast<DeclRefExpr>(ArgE)) {
3044 if (const DeclRefExpr *ArgDRE = dyn_cast<DeclRefExpr>(ArgE))
3045 if (const VarDecl *D = dyn_cast<VarDecl>(ArgDRE->getDecl()))
3195 if (const auto *AE = dyn_cast<AtomicExpr>(S)) {
3247 if (const auto *MemCallE = dyn_cast<CXXMemberCallExpr>(S)) {
3249 } else if (const auto *OpCallE = dyn_cast<CXXOperatorCallExpr>(S)) {
3251 } else if (const auto *CallE = dyn_cast<CallExpr>(S)) {
3273 if (const auto *DD = dyn_cast<CXXDestructorDecl>(LC->getDecl())) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp 81 if (const BinaryOperator *binop = dyn_cast<BinaryOperator>(e)) {
152 if (const auto *CheckDR = dyn_cast<T1>(Check.variable))
163 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E))
165 else if (const auto *ME = dyn_cast<MemberExpr>(E)) {
190 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(rhse)) {
220 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E))
222 else if (const auto *ME = dyn_cast<MemberExpr>(E))
311 if (const CallExpr *TheCall = dyn_cast<CallExpr>(CS->getStmt())) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp 103 if (const VarDecl *VD = dyn_cast<VarDecl>(I))
tools/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp 444 const auto *AFC = dyn_cast<AnyFunctionCall>(&Call);
456 const auto *ConstructorDecl = dyn_cast<CXXConstructorDecl>(MethodDecl);
472 if (const auto *IC = dyn_cast<CXXInstanceCall>(AFC))
609 if (const auto *CC = dyn_cast<CXXConstructorCall>(&Call)) {
622 const auto IC = dyn_cast<CXXInstanceCall>(&Call);
712 if (const auto *IC = dyn_cast<CXXInstanceCall>(Call))
tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp 193 stackReg = dyn_cast<StackArgumentsSpaceRegion>(VR->getMemorySpace()))
tools/clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp 132 if (const auto *CE = dyn_cast<CompoundLiteralExpr>(ArgE))
133 if (const auto *IE = dyn_cast<InitListExpr>(CE->getInitializer()))
134 ArgE = dyn_cast<Expr>(*(IE->begin()));
tools/clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp 95 auto *Region = dyn_cast<VarRegion>(RegionVal->getAsRegion());
110 if (const auto *TT = dyn_cast<TypedefType>(T)) {
117 } else if (const auto *AT = dyn_cast<AttributedType>(T)) {
tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp 176 if (const auto *Ex = dyn_cast<Expr>(ValueExpr))
285 return dyn_cast<SymbolicRegion>(FieldReg->getSuperRegion());
287 return dyn_cast<SymbolicRegion>(ElementReg->getSuperRegion());
290 return dyn_cast<SymbolicRegion>(Region);
376 auto *MD = dyn_cast<ObjCMethodDecl>(LocCtxt->getDecl());
415 if (const auto *BD = dyn_cast<BlockDecl>(D))
417 else if (const auto *FD = dyn_cast<FunctionDecl>(D))
419 else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
513 while (auto *ICE = dyn_cast<ImplicitCastExpr>(E)) {
545 if (auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
555 } else if (auto *FD = dyn_cast<FunctionDecl>(D)) {
989 if (auto *BinOp = dyn_cast<BinaryOperator>(S)) {
995 if (auto *DS = dyn_cast<DeclStmt>(S)) {
997 auto *VD = dyn_cast<VarDecl>(DS->getSingleDecl());
1029 auto *DS = dyn_cast<DeclStmt>(S);
1033 auto *VD = dyn_cast<VarDecl>(DS->getSingleDecl());
1150 const auto *BinOp = dyn_cast<BinaryOperator>(S);
tools/clang/lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp 58 dyn_cast<ObjCInterfaceDecl>(D->getDeclContext())) {
60 } else if (auto *CatD = dyn_cast<ObjCCategoryDecl>(D->getDeclContext())) {
tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp 172 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
199 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
212 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
240 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
268 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
303 if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
389 const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(ND);
418 if (const DeclRegion *DR = dyn_cast<DeclRegion>(MRV.stripCasts()))
tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp 147 while (const SubRegion *SR = dyn_cast<SubRegion>(R)) {
148 if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(SR)) {
tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp 36 if (const ObjCIvarRefExpr *Ex = dyn_cast<ObjCIvarRefExpr>(S)) {
45 if (const BlockExpr *BE = dyn_cast<BlockExpr>(S)) {
50 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(S))
54 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(sub))
82 if (const ObjCImplementationDecl *ID = dyn_cast<ObjCImplementationDecl>(D)) {
99 if (const auto *FD = dyn_cast<FunctionDecl>(I)) {
tools/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp 85 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD))
119 if (const ConstantArrayType *CArrTy = dyn_cast<ConstantArrayType>(ArrTy))
150 if (auto *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
318 if (auto *TSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp 122 while (const auto *BaseRegion = dyn_cast<CXXBaseObjectRegion>(Region)) {
126 if (const auto *ElemRegion = dyn_cast<ElementRegion>(Region)) {
tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp 184 const ObjCBridgedCastExpr *BE = dyn_cast<ObjCBridgedCastExpr>(CE);
339 if (const auto *MC = dyn_cast<ObjCMethodCall>(&Call)) {
369 if (const auto *MC = dyn_cast<ObjCMethodCall>(&Call)) {
399 if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(RetE))
469 if (const auto *MsgInvocation = dyn_cast<ObjCMethodCall>(&CallOrMsg)) {
489 const auto *TR = dyn_cast<TypedValueRegion>(
509 const auto *VR = dyn_cast<VarRegion>(R);
644 if (const auto *MsgInvocation = dyn_cast<ObjCMethodCall>(&CallOrMsg)) {
658 } else if (const auto *MCall = dyn_cast<CXXMemberCall>(&CallOrMsg)) {
1053 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(CD)) {
1056 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CD)) {
tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp 178 if (const auto *TR = dyn_cast<TypedValueRegion>(MR))
186 if (const auto *ME = dyn_cast<MemberExpr>(Callee)) {
190 if (const auto *DRE = dyn_cast<DeclRefExpr>(This)) {
195 if (const auto *RD = dyn_cast<CXXRecordDecl>(VD->getDeclContext()))
204 if (const auto *CE = dyn_cast<CallExpr>(S))
216 if (const CallExpr *CE = dyn_cast<CallExpr>(S)) {
224 FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
226 if (const auto *MD = dyn_cast<CXXMethodDecl>(CE->getCalleeDecl())) {
514 } else if (const ObjCBoxedExpr *BL = dyn_cast<ObjCBoxedExpr>(S)) {
557 if (const CallExpr *CE = dyn_cast<CallExpr>(S)) {
572 } else if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(S)) {
656 if (auto MR = dyn_cast<StackSpaceRegion>(R->getMemorySpace()))
776 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
833 auto *Region = dyn_cast<DeclRegion>(sym->getOriginRegion());
tools/clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp 62 if (const auto *MD = dyn_cast<CXXMethodDecl>(Call.getDecl()))
tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp 77 if (const auto *CR = dyn_cast<CompoundLiteralRegion>(R)) {
83 } else if (const auto *AR = dyn_cast<AllocaRegion>(R)) {
89 } else if (const auto *BR = dyn_cast<BlockDataRegion>(R)) {
95 } else if (const auto *VR = dyn_cast<VarRegion>(R)) {
99 } else if (const auto *TOR = dyn_cast<CXXTempObjectRegion>(R)) {
263 if (const BlockDataRegion *B = dyn_cast<BlockDataRegion>(R))
273 if (const ExprWithCleanups *Cleanup = dyn_cast<ExprWithCleanups>(RetE))
280 if (auto *ICE = dyn_cast<ImplicitCastExpr>(RetE)) {
tools/clang/lib/StaticAnalyzer/Checkers/Taint.cpp 89 while (const SymbolCast *SC = dyn_cast<SymbolCast>(Sym))
141 if (const ElementRegion *ER = dyn_cast<ElementRegion>(Reg))
145 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(Reg))
148 if (const SubRegion *ER = dyn_cast<SubRegion>(Reg))
169 if (const auto *SD = dyn_cast<SymbolDerived>(*SI)) {
192 if (const auto *SRV = dyn_cast<SymbolRegionValue>(*SI)) {
198 if (const auto *SC = dyn_cast<SymbolCast>(*SI)) {
tools/clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp 214 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(Condition)) {
216 const IntegerLiteral *IntLiteral = dyn_cast<IntegerLiteral>(B->getRHS());
219 IntLiteral = dyn_cast<IntegerLiteral>(B->getLHS());
230 } else if (const UnaryOperator *U = dyn_cast<UnaryOperator>(Condition)) {
234 dyn_cast<ImplicitCastExpr>(U->getSubExpr()))
246 dyn_cast<ImplicitCastExpr>(Condition)) {
tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp 40 const Stmt *Parent = dyn_cast<ObjCForCollectionStmt>(Condition);
tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp 38 if (const DeclRefExpr *BR = dyn_cast<DeclRefExpr>(S))
tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp 48 const ElementRegion *ER = dyn_cast<ElementRegion>(MR);
83 dyn_cast<FunctionDecl>(C.getStackFrame()->getDecl()))
tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp 44 if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(D))
tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp 44 dyn_cast<FunctionDecl>(C.getStackFrame()->getDecl()))
65 if (const UnaryOperator *U = dyn_cast<UnaryOperator>(StoreE)) {
73 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(StoreE)) {
87 if (const DeclStmt *DS = dyn_cast<DeclStmt>(StoreE)) {
93 dyn_cast<CXXConstructorDecl>(C.getStackFrame()->getDecl())) {
tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp 352 const auto *CXXRD = dyn_cast<CXXRecordDecl>(RD);
484 const auto *OtherCtor = dyn_cast<CXXConstructorDecl>(LC->getDecl());
530 const auto *Parent = dyn_cast<CXXRecordDecl>(FD->getParent());
588 const auto *CXXParent = dyn_cast<CXXRecordDecl>(Field->getParent());
tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp 265 const auto *SuperR = dyn_cast<TypedValueRegion>(R->getSuperRegion());
tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp 296 if (const VarRegion *VR = dyn_cast<VarRegion>(R))
tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp 90 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
133 if (const CallExpr *CE = dyn_cast<CallExpr>(S->getStmt())) {
153 if (const auto *I = dyn_cast<IntegerLiteral>(S))
tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp 86 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl());
tools/clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp 171 if (const auto *Cast = dyn_cast<CastExpr>(E)) {
tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp 65 if (const MemberExpr *CME = dyn_cast<MemberExpr>(CE->getCallee())) {
99 const auto MC = dyn_cast<CXXMemberCall>(&Call);
tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp 392 dyn_cast<PathDiagnosticEventPiece>(path.front().get())) {
493 auto *Call = dyn_cast<PathDiagnosticCallPiece>(I.get());
525 if (auto *C = dyn_cast<PathDiagnosticCallPiece>(I->get()))
528 if (auto *M = dyn_cast<PathDiagnosticMacroPiece>(I->get()))
531 if (auto *CF = dyn_cast<PathDiagnosticControlFlowPiece>(I->get())) {
541 dyn_cast<PathDiagnosticControlFlowPiece>(Next->get())) {
559 if (auto *C = dyn_cast<PathDiagnosticCallPiece>(I->get()))
562 if (auto *M = dyn_cast<PathDiagnosticMacroPiece>(I->get()))
769 if (const auto *DR = dyn_cast<DeclRefExpr>(LHS)) {
772 const auto *D = dyn_cast<EnumConstantDecl>(DR->getDecl());
1242 if (const auto *FS = dyn_cast<ForStmt>(Loop))
1244 else if (const auto *WS = dyn_cast<WhileStmt>(Loop))
1246 else if (const auto *OFS = dyn_cast<ObjCForCollectionStmt>(Loop)) {
1248 } else if (const auto *FRS = dyn_cast<CXXForRangeStmt>(Loop)) {
1395 if (const auto *FS = dyn_cast<ForStmt>(FL))
1397 if (const auto *FRS = dyn_cast<CXXForRangeStmt>(FL))
1415 auto *Piece = dyn_cast<PathDiagnosticControlFlowPiece>(I->get());
1455 auto *PrevPiece = dyn_cast<PathDiagnosticControlFlowPiece>(Prev->get());
1493 const auto *PieceI = dyn_cast<PathDiagnosticControlFlowPiece>(I->get());
1514 const auto *EV = dyn_cast<PathDiagnosticEventPiece>(NextI->get());
1525 PieceNextI = dyn_cast<PathDiagnosticControlFlowPiece>(NextI->get());
1615 const auto *PieceI = dyn_cast<PathDiagnosticControlFlowPiece>(I->get());
1630 dyn_cast<PathDiagnosticControlFlowPiece>(NextI->get());
1637 PieceNextI = dyn_cast<PathDiagnosticControlFlowPiece>(NextI->get());
1685 const auto *PieceI = dyn_cast<PathDiagnosticControlFlowPiece>(I->get());
1732 const auto *PieceI = dyn_cast<PathDiagnosticEventPiece>(I->get());
1741 const auto *PieceNextI = dyn_cast<PathDiagnosticEventPiece>(NextI->get());
1763 if (auto *CallI = dyn_cast<PathDiagnosticCallPiece>(I->get())) {
1776 auto *PieceI = dyn_cast<PathDiagnosticControlFlowPiece>(I->get());
1792 const auto *PieceNextI = dyn_cast<PathDiagnosticControlFlowPiece>(NextI->get());
1938 dyn_cast<PathDiagnosticControlFlowPiece>(Path.front().get());
2211 if (const auto *meta = dyn_cast<SymbolMetadata>(sym))
2223 if (const auto *SR = dyn_cast<SymbolicRegion>(R))
2286 if (const auto *SR = dyn_cast<SymbolicRegion>(R))
2359 if (const auto *ME = dyn_cast<MemberExpr>(S))
2363 if (const auto *B = dyn_cast<BinaryOperator>(S))
2614 if (auto *call = dyn_cast<PathDiagnosticCallPiece>(&*piece)) {
2847 if (auto PR = dyn_cast<PathSensitiveBugReport>(R.get()))
2894 if (auto *PR = dyn_cast<PathSensitiveBugReport>(J.get())) {
2911 auto *R = dyn_cast<PathSensitiveBugReport>(I.get());
3048 if (const auto FD = dyn_cast<FunctionDecl>(Signature)) {
3050 } else if (const auto OD = dyn_cast<ObjCMethodDecl>(Signature)) {
3151 if (auto *CPInner = dyn_cast<PathDiagnosticCallPiece>(Path.back().get()))
3168 if (auto *CP = dyn_cast<PathDiagnosticCallPiece>(LastP)) {
3175 const auto *ND = dyn_cast<NamedDecl>(CP->getCallee());
tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp 98 const auto *E = dyn_cast<Expr>(S);
103 if (const auto *CE = dyn_cast<CastExpr>(E)) {
109 } else if (const auto *B = dyn_cast<BinaryOperator>(E)) {
118 } else if (const auto *U = dyn_cast<UnaryOperator>(E)) {
131 else if (const auto *ME = dyn_cast<MemberExpr>(E)) {
133 } else if (const auto *IvarRef = dyn_cast<ObjCIvarRefExpr>(E)) {
135 } else if (const auto *AE = dyn_cast<ArraySubscriptExpr>(E)) {
137 } else if (const auto *PE = dyn_cast<ParenExpr>(E)) {
139 } else if (const auto *FE = dyn_cast<FullExpr>(E)) {
150 if (const auto *CE = dyn_cast<ImplicitCastExpr>(E))
195 if (const auto *DRE = dyn_cast<DeclRefExpr>(CondVarExpr))
196 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
199 if (const auto *ME = dyn_cast<MemberExpr>(CondVarExpr))
200 if (const auto *FD = dyn_cast<FieldDecl>(ME->getMemberDecl()))
454 if (const auto *ICE = dyn_cast<ImplicitCastExpr>(Base))
457 if (const auto *DRE = dyn_cast<DeclRefExpr>(Base))
458 if (const auto *ID = dyn_cast<ImplicitParamDecl>(DRE->getDecl()))
501 if (const auto *RDX = dyn_cast<CXXRecordDecl>(RD))
507 if (const auto *RDX = dyn_cast<CXXRecordDecl>(RD))
563 if (const auto *IvarR = dyn_cast<ObjCIvarRegion>(RegionOfInterest)) {
859 if (const auto *DS = dyn_cast<DeclStmt>(S)) {
860 if (const auto *VD = dyn_cast<VarDecl>(DS->getSingleDecl()))
865 } else if (const auto *BO = dyn_cast<BinaryOperator>(S)) {
1014 const auto *Ret = dyn_cast<ReturnStmt>(SP->getStmt());
1106 if (const auto *DR = dyn_cast<DeclRefExpr>(RetE))
1107 if (const auto *DD = dyn_cast<DeclaratorDecl>(DR->getDecl()))
1229 const auto *FrameSpace = dyn_cast<StackSpaceRegion>(VarSpace);
1254 if (const auto *TR = dyn_cast<TypedValueRegion>(R)) {
1321 if (const auto *TR = dyn_cast<TypedValueRegion>(R)) {
1373 if (const auto *VR = dyn_cast<VarRegion>(R)) {
1419 if (const auto *VR = dyn_cast<VarRegion>(R)) {
1421 if (const auto *Param = dyn_cast<ParmVarDecl>(VR->getDecl())) {
1440 if (const auto *TmpR = dyn_cast<CXXTempObjectRegion>(R))
1470 const auto *DS = dyn_cast<DeclStmt>(S);
1471 const auto *VR = dyn_cast<VarRegion>(R);
1497 if (const auto *VR = dyn_cast<VarRegion>(R))
1778 if (const auto *BinOp = dyn_cast<BinaryOperator>(ElseCond))
1836 if (const auto *DR = dyn_cast<DeclRefExpr>(E)) {
1837 if (const auto *VD = dyn_cast<VarDecl>(DR->getDecl())) {
1860 if (const auto *FE = dyn_cast<FullExpr>(Ex))
1862 if (const auto *OVE = dyn_cast<OpaqueValueExpr>(Ex))
1864 if (const auto *POE = dyn_cast<PseudoObjectExpr>(Ex)) {
1865 const auto *PropRef = dyn_cast<ObjCPropertyRefExpr>(POE->getSyntacticForm());
1875 if (const auto *CO = dyn_cast<ConditionalOperator>(Ex)) {
1897 if (auto *BO = dyn_cast<BinaryOperator>(Ex))
1901 if (auto *UO = dyn_cast<UnaryOperator>(Ex)) {
1967 if (const auto *Arr = dyn_cast<ArraySubscriptExpr>(Inner))
2082 const auto *ME = dyn_cast<ObjCMessageExpr>(S);
2109 if (const auto *ME = dyn_cast<ObjCMessageExpr>(S)) {
2145 if (auto *ev = dyn_cast<PathDiagnosticEventPiece>(piece.get()))
2236 while (const auto *InnerBO = dyn_cast<BinaryOperator>(Cond)) {
2347 if (const auto *DR = dyn_cast<DeclRefExpr>(Ex)) {
2371 if (const auto *IL = dyn_cast<IntegerLiteral>(Ex)) {
2390 if (const auto *ME = dyn_cast<MemberExpr>(Ex)) {
2414 const auto *LhsME = dyn_cast<MemberExpr>(BExpr->getLHS()->IgnoreParenCasts());
2415 const auto *RhsME = dyn_cast<MemberExpr>(BExpr->getRHS()->IgnoreParenCasts());
2555 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
2698 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
2708 if (const auto *MD = dyn_cast<CXXConstructorDecl>(D)) {
2718 const auto *MD = dyn_cast<CXXMethodDecl>(LCtx->getDecl());
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp 239 if (const auto *FD = dyn_cast<FunctionDecl>(D))
241 else if (const auto *BD = dyn_cast<BlockDecl>(D))
243 else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
245 else if (const auto *CD = dyn_cast<CXXConstructorDecl>(D))
394 if (const auto *ND = dyn_cast<NamespaceDecl>(Ctx)) {
400 if (const auto *RD = dyn_cast<RecordDecl>(Ctx)) {
464 if (const auto *FD = dyn_cast<FunctionDecl>(D))
466 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
468 if (const auto *BD = dyn_cast<BlockDecl>(D)) {
494 if (const auto *FD = dyn_cast<FunctionDecl>(D))
496 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))
498 if (const auto *BD = dyn_cast<BlockDecl>(D))
836 if (const auto *ME = dyn_cast<MemberExpr>(getOriginExpr()->getCallee()))
1031 if (const auto *BO = dyn_cast<BinaryOperator>(Syntactic))
1174 const auto *InstRecIg = dyn_cast<DeclRefExpr>(InstRec->IgnoreParenImpCasts());
1248 if (const auto *M = dyn_cast<ObjCMessageExpr>(E->getInstanceReceiver()))
1361 if (const auto *MCE = dyn_cast<CXXMemberCallExpr>(CE))
1364 if (const auto *OpCE = dyn_cast<CXXOperatorCallExpr>(CE)) {
1366 if (const auto *MD = dyn_cast<CXXMethodDecl>(DirectCallee))
1432 if (const auto *CE = dyn_cast<CallExpr>(S)) {
1434 } else if (const auto *NE = dyn_cast<CXXNewExpr>(S)) {
1436 } else if (const auto *ME = dyn_cast<ObjCMessageExpr>(S)) {
tools/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp 38 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S);
52 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S);
55 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl()))
tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp 248 RS = dyn_cast<ReturnStmt>(LastStmt->getStmt());
251 RS = dyn_cast<ReturnStmt>(AutoDtor->getTriggerStmt());
tools/clang/lib/StaticAnalyzer/Core/DynamicType.cpp 48 if (const auto *TR = dyn_cast<TypedRegion>(MR))
51 if (const auto *SR = dyn_cast<SymbolicRegion>(MR)) {
tools/clang/lib/StaticAnalyzer/Core/Environment.cpp 65 if (const auto *E = dyn_cast<Expr>(S))
tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp 124 const Expr *Ex = dyn_cast<Expr>(progPoint.castAs<PostStmt>().getStmt());
tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp 240 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
275 if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {
289 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
373 if (const auto *MT = dyn_cast<MaterializeTemporaryExpr>(Result)) {
862 while ((ASE = dyn_cast<ArraySubscriptExpr>(Init)))
1420 if (const auto *DefE = dyn_cast<CXXDefaultArgExpr>(S))
1422 else if (const auto *DefE = dyn_cast<CXXDefaultInitExpr>(S))
1428 if (const auto *MTE = dyn_cast<MaterializeTemporaryExpr>(ArgE)) {
1801 dyn_cast<Expr>(*SE->getSubStmt()->body_rbegin())) {
1995 const auto *Ex = dyn_cast<Expr>(Condition);
2002 while (const auto *CE = dyn_cast<CastExpr>(Ex)) {
2030 const auto *BO = dyn_cast<BinaryOperator>(Condition);
2056 if (const auto *Ex = dyn_cast<Expr>(Condition))
2059 const auto *BO = dyn_cast<BinaryOperator>(Condition);
2107 if (const auto *Ex = dyn_cast<Expr>(Condition))
2132 if (const auto *Ex = dyn_cast<Expr>(Condition)) {
2427 if (const auto *VD = dyn_cast<VarDecl>(D)) {
2434 const auto *DeclRefEx = dyn_cast<DeclRefExpr>(Ex);
2475 if (const auto *ED = dyn_cast<EnumConstantDecl>(D)) {
2481 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
2585 if (const auto *MD = dyn_cast<CXXMethodDecl>(Member)) {
2615 dyn_cast<ImplicitCastExpr>(I->getParentMap().getParentIgnoreParens(M));
2695 if (const auto *VR = dyn_cast<VarRegion>(MR->getBaseRegion()))
3013 const auto *PR = dyn_cast<PathSensitiveBugReport>(I.get());
3123 dyn_cast<PathSensitiveBugReport>(EI->getReports()[0].get());
tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp 824 if (const OpaqueValueExpr *OpaqueEx = dyn_cast<OpaqueValueExpr>(L))
979 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Ex)) {
tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp 45 if (const CXXConstructorCall *Ctor = dyn_cast<CXXConstructorCall>(&Call)) {
353 if (const auto *CE = dyn_cast<CallExpr>(E)) {
360 } else if (const auto *CCE = dyn_cast<CXXConstructExpr>(E)) {
370 } else if (const auto *ME = dyn_cast<ObjCMessageExpr>(E)) {
tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp 179 removeDead(Pred, Dst, dyn_cast<ReturnStmt>(LastSt), LCtx,
237 if (const Expr *Ex = dyn_cast<Expr>(CE)) {
248 if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(CE)) {
256 if (const auto *CNE = dyn_cast<CXXNewExpr>(CE)) {
393 if (const StackFrameContext *SFC = dyn_cast<StackFrameContext>(LCtx)) {
608 if (const ObjCMethodCall *Msg = dyn_cast<ObjCMethodCall>(&Call)) {
619 } else if (const CXXConstructorCall *C = dyn_cast<CXXConstructorCall>(&Call)){
657 if (const auto *CNE = dyn_cast<CXXNewExpr>(E))
835 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD))
843 const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(FD);
869 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CalleeADC->getDecl())) {
989 const CXXInstanceCall *ICall = dyn_cast<CXXInstanceCall>(&Call);
tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp 62 if (const auto *R = dyn_cast<TypedValueRegion>(MV->getRegion())) {
120 if (const auto *DS = dyn_cast<DeclStmt>(elem)) {
tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp 197 if (const auto *ND = dyn_cast<NamedDecl>(DeclWithIssue))
482 if (const auto *P = dyn_cast<PathDiagnosticNotePiece>(Piece.get())) {
702 if (const auto *PopUpP = dyn_cast<PathDiagnosticPopUpPiece>(&Piece)) {
879 if (const auto *MP = dyn_cast<PathDiagnosticMacroPiece>(&P)) {
974 if (const auto *MP = dyn_cast<PathDiagnosticMacroPiece>(subPiece.get())) {
979 if (const auto *EP = dyn_cast<PathDiagnosticEventPiece>(subPiece.get())) {
tools/clang/lib/StaticAnalyzer/Core/IssueHash.cpp 91 if (const auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp 176 if (const DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
tools/clang/lib/StaticAnalyzer/Core/LoopWidening.cpp 85 const CXXMethodDecl *CXXMD = dyn_cast<CXXMethodDecl>(STC->getDecl());
tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp 137 if (const auto *sr = dyn_cast<SubRegion>(r))
149 if (const auto *sr = dyn_cast<SubRegion>(superRegion)) {
158 const auto *SSR = dyn_cast<StackSpaceRegion>(getMemorySpace());
699 const auto *const VR = dyn_cast<VarRegion>(this->getBaseRegion());
700 const auto *const FR = dyn_cast<FieldRegion>(this);
823 if (const auto *SFC = dyn_cast<StackFrameContext>(LC)) {
827 if (const auto *BC = dyn_cast<BlockInvocationContext>(LC)) {
902 else if (const auto *BD = dyn_cast<BlockDecl>(STCD)) {
1084 while (const auto *Base = dyn_cast<CXXBaseObjectRegion>(Super))
1106 const auto *D = dyn_cast<CXXMethodDecl>(LC->getDecl());
1113 D = dyn_cast<CXXMethodDecl>(LC->getDecl());
1130 const auto *SR = dyn_cast<SubRegion>(this);
1134 SR = dyn_cast<SubRegion>(R);
1137 return dyn_cast<MemSpaceRegion>(R);
1183 while (const auto *BR = dyn_cast<CXXBaseObjectRegion>(R))
1220 const auto *SubR = dyn_cast<SubRegion>(this);
1223 if (const auto *SymR = dyn_cast<SymbolicRegion>(SubR))
1225 SubR = dyn_cast<SubRegion>(SubR->getSuperRegion());
1268 ER = dyn_cast<ElementRegion>(superR);
1347 if (const auto *TVR = dyn_cast<TypedValueRegion>(R)) {
1349 } else if (const auto *SR = dyn_cast<SymbolicRegion>(R)) {
1593 if (const auto *SR = dyn_cast<SymbolicRegion>(MR))
1613 if (const auto *SR = dyn_cast<SymbolicRegion>(MR))
tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp 630 dyn_cast<PathDiagnosticCallPiece>(&Piece)) {
639 dyn_cast<PathDiagnosticMacroPiece>(&Piece)) {
700 if (const NamedDecl *ND = dyn_cast<NamedDecl>(DeclWithIssue)) {
tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp 252 if (const TypedValueRegion *TR = dyn_cast<TypedValueRegion>(R)) {
601 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R))
606 if (const SubRegion *SR = dyn_cast<SubRegion>(R)) {
620 if (const BlockDataRegion *BDR = dyn_cast<BlockDataRegion>(R)) {
tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp 341 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(SE)) {
362 if (const SymSymExpr *SSE = dyn_cast<SymSymExpr>(SE)) {
509 if (const SymIntExpr* SIE = dyn_cast<SymIntExpr>(Sym))
523 if (const SymSymExpr *SSE = dyn_cast<SymSymExpr>(Sym)) {
tools/clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp 31 } else if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(Sym)) {
42 } else if (const SymSymExpr *SSE = dyn_cast<SymSymExpr>(Sym)) {
132 if (const BinarySymExpr *SE = dyn_cast<BinarySymExpr>(Sym))
187 if (const SymIntExpr *SE = dyn_cast<SymIntExpr>(Sym)) {
tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp 408 if (const auto *FD = dyn_cast<FunctionDecl>(InitLoc->getDecl()))
474 if (const auto *BR = dyn_cast<CXXBaseObjectRegion>(R))
659 if (const SubRegion *R = dyn_cast<SubRegion>(K.getRegion())) {
829 if (const FieldRegion *FR = dyn_cast<FieldRegion>(R))
886 } else if (const FieldRegion *FR = dyn_cast<FieldRegion>(Top)) {
926 } else if (const SubRegion *BaseSR = dyn_cast<SubRegion>(Base)) {
1082 if (const auto *TO = dyn_cast<TypedValueRegion>(baseR)) {
1110 if (const BlockDataRegion *BR = dyn_cast<BlockDataRegion>(baseR)) {
1136 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(baseR))
1189 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(AT))
1472 if (const TypedRegion *TR = dyn_cast<TypedRegion>(MR))
1474 else if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(MR))
1520 if (const FieldRegion* FR = dyn_cast<FieldRegion>(R))
1523 if (const ElementRegion* ER = dyn_cast<ElementRegion>(R)) {
1532 if (const ObjCIvarRegion *IVR = dyn_cast<ObjCIvarRegion>(R)) {
1542 if (const VarRegion *VR = dyn_cast<VarRegion>(R)) {
1575 if (const TypedValueRegion *TVR = dyn_cast<TypedValueRegion>(R))
1578 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R))
1639 if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) {
1646 } else if (const FieldRegion *FR = dyn_cast<FieldRegion>(R)) {
1654 dyn_cast<CXXBaseObjectRegion>(R)) {
1681 if (const StringRegion *StrR = dyn_cast<StringRegion>(superR)) {
1704 } else if (const VarRegion *VR = dyn_cast<VarRegion>(superR)) {
1712 if (const auto *InitList = dyn_cast<InitListExpr>(Init)) {
1795 if (const auto *VR = dyn_cast<VarRegion>(superR)) {
1805 if (const auto *InitList = dyn_cast<InitListExpr>(Init)) {
1851 if (const ElementRegion *ER = dyn_cast<ElementRegion>(LazyBindingRegion))
1925 if (const ElementRegion *ER = dyn_cast<ElementRegion>(Base)) {
1933 SR = dyn_cast<SubRegion>(Base);
1941 dyn_cast<TypedValueRegion>(R->getSuperRegion())) {
2104 if (const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(RD))
2174 if (const TypedValueRegion* TR = dyn_cast<TypedValueRegion>(R)) {
2186 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R)) {
2240 if (const ConstantArrayType* CAT = dyn_cast<ConstantArrayType>(AT))
2337 if (const CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(RD))
2424 if (const auto *CRD = dyn_cast<CXXRecordDecl>(RD)) {
2539 if (const VarRegion *VR = dyn_cast<VarRegion>(baseR)) {
2546 if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(baseR)) {
2561 if (const CXXThisRegion *TR = dyn_cast<CXXThisRegion>(baseR)) {
2578 if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(baseR))
2610 if (const BlockDataRegion *BR = dyn_cast<BlockDataRegion>(R)) {
tools/clang/lib/StaticAnalyzer/Core/SVals.cpp 53 if (const auto *SR = dyn_cast<SymbolicRegion>(R)) {
67 if (const auto *FD = dyn_cast<FunctionDecl>(CTR->getDecl()))
94 dyn_cast<SymbolicRegion>(R->StripCasts()))
109 while (const auto *SR = dyn_cast<SubRegion>(R)) {
110 if (const auto *SymR = dyn_cast<SymbolicRegion>(SR))
tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp 152 if (const FunctionCodeRegion *FTR = dyn_cast<FunctionCodeRegion>(R))
153 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FTR->getDecl()))
357 if (const auto *SymInt = dyn_cast<SymIntExpr>(Sym))
664 if (const SymIntExpr *symIntExpr = dyn_cast<SymIntExpr>(Sym)) {
1016 const ElementRegion *RightER = dyn_cast<ElementRegion>(RightMR);
1017 const ElementRegion *LeftER = dyn_cast<ElementRegion>(LeftMR);
1053 const FieldRegion *RightFR = dyn_cast<FieldRegion>(RightMR);
1054 const FieldRegion *LeftFR = dyn_cast<FieldRegion>(LeftMR);
1177 if (const ElementRegion *elemReg = dyn_cast<ElementRegion>(region)) {
tools/clang/lib/StaticAnalyzer/Core/Store.cpp 105 if (const auto *TR = dyn_cast<TypedValueRegion>(R)) {
178 if (const auto *TR = dyn_cast<TypedValueRegion>(baseR)) {
233 const auto *TVR = dyn_cast<TypedValueRegion>(MR);
285 dyn_cast<CXXDerivedObjectRegion>(DerivedReg)) {
287 dyn_cast<SymbolicRegion>(AlreadyDerivedReg->getSuperRegion()))
307 if (const auto *TVR = dyn_cast<TypedValueRegion>(MR))
309 if (const auto *SR = dyn_cast<SymbolicRegion>(MR))
348 if (const auto *BaseR = dyn_cast<CXXBaseObjectRegion>(MR)) {
382 if (const auto *SR = dyn_cast<SymbolicRegion>(MR)) {
467 if (const auto *ID = dyn_cast<ObjCIvarDecl>(D))
493 const auto *ElemR = dyn_cast<ElementRegion>(BaseRegion);
tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp 412 for (auto SR = dyn_cast<SubRegion>(region); SR;
413 SR = dyn_cast<SubRegion>(SR->getSuperRegion())) {
414 if (const auto ER = dyn_cast<ElementRegion>(SR)) {
437 if (const auto *SR = dyn_cast<SymbolicRegion>(MR))
440 if (const auto *VR = dyn_cast<VarRegion>(MR))
tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp 518 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
684 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
706 } else if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) {
711 if (const auto *OID = dyn_cast<ObjCImplementationDecl>(DC)) {
713 } else if (const auto *OID = dyn_cast<ObjCInterfaceDecl>(DC)) {
715 } else if (const auto *OC = dyn_cast<ObjCCategoryDecl>(DC)) {
722 } else if (const auto *OCD = dyn_cast<ObjCCategoryImplDecl>(DC)) {
tools/clang/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp 35 const FunctionDecl *func = llvm::dyn_cast<FunctionDecl>(*I);
tools/clang/lib/Tooling/ASTDiff/ASTDiff.cpp 364 if (auto *Namespace = dyn_cast<NamespaceDecl>(Context))
366 else if (auto *Record = dyn_cast<RecordDecl>(Context))
369 if (auto *Tag = dyn_cast<TagDecl>(Context))
425 if (auto *V = dyn_cast<ValueDecl>(D))
427 if (auto *N = dyn_cast<NamedDecl>(D))
429 if (auto *T = dyn_cast<TypedefNameDecl>(D))
431 if (auto *T = dyn_cast<TypeDecl>(D))
436 if (auto *U = dyn_cast<UsingDirectiveDecl>(D))
438 if (auto *A = dyn_cast<AccessSpecDecl>(D)) {
447 if (auto *U = dyn_cast<UnaryOperator>(S))
449 if (auto *B = dyn_cast<BinaryOperator>(S))
451 if (auto *M = dyn_cast<MemberExpr>(S))
453 if (auto *I = dyn_cast<IntegerLiteral>(S)) {
458 if (auto *F = dyn_cast<FloatingLiteral>(S)) {
463 if (auto *D = dyn_cast<DeclRefExpr>(S))
465 if (auto *String = dyn_cast<StringLiteral>(S))
467 if (auto *B = dyn_cast<CXXBoolLiteralExpr>(S))
tools/clang/lib/Tooling/JSONCompilationDatabase.cpp 340 auto *Array = dyn_cast<llvm::yaml::SequenceNode>(Root);
346 auto *Object = dyn_cast<llvm::yaml::MappingNode>(&NextObject);
356 auto *KeyString = dyn_cast<llvm::yaml::ScalarNode>(NextKeyValue.getKey());
368 auto *ValueString = dyn_cast<llvm::yaml::ScalarNode>(Value);
369 auto *SequenceString = dyn_cast<llvm::yaml::SequenceNode>(Value);
382 auto *Scalar = dyn_cast<llvm::yaml::ScalarNode>(&Argument);
tools/clang/lib/Tooling/Refactoring/ASTSelection.cpp 115 if (auto *Opaque = dyn_cast<OpaqueValueExpr>(S))
118 if (auto *TE = dyn_cast<CXXThisExpr>(S)) {
221 if (const auto *ND = dyn_cast<NamedDecl>(D))
279 else if (const auto *CE = dyn_cast<CallExpr>(Parent)) {
tools/clang/lib/Tooling/Refactoring/Extract/Extract.cpp 51 while (const auto *RD = dyn_cast<CXXRecordDecl>(D->getLexicalDeclContext()))
81 if (isSimpleExpression(dyn_cast<Expr>(Code[0])))
86 if (const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(Code[0])) {
tools/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp 32 if (const auto *If = dyn_cast<IfStmt>(S))
35 if (const auto *While = dyn_cast<WhileStmt>(S))
37 if (const auto *For = dyn_cast<ForStmt>(S))
39 if (const auto *CXXFor = dyn_cast<CXXForRangeStmt>(S))
41 if (const auto *ObjCFor = dyn_cast<ObjCForCollectionStmt>(S))
43 if(const auto *Switch = dyn_cast<SwitchStmt>(S))
45 if(const auto *Case = dyn_cast<SwitchCase>(S))
tools/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp 46 if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(FoundDecl))
48 else if (const auto *DtorDecl = dyn_cast<CXXDestructorDecl>(FoundDecl))
71 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FoundDecl)) {
78 } else if (const auto *RecordDecl = dyn_cast<CXXRecordDecl>(FoundDecl)) {
81 dyn_cast<ClassTemplateDecl>(FoundDecl)) {
113 dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl))
tools/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp 196 if (const auto* TAT = dyn_cast<TypeAliasTemplateDecl>(Decl))
253 if (auto *UsingShadow = llvm::dyn_cast<UsingShadowDecl>(Decl)) {
264 if (const auto *MD = llvm::dyn_cast<CXXMethodDecl>(Decl)) {
283 if (const auto *T = llvm::dyn_cast<EnumConstantDecl>(Decl)) {
tools/clang/lib/Tooling/Syntax/Tree.cpp 62 if (auto *T = dyn_cast<syntax::Tree>(N)) {
95 if (auto *L = llvm::dyn_cast<syntax::Leaf>(N)) {
135 auto *L = llvm::dyn_cast<syntax::Leaf>(N);
tools/clang/lib/Tooling/Transformer/SourceCodeBuilders.cpp 22 if (const auto *CE = dyn_cast<CXXConstructExpr>(Expr)) {
43 if (const auto *Op = dyn_cast<CXXOperatorCallExpr>(Expr))
55 if (const auto *Op = dyn_cast<CXXOperatorCallExpr>(Expr))
75 if (const auto *Op = dyn_cast<UnaryOperator>(&E))
96 if (const auto *Op = dyn_cast<UnaryOperator>(&E))
117 if (const auto *Op = llvm::dyn_cast<UnaryOperator>(&E))
141 if (const auto *Op = llvm::dyn_cast<UnaryOperator>(&E))
tools/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp 62 if (const auto *FD = dyn_cast<FunctionDecl>(D)) {
66 } else if (const auto *VD = dyn_cast<VarDecl>(D)) {
72 if (const auto *DC = dyn_cast<DeclContext>(D))
tools/clang/tools/driver/cc1gen_reproducer_main.cpp 127 if (const Command *Cmd = dyn_cast<Command>(&J)) {
tools/clang/tools/driver/driver.cpp 472 if (const Command *C = dyn_cast<Command>(&J))
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp 304 const auto *DC = llvm::dyn_cast<DeclContext>(&Scope);
tools/clang/tools/extra/clang-doc/Mapper.cpp 71 if (dyn_cast<CXXMethodDecl>(D))
tools/clang/tools/extra/clang-doc/Serialize.cpp 236 if (const auto *N = dyn_cast<NamespaceDecl>(D))
282 if (const auto *N = dyn_cast<EnumDecl>(T)) {
288 } else if (const auto *N = dyn_cast<RecordDecl>(T)) {
310 if (const auto *N = dyn_cast<EnumDecl>(T)) {
315 } else if (const auto *N = dyn_cast<RecordDecl>(T)) {
360 const auto *DC = dyn_cast<DeclContext>(D);
362 if (const auto *N = dyn_cast<NamespaceDecl>(DC)) {
371 } else if (const auto *N = dyn_cast<RecordDecl>(DC))
374 else if (const auto *N = dyn_cast<FunctionDecl>(DC))
377 else if (const auto *N = dyn_cast<EnumDecl>(DC))
385 if ((Namespaces.empty() && dyn_cast<RecordDecl>(D)) ||
422 if (dyn_cast<EnumDecl>(T))
425 else if (dyn_cast<RecordDecl>(T))
461 if (const auto *MD = dyn_cast<CXXMethodDecl>(Decl)) {
528 if (const auto *C = dyn_cast<CXXRecordDecl>(D)) {
599 dyn_cast<ClassTemplateSpecializationDecl>(D->getParent()))
tools/clang/tools/extra/clang-include-fixer/IncludeFixer.cpp 220 if (const auto *ND = dyn_cast<NamespaceDecl>(Context)) {
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp 29 if (const auto *ED = dyn_cast<EnumDecl>(Node.getDeclContext()))
56 if (const auto *NSD = dyn_cast<NamespaceDecl>(Context)) {
60 } else if (const auto *ED = dyn_cast<EnumDecl>(Context)) {
tools/clang/tools/extra/clang-move/HelperDeclRefGraph.cpp 94 if (const auto *RD = dyn_cast<CXXRecordDecl>(DC))
96 else if (const auto *FD = dyn_cast<FunctionDecl>(DC))
tools/clang/tools/extra/clang-move/Move.cpp 56 dyn_cast<CXXRecordDecl>(Parent->getParent())) {
360 if (const auto *ND = llvm::dyn_cast<NamespaceDecl>(Context))
tools/clang/tools/extra/clang-reorder-fields/ReorderFieldsAction.cpp 112 if (auto *FD = dyn_cast<FieldDecl>(MemExpr->getMemberDecl()))
278 const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD);
281 if (const auto *D = dyn_cast<CXXConstructorDecl>(C->getDefinition()))
tools/clang/tools/extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp 178 const auto *IntLit = llvm::dyn_cast<IntegerLiteral>(MultBinOp->getLHS());
179 const auto *FloatLit = llvm::dyn_cast<FloatingLiteral>(MultBinOp->getLHS());
188 IntLit = llvm::dyn_cast<IntegerLiteral>(MultBinOp->getRHS());
189 FloatLit = llvm::dyn_cast<FloatingLiteral>(MultBinOp->getRHS());
200 const auto *FloatLit = llvm::dyn_cast<FloatingLiteral>(DivBinOp->getRHS());
tools/clang/tools/extra/clang-tidy/abseil/DurationRewriter.cpp 208 if (const auto *LitFloat = llvm::dyn_cast<FloatingLiteral>(&Node))
tools/clang/tools/extra/clang-tidy/abseil/StrCatAppendCheck.cpp 26 if (const auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
28 if (const auto *BTE = dyn_cast<CXXBindTemporaryExpr>(E))
30 if (const auto *ICE = dyn_cast<ImplicitCastExpr>(E))
tools/clang/tools/extra/clang-tidy/android/CloexecCheck.cpp 89 const auto *ModeStr = dyn_cast<StringLiteral>(ModeArg->IgnoreParenCasts());
tools/clang/tools/extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp 195 const auto *Previous = dyn_cast<CXXMethodDecl>(D);
214 if (const auto *Method = dyn_cast<CXXMethodDecl>(Func)) {
331 if (const auto *Call = dyn_cast<CallExpr>(E)) {
tools/clang/tools/extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp 31 if (const auto *Op = dyn_cast<UnaryOperator>(E)) {
37 if (const auto *Op = dyn_cast<BinaryOperator>(E)) {
41 if (const auto *OpCallExpr = dyn_cast<CXXOperatorCallExpr>(E)) {
54 if (const auto *CExpr = dyn_cast<CallExpr>(E)) {
60 else if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl))
tools/clang/tools/extra/clang-tidy/bugprone/BranchCloneCheck.cpp 104 Cur = dyn_cast<IfStmt>(Else);
tools/clang/tools/extra/clang-tidy/bugprone/CopyConstructorInitCheck.cpp 56 if (const auto *TempSpecTy = dyn_cast<TemplateSpecializationType>(BaseType))
76 const auto *CExpr = dyn_cast<CXXConstructExpr>(Init->getInit());
tools/clang/tools/extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp 96 const auto *FuncForParam = dyn_cast<FunctionDecl>(ParmVar->getDeclContext());
tools/clang/tools/extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp 29 if (const auto *DRE = dyn_cast<DeclRefExpr>(S))
37 if (const auto *DS = dyn_cast<DeclStmt>(S)) {
39 if (const auto *LeftVar = dyn_cast<VarDecl>(D)) {
45 } else if (const auto *UnOp = dyn_cast<UnaryOperator>(S)) {
78 if (const auto *ForLoop = dyn_cast<ForStmt>(LoopStmt))
95 if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
96 if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl())) {
137 if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
138 if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl()))
tools/clang/tools/extra/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp 59 if (const auto *Bop = dyn_cast<BinaryOperator>(E)) {
82 } else if (const auto *Uop = dyn_cast<UnaryOperator>(E)) {
89 } else if (const auto *I = dyn_cast<IntegerLiteral>(E)) {
212 dyn_cast<BuiltinType>(CastType->getUnqualifiedDesugaredType());
214 dyn_cast<BuiltinType>(CalcType->getUnqualifiedDesugaredType());
tools/clang/tools/extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp 106 const auto *FuncForParam = dyn_cast<FunctionDecl>(ParmVar->getDeclContext());
tools/clang/tools/extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp 70 if (const auto *LengthDRE = dyn_cast<DeclRefExpr>(E))
71 if (const auto *LengthVD = dyn_cast<VarDecl>(LengthDRE->getDecl()))
77 if (const auto *LengthIL = dyn_cast<IntegerLiteral>(E))
80 if (const auto *StrDRE = dyn_cast<DeclRefExpr>(E))
81 if (const auto *StrVD = dyn_cast<VarDecl>(StrDRE->getDecl()))
84 dyn_cast<StringLiteral>(StrInit->IgnoreImpCasts()))
87 if (const auto *SrcSL = dyn_cast<StringLiteral>(E))
234 if (dyn_cast<BinaryOperator>(LengthExpr->IgnoreParenImpCasts()))
240 dyn_cast<DeclRefExpr>(StrlenCE->getArg(0)->IgnoreImpCasts()))
242 return dyn_cast<VarDecl>(ArgDRE->getDecl()) == SrcVD;
309 if (const auto *LengthIL = dyn_cast<IntegerLiteral>(LengthExpr)) {
324 const auto *BO = dyn_cast<BinaryOperator>(LengthExpr);
330 if (const auto *LhsIL = dyn_cast<IntegerLiteral>(LhsExpr)) {
339 if (const auto *RhsIL = dyn_cast<IntegerLiteral>(RhsExpr)) {
916 if (const auto GivenCL = dyn_cast<CharacterLiteral>(FunctionExpr->getArg(1)))
tools/clang/tools/extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp 35 if (const auto *CE = dyn_cast<CastExpr>(E)) {
38 } else if (const auto *UE = dyn_cast<UnaryOperator>(E)) {
41 } else if (const auto *BE = dyn_cast<BinaryOperator>(E)) {
tools/clang/tools/extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp 57 if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) {
72 if (const auto *CondOp = dyn_cast<AbstractConditionalOperator>(E))
158 if (const auto *Literal = dyn_cast<IntegerLiteral>(Argument)) {
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp 156 const auto *EnumExpr = dyn_cast<DeclRefExpr>(NodeExpr);
158 EnumExpr ? dyn_cast<EnumConstantDecl>(EnumExpr->getDecl()) : nullptr;
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp 111 if (const auto *Literal = dyn_cast<StringLiteral>(Child)) {
tools/clang/tools/extra/clang-tidy/bugprone/SwappedArgumentsCheck.cpp 29 if (auto *Cast = dyn_cast<CastExpr>(E))
63 const auto *LHSCast = dyn_cast<ImplicitCastExpr>(ignoreNoOpCasts(LHS));
64 const auto *RHSCast = dyn_cast<ImplicitCastExpr>(ignoreNoOpCasts(RHS));
tools/clang/tools/extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp 115 if (const auto *BinOperator = dyn_cast<BinaryOperator>(UpperBound)) {
tools/clang/tools/extra/clang-tidy/bugprone/UndelegatedConstructorCheck.cpp 25 if (const auto *EWC = dyn_cast<ExprWithCleanups>(E))
28 else if (const auto *BTE = dyn_cast<CXXBindTemporaryExpr>(E))
31 else if (const auto *FCE = dyn_cast<CXXFunctionalCastExpr>(E))
tools/clang/tools/extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp 71 if (const auto *TOE = dyn_cast<CXXTemporaryObjectExpr>(BTE->getSubExpr()))
tools/clang/tools/extra/clang-tidy/cert/PostfixOperatorCheck.cpp 35 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl))
tools/clang/tools/extra/clang-tidy/cert/StrToNumCheck.cpp 205 if (const auto *SL = dyn_cast<StringLiteral>(Arg)) {
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp 379 if (const auto *CO = llvm::dyn_cast<ConditionalOperator>(&Rhs)) {
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp 78 if (const auto *ArraySubscriptE = dyn_cast<ArraySubscriptExpr>(Matched))
82 dyn_cast<CXXOperatorCallExpr>(Matched)->getArg(0)->getSourceRange();
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp 194 if (const auto *D = dyn_cast<T>(*Decl)) {
206 if (const auto *D = dyn_cast<T>(*Decl)) {
352 dyn_cast<BuiltinType>(QT.getCanonicalType().getTypePtr());
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp 32 const auto *FDecl = dyn_cast<FunctionDecl>(C->getCalleeDecl());
41 dyn_cast<IntegerLiteral>(C->getArg(N)->IgnoreParenImpCasts());
tools/clang/tools/extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.cpp 40 if (const auto *PD = dyn_cast<ParmVarDecl>(VD)) {
tools/clang/tools/extra/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp 19 if (const auto *CXXMethodNode = dyn_cast<CXXMethodDecl>(&Node)) {
tools/clang/tools/extra/clang-tidy/google/ExplicitConstructorCheck.cpp 81 dyn_cast<ClassTemplateSpecializationDecl>(RT->getDecl()))
tools/clang/tools/extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp 62 if (const auto *UsingDirective = dyn_cast<UsingDirectiveDecl>(D)) {
tools/clang/tools/extra/clang-tidy/google/NonConstReferences.cpp 61 if (const auto *Method = dyn_cast<CXXMethodDecl>(Function)) {
tools/clang/tools/extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp 42 if (const auto *Namespace = dyn_cast<NamespaceDecl>(Context))
tools/clang/tools/extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp 102 if (const auto *FD = dyn_cast<FunctionDecl>(ND)) {
114 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
117 if (const auto *RD = dyn_cast<CXXRecordDecl>(DC)) {
136 } else if (const auto *VD = dyn_cast<VarDecl>(ND)) {
tools/clang/tools/extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp 159 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD))
197 const auto *MD = dyn_cast<CXXMethodDecl>(Overload);
tools/clang/tools/extra/clang-tidy/misc/RedundantExpressionCheck.cpp 73 if (!areEquivalentExpr(dyn_cast<Expr>(*LeftIter),
74 dyn_cast<Expr>(*RightIter)))
552 const auto *LhsBinOp = dyn_cast<BinaryOperator>(BinOp->getLHS());
553 const auto *RhsBinOp = dyn_cast<BinaryOperator>(BinOp->getRHS());
tools/clang/tools/extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp 57 if (auto *varDecl = dyn_cast<VarDecl>(valueDecl))
82 auto *declRef = dyn_cast<DeclRefExpr>(inner);
105 const auto *variableReference = dyn_cast<DeclRefExpr>(currentSubExpr);
106 const auto *constructorCall = dyn_cast<CXXConstructExpr>(currentSubExpr);
122 if (auto *tmp = dyn_cast<DeclRefExpr>(currentSubExpr))
tools/clang/tools/extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp 78 dyn_cast<ClassTemplateSpecializationDecl>(LeftDeleter);
80 dyn_cast<ClassTemplateSpecializationDecl>(RightDeleter);
tools/clang/tools/extra/clang-tidy/misc/UnusedParametersCheck.cpp 25 if (const auto *MD = dyn_cast<CXXMethodDecl>(Function))
91 if (const auto *Fn = dyn_cast<FunctionDecl>(DeclRef->getDecl())) {
103 dyn_cast<DeclRefExpr>(Call->getCallee()->IgnoreImplicit())) {
174 if (const auto *Method = dyn_cast<CXXMethodDecl>(Function))
tools/clang/tools/extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp 110 if (const auto *FD = dyn_cast<FunctionDecl>(Used)) {
113 dyn_cast<ClassTemplateSpecializationDecl>(Used)) {
115 } else if (const auto *FD = dyn_cast<FunctionDecl>(Used)) {
118 } else if (const auto *ECD = dyn_cast<EnumConstantDecl>(Used)) {
150 if (const auto *USD = dyn_cast<UsingShadowDecl>(ND))
tools/clang/tools/extra/clang-tidy/modernize/AvoidBindCheck.cpp 55 if (const auto *M = dyn_cast<MaterializeTemporaryExpr>(E)) {
tools/clang/tools/extra/clang-tidy/modernize/AvoidCArraysCheck.cpp 35 const auto *FD = llvm::dyn_cast<clang::FunctionDecl>(DC);
tools/clang/tools/extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp 34 const auto *ChildNamespace = dyn_cast<const NamespaceDecl>(*Decls.begin());
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp 312 const auto *Member = dyn_cast<MemberExpr>(TheCall->getCallee());
375 return dyn_cast<VarDecl>(DRE->getDecl());
376 if (const auto *Mem = dyn_cast<MemberExpr>(E->IgnoreParenImpCasts()))
377 return dyn_cast<FieldDecl>(Mem->getMemberDecl());
384 if (const auto *Member = dyn_cast<MemberExpr>(E->IgnoreParenImpCasts()))
802 if (!EndCall || !dyn_cast<MemberExpr>(EndCall->getCallee()))
855 dyn_cast<MemberExpr>(EndCall->getCallee())->isArrow();
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertUtils.cpp 54 if (const auto *V = dyn_cast<VarDecl>(decl))
128 if (auto *D = dyn_cast<NamedDecl>(DeclRef->getDecl()))
172 if (const auto *ConstructExpr = dyn_cast<CXXConstructExpr>(E)) {
179 if (const auto *Temp = dyn_cast<MaterializeTemporaryExpr>(E))
199 return dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts());
220 if (const auto *Uop = dyn_cast<UnaryOperator>(E))
223 if (const auto *OpCall = dyn_cast<CXXOperatorCallExpr>(E)) {
351 const auto *VDecl = dyn_cast<VarDecl>(TheDecl);
545 dyn_cast<CXXOperatorCallExpr>(Base->IgnoreParenImpCasts())) {
601 dyn_cast<MemberExpr>(MemberCall->getCallee()->IgnoreParenImpCasts());
tools/clang/tools/extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp 301 if (const auto *CEArg = dyn_cast<CXXConstructExpr>(Arg)) {
308 dyn_cast<CXXConstructExpr>(TempExp->IgnoreImplicit()))
tools/clang/tools/extra/clang-tidy/modernize/PassByValueCheck.cpp 88 if (const ParmVarDecl *To = dyn_cast<ParmVarDecl>(D->getDecl())) {
tools/clang/tools/extra/clang-tidy/modernize/ReturnBracedInitListCheck.cpp 77 if (const auto *VD = dyn_cast<VarDecl>(
tools/clang/tools/extra/clang-tidy/modernize/ShrinkToFitCheck.cpp 64 if (const auto *UnaryOp = llvm::dyn_cast<UnaryOperator>(Container)) {
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp 80 if (const auto *Construct = dyn_cast<CXXConstructExpr>(Init)) {
341 if (const auto *E = dyn_cast<ExprWithCleanups>(ExprInit))
344 const auto *Construct = dyn_cast<CXXConstructExpr>(ExprInit);
361 if (const auto *NestedConstruct = dyn_cast<CXXConstructExpr>(E)) {
389 const auto *FirstDecl = dyn_cast<VarDecl>(*D->decl_begin());
tools/clang/tools/extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp 131 auto *UnaryOp = dyn_cast<UnaryOperator>(E);
138 auto *InitList = dyn_cast<InitListExpr>(E);
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp 261 const auto *Body = dyn_cast<CompoundStmt>(SpecialFunctionDecl->getBody());
275 if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(SpecialFunctionDecl)) {
tools/clang/tools/extra/clang-tidy/modernize/UseNullptrCheck.cpp 28 if (const auto *BT = dyn_cast<BuiltinType>(DesugaredType))
131 const ImplicitCastExpr *Cast = dyn_cast<ImplicitCastExpr>(S);
191 auto *C = dyn_cast<CastExpr>(S);
193 if (auto *E = dyn_cast<CXXDefaultArgExpr>(S)) {
194 C = dyn_cast<CastExpr>(E->getExpr());
tools/clang/tools/extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp 323 const auto *M = dyn_cast<CXXMethodDecl>(&F);
tools/clang/tools/extra/clang-tidy/objc/PropertyDeclarationCheck.cpp 117 auto *CategoryDecl = llvm::dyn_cast<ObjCCategoryDecl>(DeclContext);
tools/clang/tools/extra/clang-tidy/performance/ImplicitConversionInLoopCheck.cpp 28 if (const auto *ICE = dyn_cast<ImplicitCastExpr>(ST)) {
70 if (const auto *Cleanup = dyn_cast<ExprWithCleanups>(Init))
73 const auto *Materialized = dyn_cast<MaterializeTemporaryExpr>(Init);
tools/clang/tools/extra/clang-tidy/performance/MoveConstArgCheck.cpp 97 IsVariable ? dyn_cast<DeclRefExpr>(Arg)->getDecl() : nullptr;
tools/clang/tools/extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp 37 if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(Decl)) {
tools/clang/tools/extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp 24 if (const auto *BT = dyn_cast<BuiltinType>(&Node)) {
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp 58 if (const auto *Method = llvm::dyn_cast<CXXMethodDecl>(&Function))
152 const auto *Method = llvm::dyn_cast<CXXMethodDecl>(Function);
tools/clang/tools/extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp 139 if (const auto *Literal = llvm::dyn_cast<IntegerLiteral>(
146 llvm::dyn_cast<IntegerLiteral>(BinaryOp->getLHS()->IgnoreImpCasts())
215 if (const auto *CTS = dyn_cast<ClassTemplateSpecializationDecl>(Container)) {
tools/clang/tools/extra/clang-tidy/readability/IdentifierNamingCheck.cpp 410 if (const auto *Decl = dyn_cast<NamespaceDecl>(D)) {
434 if (const auto *Decl = dyn_cast<CXXRecordDecl>(D)) {
466 if (const auto *Decl = dyn_cast<FieldDecl>(D)) {
492 if (const auto *Decl = dyn_cast<ParmVarDecl>(D)) {
521 if (const auto *Decl = dyn_cast<VarDecl>(D)) {
580 if (const auto *Decl = dyn_cast<CXXMethodDecl>(D)) {
624 if (const auto *Decl = dyn_cast<FunctionDecl>(D)) {
769 if (const auto *ClassDecl = dyn_cast<TemplateDecl>(Decl)) {
tools/clang/tools/extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp 62 const auto *UnaryOperatorExpr = dyn_cast<UnaryOperator>(Statement);
84 if (const auto *OperatorCall = dyn_cast<CXXOperatorCallExpr>(Statement)) {
157 if (const auto *IntLit = dyn_cast<IntegerLiteral>(Expression)) {
161 if (const auto *FloatLit = dyn_cast<FloatingLiteral>(Expression)) {
167 if (const auto *CharLit = dyn_cast<CharacterLiteral>(Expression)) {
384 dyn_cast<CXXBoolLiteralExpr>(Cast->getSubExpr())) {
tools/clang/tools/extra/clang-tidy/readability/IsolateDeclarationCheck.cpp 70 if (const auto *AT = dyn_cast<ArrayType>(T))
127 const auto *FirstDecl = dyn_cast<VarDecl>(*DS->decl_begin());
tools/clang/tools/extra/clang-tidy/readability/MisleadingIndentationCheck.cpp 64 if (const auto *CurrentIf = dyn_cast<IfStmt>(CurrentStmt)) {
68 } else if (const auto *CurrentFor = dyn_cast<ForStmt>(CurrentStmt)) {
71 } else if (const auto *CurrentWhile = dyn_cast<WhileStmt>(CurrentStmt)) {
tools/clang/tools/extra/clang-tidy/readability/NamedParameterCheck.cpp 97 const auto *M = dyn_cast<CXXMethodDecl>(P.first);
tools/clang/tools/extra/clang-tidy/readability/NonConstParameterCheck.cpp 43 if (const auto *M = dyn_cast<CXXMethodDecl>(D)) {
58 if (const auto *B = dyn_cast<BinaryOperator>(S)) {
61 } else if (const auto *CE = dyn_cast<CallExpr>(S)) {
83 } else if (const auto *CE = dyn_cast<CXXConstructExpr>(S)) {
87 } else if (const auto *R = dyn_cast<ReturnStmt>(S)) {
89 } else if (const auto *U = dyn_cast<UnaryOperator>(S)) {
118 auto It = Parameters.find(dyn_cast<ParmVarDecl>(Ref->getDecl()));
160 if (const auto *Cast = dyn_cast<ImplicitCastExpr>(E)) {
169 if (const auto *B = dyn_cast<BinaryOperator>(E)) {
182 } else if (const auto *C = dyn_cast<ConditionalOperator>(E)) {
185 } else if (const auto *U = dyn_cast<UnaryOperator>(E)) {
189 dyn_cast<UnaryOperator>(U->getSubExpr()->IgnoreParenCasts()))
198 } else if (const auto *A = dyn_cast<ArraySubscriptExpr>(E)) {
200 } else if (const auto *CLE = dyn_cast<CompoundLiteralExpr>(E)) {
202 } else if (const auto *Constr = dyn_cast<CXXConstructExpr>(E)) {
204 if (const auto *M = dyn_cast<MaterializeTemporaryExpr>(Arg))
207 } else if (const auto *ILE = dyn_cast<InitListExpr>(E)) {
212 if (const auto *D = dyn_cast<DeclRefExpr>(E)) {
213 auto It = Parameters.find(dyn_cast<ParmVarDecl>(D->getDecl()));
tools/clang/tools/extra/clang-tidy/readability/RedundantControlFlowCheck.cpp 59 if (const auto *Return = dyn_cast<ReturnStmt>(*last))
67 if (const auto *Continue = dyn_cast<ContinueStmt>(*last))
83 dyn_cast<Stmt>(*Previous)->getEndLoc(), tok::semi, SM, getLangOpts(),
tools/clang/tools/extra/clang-tidy/readability/RedundantDeclarationCheck.cpp 64 if (const auto *VD = dyn_cast<VarDecl>(D)) {
tools/clang/tools/extra/clang-tidy/readability/RedundantStringCStrCheck.cpp 33 if (const auto *Op = dyn_cast<CXXOperatorCallExpr>(&ExprNode)) {
46 if (const auto *Op = dyn_cast<clang::UnaryOperator>(&ExprNode)) {
tools/clang/tools/extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp 80 if (const auto *Op = dyn_cast<CXXOperatorCallExpr>(E))
138 if (const auto *ImpCast = dyn_cast<ImplicitCastExpr>(E))
146 if (const auto *ImpCast = dyn_cast<ImplicitCastExpr>(E))
153 if (const auto *ImpCast = dyn_cast<ImplicitCastExpr>(E)) {
157 dyn_cast<CXXMemberCallExpr>(ImpCast->getSubExpr())) {
159 dyn_cast<CXXConversionDecl>(MemCall->getMethodDecl())) {
197 if (const auto *EC = dyn_cast<ExprWithCleanups>(E))
202 if (const auto *UnOp = dyn_cast<UnaryOperator>(E)) {
223 if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) {
227 } else if (const auto *OpExpr = dyn_cast<CXXOperatorCallExpr>(E)) {
253 if (const auto *UnOp = dyn_cast<UnaryOperator>(E)) {
273 if (const auto *Bool = dyn_cast<CXXBoolLiteralExpr>(Ret->getRetValue())) {
285 if (const auto *Ret = dyn_cast<ReturnStmt>(IfRet->getThen()))
288 if (const auto *Compound = dyn_cast<CompoundStmt>(IfRet->getThen())) {
290 if (const auto *CompoundRet = dyn_cast<ReturnStmt>(Compound->body_back()))
350 if (const auto *BinOp = dyn_cast<BinaryOperator>(E))
353 if (const auto *UnaryOp = dyn_cast<UnaryOperator>(E))
365 if ((Bool = dyn_cast<CXXBoolLiteralExpr>(LHS)))
367 else if ((Bool = dyn_cast<CXXBoolLiteralExpr>(RHS)))
629 if (const auto *If = dyn_cast<IfStmt>(*Current)) {
tools/clang/tools/extra/clang-tidy/utils/ASTUtils.cpp 35 clang::dyn_cast<clang::CXXOperatorCallExpr>(E_base)) {
58 if (const auto *BO = dyn_cast<BinaryOperator>(Flags))
tools/clang/tools/extra/clang-tidy/utils/ExceptionAnalyzer.cpp 143 if (const auto *Throw = dyn_cast<CXXThrowExpr>(St)) {
158 } else if (const auto *Try = dyn_cast<CXXTryStmt>(St)) {
193 } else if (const auto *Call = dyn_cast<CallExpr>(St)) {
tools/clang/tools/extra/clang-tidy/utils/ExprSequence.cpp 107 if (const auto *BO = dyn_cast<BinaryOperator>(Parent)) {
111 } else if (const auto *InitList = dyn_cast<InitListExpr>(Parent)) {
118 } else if (const auto *Compound = dyn_cast<CompoundStmt>(Parent)) {
127 } else if (const auto *TheDeclStmt = dyn_cast<DeclStmt>(Parent)) {
132 if (const auto *TheVarDecl = dyn_cast<VarDecl>(TheDecl)) {
140 } else if (const auto *ForRange = dyn_cast<CXXForRangeStmt>(Parent)) {
146 } else if (const auto *TheIfStmt = dyn_cast<IfStmt>(Parent)) {
159 } else if (const auto *TheSwitchStmt = dyn_cast<SwitchStmt>(Parent)) {
168 } else if (const auto *TheWhileStmt = dyn_cast<WhileStmt>(Parent)) {
tools/clang/tools/extra/clang-tidy/utils/TypeTraits.cpp 53 const auto *ClassDecl = dyn_cast<CXXRecordDecl>(&RecordDecl);
tools/clang/tools/extra/clangd/AST.cpp 34 if (auto *Func = llvm::dyn_cast<FunctionDecl>(&ND)) {
39 llvm::dyn_cast<ClassTemplatePartialSpecializationDecl>(&ND)) {
43 llvm::dyn_cast<VarTemplatePartialSpecializationDecl>(&ND)) {
46 } else if (auto *Var = llvm::dyn_cast<VarTemplateSpecializationDecl>(&ND))
56 if (const auto *TD = dyn_cast<T>(D))
107 if (auto *V = llvm::dyn_cast<DeclaratorDecl>(&ND))
109 if (auto *T = llvm::dyn_cast<TagDecl>(&ND))
132 if (auto *UD = llvm::dyn_cast<UsingDirectiveDecl>(&ND)) {
144 if (auto *Cls = llvm::dyn_cast<RecordDecl>(&ND))
169 } else if (auto *Cls = llvm::dyn_cast<ClassTemplateSpecializationDecl>(&ND)) {
193 if (const auto *NS = dyn_cast<NamespaceDecl>(Ctx))
tools/clang/tools/extra/clangd/CodeComplete.cpp 269 if (const auto *ND = dyn_cast<NamedDecl>(D))
1794 if (const auto *EnumDecl = dyn_cast<clang::EnumDecl>(ND.getDeclContext()))
tools/clang/tools/extra/clangd/ExpectedTypes.cpp 50 if (auto *Template = dyn_cast<TemplateDecl>(D))
52 auto *VD = dyn_cast<ValueDecl>(D);
tools/clang/tools/extra/clangd/FindSymbols.cpp 196 if (auto *Templ = llvm::dyn_cast<TemplateDecl>(D))
198 auto *ND = llvm::dyn_cast<NamedDecl>(D);
213 auto *Scope = llvm::dyn_cast<DeclContext>(D);
224 if (auto Func = llvm::dyn_cast<FunctionDecl>(D)) {
243 if (auto *TemplSpec = llvm::dyn_cast<ClassTemplateSpecializationDecl>(D)) {
250 if (auto *TemplSpec = llvm::dyn_cast<VarTemplateSpecializationDecl>(D)) {
tools/clang/tools/extra/clangd/FindTarget.cpp 92 if (const CXXRecordDecl *CRD = dyn_cast<CXXRecordDecl>(D)) {
94 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
96 } else if (auto *VD = dyn_cast<VarDecl>(D)) {
100 } else if (const auto *ED = dyn_cast<EnumDecl>(D)) {
109 } else if (const auto *ECD = dyn_cast<EnumConstantDecl>(D)) {
110 if (const auto *ED = dyn_cast<EnumDecl>(ECD->getDeclContext())) {
136 if (const UsingDirectiveDecl *UDD = llvm::dyn_cast<UsingDirectiveDecl>(D))
139 if (const TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(D)) {
142 } else if (const UsingDecl *UD = dyn_cast<UsingDecl>(D)) {
146 } else if (const auto *NAD = dyn_cast<NamespaceAliasDecl>(D)) {
149 } else if (const UsingShadowDecl *USD = dyn_cast<UsingShadowDecl>(D)) {
182 if (auto *USD = llvm::dyn_cast<UsingShadowDecl>(DRE->getFoundDecl()))
189 llvm::dyn_cast<UsingShadowDecl>(ME->getFoundDecl().getDecl()))
tools/clang/tools/extra/clangd/HeaderSourceSwitch.cpp 129 auto *ND = llvm::dyn_cast<NamedDecl>(D);
138 if (auto *Scope = llvm::dyn_cast<DeclContext>(ND)) {
tools/clang/tools/extra/clangd/ParsedAST.cpp 75 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/tools/extra/clangd/Quality.cpp 63 if (const auto *FD = dyn_cast<FunctionDecl>(&ND)) {
162 if (const auto *TP = dyn_cast<FunctionTemplateDecl>(ND))
164 if (const auto *CM = dyn_cast<CXXMethodDecl>(ND))
tools/clang/tools/extra/clangd/Selection.cpp 217 if (auto *CTI = llvm::dyn_cast<CXXThisExpr>(X))
372 if (auto *FD = llvm::dyn_cast<FunctionDecl>(D))
375 else if (auto *VD = llvm::dyn_cast<VarDecl>(D))
520 if (auto *DC = dyn_cast<DeclContext>(Current))
tools/clang/tools/extra/clangd/SemanticHighlighting.cpp 40 if (auto *TD = dyn_cast<TemplateDecl>(D)) {
44 if (auto *TD = dyn_cast<TypedefNameDecl>(D)) {
54 if (auto *RD = llvm::dyn_cast<RecordDecl>(D)) {
63 if (auto *MD = dyn_cast<CXXMethodDecl>(D))
74 if (auto *VD = dyn_cast<VarDecl>(D))
96 if (auto *TD = dyn_cast<TemplateTypeParmType>(TP))
tools/clang/tools/extra/clangd/XRefs.cpp 63 if (const auto *TD = dyn_cast<TagDecl>(D))
65 if (const auto *VD = dyn_cast<VarDecl>(D))
67 if (const auto *FD = dyn_cast<FunctionDecl>(D))
173 if (const auto *CtorExpr = dyn_cast<CXXConstructExpr>(E))
176 if (const auto *ME = dyn_cast<MemberExpr>(E)) {
297 if (auto *ND = dyn_cast<NamedDecl>(D))
462 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
466 if (auto RD = dyn_cast<RecordDecl>(D))
471 if (const TypeDecl *TD = dyn_cast<TypeDecl>(DC))
473 else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(DC))
486 if (const TypeDecl *TD = dyn_cast<TypeDecl>(DC))
488 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(DC))
490 if (const NamedDecl *ND = dyn_cast<NamedDecl>(DC))
525 if (const auto TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
534 } else if (const auto NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
548 } else if (const auto TTPD = dyn_cast<TemplateTemplateParmDecl>(Param)) {
572 if (const VarDecl *VD = llvm::dyn_cast<VarDecl>(D)) {
624 if (const NamedDecl *ND = llvm::dyn_cast<NamedDecl>(D)) {
679 if (const VarDecl *VD = llvm::dyn_cast<VarDecl>(D))
685 } else if (const auto *VD = dyn_cast<ValueDecl>(D)) {
694 if (const auto *Var = dyn_cast<VarDecl>(D)) {
804 if (CurLoc.isInvalid() && dyn_cast<CXXConversionDecl>(D))
841 const DecltypeType *DT = dyn_cast<DecltypeType>(TL.getTypePtr());
845 DT = dyn_cast<DecltypeType>(DeducedType.getTypePtr());
994 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
1167 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
1172 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
1181 return dyn_cast<CXXRecordDecl>(D);
1202 ParentDecl = dyn_cast<CXXRecordDecl>(TD->getTemplatedDecl());
tools/clang/tools/extra/clangd/index/SymbolCollector.cpp 271 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
323 auto *OriginalDecl = dyn_cast<NamedDecl>(ASTNode.OrigD);
422 if (!dyn_cast<TagDecl>(&ND))
tools/clang/tools/extra/clangd/refactor/Rename.cpp 77 if (const auto *FD = llvm::dyn_cast<FunctionDecl>(&RenameDecl)) {
tools/clang/tools/extra/clangd/refactor/tweaks/DefineInline.cpp 106 if (const auto *MD = llvm::dyn_cast<CXXMethodDecl>(Target))
128 if (const auto *MD = llvm::dyn_cast<CXXMethodDecl>(D))
130 else if (const auto *FD = llvm::dyn_cast<FieldDecl>(D))
295 if (auto *MD = llvm::dyn_cast<CXXMethodDecl>(Source)) {
tools/clang/tools/extra/clangd/refactor/tweaks/DumpAST.cpp 113 Record = dyn_cast<RecordDecl>(D);
tools/clang/tools/extra/clangd/refactor/tweaks/ExtractVariable.cpp 82 Visitor.TraverseStmt(const_cast<Stmt *>(dyn_cast<Stmt>(Expr)));
348 if (const auto* WS = llvm::dyn_cast<WhileStmt>(Outer))
350 if (const auto* DS = llvm::dyn_cast<DoStmt>(Outer))
352 if (const auto* FS = llvm::dyn_cast<ForStmt>(Outer))
354 if (const auto* FS = llvm::dyn_cast<CXXForRangeStmt>(Outer))
356 if (const auto* IS = llvm::dyn_cast<IfStmt>(Outer))
tools/clang/tools/extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp 111 if (!dyn_cast<Decl>(TargetDirective->getDeclContext()))
tools/clang/tools/extra/clangd/unittests/FindTargetTests.cpp 531 if (auto *T = llvm::dyn_cast<FunctionTemplateDecl>(TestDecl))
tools/clang/tools/extra/clangd/unittests/HeaderSourceSwitchTests.cpp 77 if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
tools/clang/tools/extra/clangd/unittests/ParsedASTTests.cpp 39 if (NamedDecl *ND = dyn_cast<NamedDecl>(arg))
52 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(arg)) {
69 if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
tools/clang/tools/extra/clangd/unittests/QualityTests.cpp 141 *dyn_cast<UsingDecl>(&findDecl(AST, [&](const NamedDecl &ND) {
142 if (const UsingDecl *Using = dyn_cast<UsingDecl>(&ND))
459 if (const auto *OD = dyn_cast<FunctionDecl>(&ND))
tools/clang/tools/extra/clangd/unittests/SelectionTests.cpp 332 auto *D = dyn_cast<CXXRecordDecl>(T.commonAncestor()->ASTNode.get<Decl>());
tools/clang/tools/extra/clangd/unittests/TraceTests.cpp 36 auto *M = llvm::dyn_cast<llvm::yaml::MappingNode>(&N);
tools/clang/tools/extra/clangd/unittests/TypeHierarchyTests.cpp 151 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent"));
153 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Child1"));
155 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Child2"));
187 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent1"));
189 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent2"));
191 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent3"));
192 const CXXRecordDecl *Child = dyn_cast<CXXRecordDecl>(&findDecl(AST, "Child"));
214 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent"));
216 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Child"))->getTemplatedDecl();
223 dyn_cast<ClassTemplateSpecializationDecl>(arg);
264 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Parent"))->getTemplatedDecl();
266 dyn_cast<CXXRecordDecl>(&findDeclWithTemplateArgs(AST, "Parent<int>"));
268 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Child1"));
270 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Child2"));
293 dyn_cast<CXXRecordDecl>(&findDecl(AST, "Parent"));
295 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Child"))->getTemplatedDecl();
297 dyn_cast<CXXRecordDecl>(&findDeclWithTemplateArgs(AST, "Child<int>"));
324 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Parent"))->getTemplatedDecl();
326 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Child1"))->getTemplatedDecl();
328 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Child2"))->getTemplatedDecl();
330 dyn_cast<ClassTemplateDecl>(&findDecl(AST, "Child3"))->getTemplatedDecl();
tools/clang/tools/extra/clangd/unittests/XRefsTests.cpp 2276 llvm::dyn_cast<FunctionDecl>(&findDecl(AST, [SL](const NamedDecl &ND) {
2284 if (const auto *ND = llvm::dyn_cast<NamedDecl>(D))
tools/clang/tools/extra/unittests/clang-doc/SerializeTest.cpp 52 if (dyn_cast<CXXMethodDecl>(D))
tools/clang/tools/libclang/CIndex.cpp 346 CurDC = dyn_cast<DeclContext>(D);
348 if (TagDecl *TD = dyn_cast<TagDecl>(D))
458 if (MacroExpansion *ME = dyn_cast<MacroExpansion>(PPE)) {
465 if (MacroDefinitionRecord *MD = dyn_cast<MacroDefinitionRecord>(PPE)) {
472 if (InclusionDirective *ID = dyn_cast<InclusionDirective>(PPE)) {
648 if (auto *ivarD = dyn_cast<ObjCIvarDecl>(D)) {
793 if (const FunctionProtoType *FT = dyn_cast<FunctionProtoType>(AFT))
853 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(ND)) {
1105 ObjCCategoryDecl *CDecl = dyn_cast<ObjCCategoryDecl>(PD->getDeclContext());
1344 if (const TypedefType *Typedef = dyn_cast<TypedefType>(T))
1346 if (const TagType *Tag = dyn_cast<TagType>(T))
1349 = dyn_cast<TemplateSpecializationType>(T))
2644 if (auto *SubME = dyn_cast<MemberExpr>(M->getBase())) {
3842 const ImplicitCastExpr *I = dyn_cast<ImplicitCastExpr>(expr);
3848 ObjCExpr = dyn_cast<ObjCStringLiteral>(subExpr);
3869 ObjCExpr = dyn_cast<ObjCStringLiteral>(expr);
3950 if (auto *Var = dyn_cast<VarDecl>(D))
3952 else if (auto *Field = dyn_cast<FieldDecl>(D))
3960 if (const auto *E = dyn_cast<Expr>(bodyIterator))
4333 if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E))
4336 if (const DeclRefExpr *RefExpr = dyn_cast<DeclRefExpr>(E))
4338 if (const MemberExpr *ME = dyn_cast<MemberExpr>(E))
4340 if (const ObjCIvarRefExpr *RE = dyn_cast<ObjCIvarRefExpr>(E))
4342 if (const ObjCPropertyRefExpr *PRE = dyn_cast<ObjCPropertyRefExpr>(E)) {
4353 if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E))
4355 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E))
4359 if (const CallExpr *CE = dyn_cast<CallExpr>(E))
4361 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(E))
4365 dyn_cast<CXXInheritedCtorInitExpr>(E))
4367 if (const ObjCMessageExpr *OME = dyn_cast<ObjCMessageExpr>(E))
4370 if (const ObjCProtocolExpr *PE = dyn_cast<ObjCProtocolExpr>(E))
4373 = dyn_cast<SubstNonTypeTemplateParmPackExpr>(E))
4375 if (const SizeOfPackExpr *SizeOfPack = dyn_cast<SizeOfPackExpr>(E))
4384 if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E))
4387 if (const ObjCMessageExpr *Msg = dyn_cast<ObjCMessageExpr>(E))
4389 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
4391 if (const MemberExpr *Member = dyn_cast<MemberExpr>(E))
4393 if (const ObjCIvarRefExpr *Ivar = dyn_cast<ObjCIvarRefExpr>(E))
4395 if (const SizeOfPackExpr *SizeOfPack = dyn_cast<SizeOfPackExpr>(E))
4397 if (const ObjCPropertyRefExpr *PropRef = dyn_cast<ObjCPropertyRefExpr>(E))
4454 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
4457 dyn_cast<ObjCPropertyImplDecl>(D))
4461 if (const ImportDecl *ImportD = dyn_cast<ImportDecl>(D))
4468 if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(ND))
4471 if (const ObjCCategoryImplDecl *CIMP = dyn_cast<ObjCCategoryImplDecl>(ND))
4548 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
4579 if (const ObjCStringLiteral *OSL = dyn_cast<ObjCStringLiteral>(E)) {
4983 if (const FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D))
4986 if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
5008 if (const ClassTemplateDecl *ClassTemplate = dyn_cast<ClassTemplateDecl>(D)) {
5026 if (TemplateTypeParmDecl *TTP = dyn_cast<TemplateTypeParmDecl>(Param))
5029 = dyn_cast<NonTypeTemplateParmDecl>(Param))
5040 = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
5932 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
5938 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
6065 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
6087 if (const DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
6090 } else if (const TypedefDecl *Typedef = dyn_cast<TypedefDecl>(D)) {
6104 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
6132 if (const UsingDecl *Using = dyn_cast<UsingDecl>(D))
6135 dyn_cast<ObjCPropertyImplDecl>(D))
6394 = dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext()))
6469 if (const ObjCCategoryImplDecl *CatImplD = dyn_cast<ObjCCategoryImplDecl>(D))
6473 if (const ObjCImplDecl *ImplD = dyn_cast<ObjCImplDecl>(D))
6500 if (const UsingDecl *Using = dyn_cast<UsingDecl>(D))
6523 if (const UsingDecl *Using = dyn_cast<UsingDecl>(D)) {
6541 const FunctionDecl *FD = dyn_cast<FunctionDecl>(getCursorDecl(C));
6542 CompoundStmt *Body = dyn_cast<CompoundStmt>(FD->getBody());
6560 if (const MemberExpr *E = dyn_cast<MemberExpr>(getCursorExpr(C)))
6566 if (const DeclRefExpr *E = dyn_cast<DeclRefExpr>(getCursorExpr(C))) {
6576 dyn_cast<CXXOperatorCallExpr>(getCursorExpr(C))) {
6578 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Callee))
6581 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Callee))
6976 if (const auto *OCE = dyn_cast<CXXOperatorCallExpr>(E)) {
6997 if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Callee)) {
6999 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(SubExpr)) {
7790 if (const EnumConstantDecl *EnumConst = dyn_cast<EnumConstantDecl>(D))
7839 if (DeprecatedAttr *Deprecated = dyn_cast<DeprecatedAttr>(A)) {
7850 if (UnavailableAttr *Unavailable = dyn_cast<UnavailableAttr>(A)) {
7861 if (AvailabilityAttr *Avail = dyn_cast<AvailabilityAttr>(A)) {
7868 if (const EnumConstantDecl *EnumConst = dyn_cast<EnumConstantDecl>(D))
7984 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
8005 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
8009 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D))
8021 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
8023 } else if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
8098 const ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(getCursorDecl(C));
8127 const ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(getCursorDecl(C));
8139 const ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(getCursorDecl(C));
8153 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
8155 else if (const ParmVarDecl *PD = dyn_cast<ParmVarDecl>(D))
8176 if (const ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(D))
8178 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
8189 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
8191 if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
tools/clang/tools/libclang/CIndexCXX.cpp 91 if (const CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(D)) {
93 = dyn_cast<ClassTemplatePartialSpecializationDecl>(CXXRecord))
96 = dyn_cast<ClassTemplateSpecializationDecl>(CXXRecord)) {
107 } else if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
111 } else if (const VarDecl *Var = dyn_cast<VarDecl>(D)) {
115 = dyn_cast<RedeclarableTemplateDecl>(D))
tools/clang/tools/libclang/CIndexHigh.cpp 84 if (const ObjCImplDecl *ImplD = dyn_cast<ObjCImplDecl>(D)) {
89 dyn_cast<CXXConstructorDecl>(D)) {
tools/clang/tools/libclang/CXComment.cpp 110 if (const TextComment *TC = dyn_cast<TextComment>(C))
113 if (const ParagraphComment *PC = dyn_cast<ParagraphComment>(C))
tools/clang/tools/libclang/CXComment.h 48 return dyn_cast<T>(C);
tools/clang/tools/libclang/CXCursor.cpp 513 dyn_cast<ObjCMethodDecl>(IPD->getDeclContext())) {
1118 UnCtor = dyn_cast<CXXUnresolvedConstructExpr>(E)) {
1121 dyn_cast<CXXTemporaryObjectExpr>(E)){
1184 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
1187 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(E)) {
1211 if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
1218 if (const CXXConstructExpr *CE = dyn_cast<CXXConstructExpr>(E)) {
1567 if (const ObjCMessageExpr *MsgE = dyn_cast<ObjCMessageExpr>(E)) {
1570 if (auto *RecE = dyn_cast<ObjCMessageExpr>(
1578 if (auto *PropRefE = dyn_cast<ObjCPropertyRefExpr>(E)) {
1585 else if (const CallExpr *CE = dyn_cast<CallExpr>(E))
1608 if (auto *PropRefE = dyn_cast<ObjCPropertyRefExpr>(E)) {
1616 else if (const CallExpr *CE = dyn_cast<CallExpr>(E))
tools/clang/tools/libclang/CXIndexDataConsumer.cpp 163 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
197 if (auto *OrigND = dyn_cast<NamedDecl>(ASTNode.OrigD))
214 LexicalDC = dyn_cast<DeclContext>(SymRel.RelatedSymbol);
426 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
643 if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(D))
825 dyn_cast<NamedDecl>(DC), DC);
1036 ImplD = dyn_cast<ObjCImplementationDecl>(D)) {
1040 CatImplD = dyn_cast<ObjCCategoryImplDecl>(D)) {
1042 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
1045 } else if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
1055 const DeclContext *DC = dyn_cast<DeclContext>(D);
1059 if (const ClassTemplateDecl *ClassTempl = dyn_cast<ClassTemplateDecl>(D)) {
1062 FuncTempl = dyn_cast<FunctionTemplateDecl>(D)) {
1196 if (const TypeDecl *TD = dyn_cast<TypeDecl>(D))
1198 if (const ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(D))
1200 if (const ObjCProtocolDecl *PD = dyn_cast<ObjCProtocolDecl>(D))
1202 if (const TemplateDecl *Template = dyn_cast<TemplateDecl>(D))
1204 if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(D))
1206 if (const NamespaceAliasDecl *Namespace = dyn_cast<NamespaceAliasDecl>(D))
1208 if (const FieldDecl *Field = dyn_cast<FieldDecl>(D))
1210 if (const VarDecl *Var = dyn_cast<VarDecl>(D))
1232 SD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
1235 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
tools/clang/tools/libclang/CXType.cpp 184 dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl);
233 if (const TypeDecl *TD = dyn_cast<TypeDecl>(D))
235 if (const ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(D))
237 if (const DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D))
239 if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
241 if (const ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(D))
243 if (const FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(D))
1032 if (const FieldDecl *FD = dyn_cast<FieldDecl>(Res.front()))
1034 if (const IndirectFieldDecl *IFD = dyn_cast<IndirectFieldDecl>(Res.front()))
1105 if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) {
1107 } else if (const ObjCPropertyDecl *OPD = dyn_cast<ObjCPropertyDecl>(D))
1109 else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
1113 if (const TypeDecl *TD = dyn_cast<TypeDecl>(D))
1115 if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
tools/clang/tools/libclang/Indexing.cpp 650 if (InclusionDirective *ID = dyn_cast<InclusionDirective>(PPE)) {
732 ContInfo = dyn_cast<ObjCContainerDeclInfo>(DI))
745 InterInfo = dyn_cast<ObjCInterfaceDeclInfo>(DI))
758 CatInfo = dyn_cast<ObjCCategoryDeclInfo>(DI))
772 InterInfo = dyn_cast<ObjCInterfaceDeclInfo>(DI))
776 ProtInfo = dyn_cast<ObjCProtocolDeclInfo>(DI))
779 if (const ObjCCategoryDeclInfo *CatInfo = dyn_cast<ObjCCategoryDeclInfo>(DI))
791 if (const ObjCPropertyDeclInfo *PropInfo = dyn_cast<ObjCPropertyDeclInfo>(DI))
804 IBInfo = dyn_cast<IBOutletCollectionInfo>(DI))
816 if (const CXXClassDeclInfo *ClassInfo = dyn_cast<CXXClassDeclInfo>(DI))
tools/clang/unittests/AST/ASTImporterGenericRedeclTest.cpp 124 if (auto *PrevT = dyn_cast<TemplateDecl>(Prev)) {
135 if (auto *PrevF = dyn_cast<FunctionDecl>(Prev)) {
170 if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) {
186 if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) {
297 if (auto *ToT0 = dyn_cast<TemplateDecl>(To0)) {
tools/clang/unittests/AST/ASTImporterODRStrategiesTest.cpp 274 if (auto *ImportedF = dyn_cast<FunctionDecl>(ImportedD))
tools/clang/unittests/AST/ASTImporterTest.cpp 299 auto *ND = dyn_cast<NamedDecl>(FromD);
303 if (auto *ND = dyn_cast<NamedDecl>(D))
1323 if (auto *FD = dyn_cast<FunctionDecl>(Child)) {
1349 if (auto *RD = dyn_cast<CXXRecordDecl>(Child)) {
1377 if (auto *AD = dyn_cast<TypeAliasDecl>(Child)) {
4285 if (auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/unittests/AST/ASTTraverserTest.cpp 193 auto *CTor = dyn_cast<CXXConstructorDecl>(CTorFunc);
tools/clang/unittests/AST/CommentParser.cpp 107 Child = dyn_cast<T>(CommentChild);
tools/clang/unittests/Analysis/CloneDetectionTest.cpp 44 dyn_cast<const FunctionDecl>(Arg.getContainingDecl())) {
80 const auto ND = dyn_cast<const FunctionDecl>(Clone.getContainingDecl());
99 const auto ND = dyn_cast<const FunctionDecl>(Clone.getContainingDecl());
tools/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp 71 E = dyn_cast<DeclRefExpr>(By);
tools/clang/unittests/CodeGen/CodeGenExternalTest.cpp 175 if (FunctionDecl *fd = dyn_cast<FunctionDecl>(decl)) {
186 } else if(clang::RecordDecl *rd = dyn_cast<RecordDecl>(decl)) {
202 llvm::CompositeType* structTy = dyn_cast<CompositeType>(llvmTy);
tools/clang/unittests/CodeGen/IRMatchers.h 185 if (const auto *MT = dyn_cast<MDTuple>(MR)) {
193 if (const auto *Insn = dyn_cast<Instruction>(VR)) {
216 if (const auto *CI = dyn_cast<ConstantInt>(V))
221 if (const auto *MT = dyn_cast<ValueAsMetadata>(M))
222 if (const auto *C = dyn_cast<ConstantInt>(MT->getValue()))
256 if (const auto *I = dyn_cast<Instruction>(&V)) {
319 if (auto *MDS = dyn_cast<MDString>(&M))
338 if (const auto *MT = dyn_cast<MDTuple>(&M)) {
tools/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp 34 FD = dyn_cast<FunctionDecl>(D);
tools/clang/unittests/Index/IndexTests.cpp 80 const auto *ND = llvm::dyn_cast<NamedDecl>(D);
tools/clang/unittests/Sema/CodeCompleteTest.cpp 66 if (const auto *NS = llvm::dyn_cast<NamespaceDecl>(Context))
tools/clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp 91 auto UnaryOp = dyn_cast<UnaryOperator>(S);
tools/clang/unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp 81 if (const auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/unittests/Tooling/ToolingTest.cpp 78 if (CXXRecordDecl* Record = dyn_cast<clang::CXXRecordDecl>(
93 if (CXXRecordDecl* Record = dyn_cast<clang::CXXRecordDecl>(*i)) {
243 NamedDecl *F = dyn_cast<NamedDecl>(D);
tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp 83 if (DefInit *Group = dyn_cast<DefInit>(R->getValueInit("Group"))) {
166 DefInit *DI = dyn_cast<DefInit>(R->getValueInit("Group"));
381 if (DefInit *Group = dyn_cast<DefInit>(R->getValueInit("Group"))) {
400 if (DefInit *Group = dyn_cast<DefInit>(R->getValueInit("Group")))
809 if (auto *Sub = dyn_cast<SubstitutionPiece>(OrigP)) {
814 if (auto *MD = dyn_cast<MultiPiece>(OrigP)) {
1151 auto *MP = dyn_cast<MultiPiece>(D.Root);
1227 if (DefInit *Group = dyn_cast<DefInit>(R.getValueInit("Group"))) {
1258 if (DefInit *DI = dyn_cast<DefInit>(R.getValueInit("Group"))) {
tools/clang/utils/TableGen/ClangOpcodesEmitter.cpp 73 if (auto *TypeClass = dyn_cast<DefInit>(Types->getElement(I))) {
292 if (auto *TypeClass = dyn_cast<DefInit>(Types->getElement(I))) {
tools/clang/utils/TableGen/ClangOptionDocEmitter.cpp 59 auto *G = dyn_cast<DefInit>(R->getValueInit("Group"));
72 if (auto *G = dyn_cast<DefInit>(R->getValueInit("Group")))
78 if (auto *A = dyn_cast<DefInit>(R->getValueInit("Alias"))) {
97 if (auto *G = dyn_cast<DefInit>(R->getValueInit("Group")))
tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp 31 if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage")))
55 if (StringInit *SI = dyn_cast<StringInit>(R.getValueInit(field)))
66 const auto *Bit = dyn_cast<BitInit>(B->getBit(i));
135 if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit("ParentPackage")))
tools/clang/utils/TableGen/MveEmitter.cpp 912 if (auto Dag = dyn_cast<DagInit>(I))
914 if (auto Def = dyn_cast<DefInit>(I))
1011 if (const auto *ST = dyn_cast<ScalarType>(CastType)) {
1064 if (auto *II = dyn_cast<IntInit>(Arg))
1068 if (auto *DI = dyn_cast<DagInit>(Arg))
1078 if (const auto *ST = dyn_cast<ScalarType>(ArgType)) {
1081 } else if (const auto *PT = dyn_cast<PredicateType>(ArgType)) {
1146 if (auto TypeDI = dyn_cast<DefInit>(TypeInit)) {
1195 } else if (auto *II = dyn_cast<IntInit>(CodeDag->getArg(i))) {
1197 } else if (auto *SI = dyn_cast<StringInit>(CodeDag->getArg(i))) {
tools/clang/utils/TableGen/NeonEmitter.cpp 1499 if (StringInit *SI = dyn_cast<StringInit>(I)) {
1501 } else if (DagInit *DI = dyn_cast<DagInit>(I)) {
1586 if (StringInit *SI = dyn_cast<StringInit>(DI->getArg(0)))
1633 StringInit *SI = dyn_cast<StringInit>(DI->getArg(ArgIdx));
1904 DagInit *DI = dyn_cast<DagInit>(Arg);
tools/dsymutil/BinaryHolder.cpp 136 if (const auto *MachO = dyn_cast<object::MachOObjectFile>(Obj.get())) {
tools/dsymutil/BinaryHolder.h 69 const auto *Derived = dyn_cast<ObjectFileType>(Object.get());
tools/dsymutil/DwarfLinker.cpp 514 if (auto *MachOObj = dyn_cast<object::MachOObjectFile>(&Obj))
tools/dsymutil/dsymutil.cpp 363 if (auto *Obj = dyn_cast<MachOObjectFile>(&Binary)) {
tools/llc/llc.cpp 261 if (auto *Remark = dyn_cast<DiagnosticInfoOptimizationBase>(&DI))
tools/lld/COFF/Chunks.h 663 if (auto *sc = dyn_cast<SectionChunk>(this))
tools/lld/COFF/Driver.cpp 517 Undefined *unmangled = dyn_cast<Undefined>(s);
882 if (auto *sec = dyn_cast<SectionChunk>(c))
1057 auto *def = dyn_cast<Defined>(s);
1808 if (auto *u = dyn_cast<Undefined>(sym))
1932 auto *dc = dyn_cast<DefinedCommon>(sym);
tools/lld/COFF/DriverUtils.cpp 710 object::WindowsResource *rf = dyn_cast<object::WindowsResource>(bin.get());
tools/lld/COFF/ICF.cpp 157 if (auto *d1 = dyn_cast<DefinedRegular>(b1))
158 if (auto *d2 = dyn_cast<DefinedRegular>(b2))
183 if (auto *d1 = dyn_cast<DefinedRegular>(b1))
184 if (auto *d2 = dyn_cast<DefinedRegular>(b2))
249 if (auto *sc = dyn_cast<SectionChunk>(c)) {
tools/lld/COFF/InputFiles.cpp 79 if (auto *u = dyn_cast<Undefined>(source)) {
188 if (auto *obj = dyn_cast<COFFObjectFile>(bin.get())) {
tools/lld/COFF/MapFile.cpp 113 auto *sc = dyn_cast<SectionChunk>(c);
tools/lld/COFF/MarkLive.cpp 33 if (auto *sc = dyn_cast<SectionChunk>(c))
45 if (auto *sym = dyn_cast<DefinedRegular>(b))
47 else if (auto *sym = dyn_cast<DefinedImportData>(b))
49 else if (auto *sym = dyn_cast<DefinedImportThunk>(b))
tools/lld/COFF/PDB.cpp 1242 auto *secChunk = dyn_cast<SectionChunk>(c);
1255 if (auto *d = dyn_cast<DefinedCOFF>(def)) {
1294 auto *def = dyn_cast<Defined>(s);
tools/lld/COFF/SymbolTable.cpp 47 if (auto *f = dyn_cast<ObjFile>(file)) {
49 } else if (auto *f = dyn_cast<BitcodeFile>(file)) {
51 } else if (auto *f = dyn_cast<ImportFile>(file)) {
146 auto *sc = dyn_cast<SectionChunk>(c);
182 if (auto *o = dyn_cast<ObjFile>(file))
184 if (auto *b = dyn_cast<BitcodeFile>(file))
227 auto *undef = dyn_cast<Undefined>(sym);
371 auto *undef = dyn_cast<Undefined>(sym);
400 auto *undef = dyn_cast<Undefined>(sym);
499 auto *u = dyn_cast<Undefined>(s);
514 auto *u = dyn_cast<Undefined>(s);
549 if (auto *o = dyn_cast<ObjFile>(file))
551 if (auto *b = dyn_cast<BitcodeFile>(file))
660 else if (auto *dc = dyn_cast<DefinedCommon>(s))
700 if (auto *l = dyn_cast<LazyArchive>(sym)) {
704 } else if (LazyObject *o = dyn_cast<LazyObject>(sym)) {
tools/lld/COFF/Symbols.cpp 75 if (auto *sym = dyn_cast<DefinedCOFF>(this))
77 if (auto *sym = dyn_cast<LazyArchive>(this))
79 if (auto *sym = dyn_cast<LazyObject>(this))
85 if (auto *r = dyn_cast<DefinedRegular>(this))
87 if (auto *imp = dyn_cast<DefinedImportData>(this))
89 if (auto *imp = dyn_cast<DefinedImportThunk>(this))
132 if (auto *d = dyn_cast<Defined>(a))
tools/lld/COFF/Writer.cpp 645 if (auto *sec = dyn_cast<SectionChunk>(c))
826 auto *sc = dyn_cast<SectionChunk>(c);
1125 if (auto *d = dyn_cast<DefinedCOFF>(def)) {
1404 if (Defined *b = dyn_cast<Defined>(sym)) {
1416 if (auto *b = dyn_cast<DefinedRegular>(sym)) {
1492 if (auto *sc = dyn_cast<SectionChunk>(c))
1536 SectionChunk *sc = dyn_cast<SectionChunk>(d->getChunk());
1553 SectionChunk *sc = dyn_cast<SectionChunk>(c);
1686 auto *sc = dyn_cast<SectionChunk>(c);
1856 auto sa = dyn_cast<SectionChunk>(a);
1857 auto sb = dyn_cast<SectionChunk>(b);
1869 auto sc = dyn_cast<SectionChunk>(c);
tools/lld/ELF/AArch64ErrataFix.cpp 445 auto *def = dyn_cast<Defined>(b);
633 if (auto *isd = dyn_cast<InputSectionDescription>(bc)) {
tools/lld/ELF/ARMErrataFix.cpp 321 auto *def = dyn_cast<Defined>(s);
515 if (auto *isd = dyn_cast<InputSectionDescription>(bc)) {
tools/lld/ELF/Arch/Mips.cpp 363 auto *d = dyn_cast<Defined>(&s);
tools/lld/ELF/Arch/MipsArchTree.cpp 364 if (auto *ef = dyn_cast<ELFFileBase>(f))
tools/lld/ELF/Arch/PPC64.cpp 128 return {dyn_cast<Defined>(&sym), getAddend<ELFT>(relas[index])};
164 Defined *defSym = dyn_cast<Defined>(rel.sym);
tools/lld/ELF/CallGraphSort.cpp 251 if (auto *d = dyn_cast<Defined>(sym))
tools/lld/ELF/DWARF.cpp 102 if (auto *dr = dyn_cast<Defined>(&s)) {
tools/lld/ELF/Driver.cpp 751 auto *fromSym = dyn_cast<Defined>(&obj->getSymbol(cgpe.cgp_from));
752 auto *toSym = dyn_cast<Defined>(&obj->getSymbol(cgpe.cgp_to));
1402 if (auto *lo = dyn_cast<LazyObject>(sym))
1417 auto *s = dyn_cast<CommonSymbol>(sym);
1436 auto *s = dyn_cast<SharedSymbol>(sym);
1952 if (auto *sec = dyn_cast<OutputSection>(base))
tools/lld/ELF/ICF.cpp 254 auto *da = dyn_cast<Defined>(&sa);
255 auto *db = dyn_cast<Defined>(&sb);
282 auto *x = dyn_cast<MergeInputSection>(da->section);
342 auto *x = dyn_cast<InputSection>(da->section);
433 if (auto *d = dyn_cast<Defined>(&s))
507 if (auto *sec = dyn_cast<OutputSection>(base))
509 if (auto *isd = dyn_cast<InputSectionDescription>(sub_base))
tools/lld/ELF/InputFiles.cpp 162 if (auto *f = dyn_cast<BinaryFile>(file)) {
169 if (auto *f = dyn_cast<ArchiveFile>(file)) {
175 if (auto *f = dyn_cast<LazyObjFile>(file)) {
185 if (auto *f = dyn_cast<SharedFile>(file)) {
191 if (auto *f = dyn_cast<BitcodeFile>(file)) {
846 if (auto *ms = dyn_cast<MergeInputSection>(target)) {
tools/lld/ELF/InputSection.cpp 137 if (auto *s = dyn_cast<SyntheticSection>(this))
197 if (auto *isec = dyn_cast<InputSection>(this))
199 else if (auto *ms = dyn_cast<MergeInputSection>(this))
201 else if (auto *eh = dyn_cast<EhInputSection>(this))
286 if (Defined *d = dyn_cast<Defined>(b))
349 if (auto *d = dyn_cast<Defined>(b))
442 auto *d = dyn_cast<Defined>(&sym);
927 if (auto *sec = dyn_cast<InputSection>(this))
1070 if (Defined *d = dyn_cast<Defined>(rel.sym))
1098 if (auto *s = dyn_cast<SyntheticSection>(this)) {
tools/lld/ELF/LTO.cpp 191 const auto *dr = dyn_cast<Defined>(sym);
tools/lld/ELF/LinkerScript.cpp 220 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
227 if (auto *cmd = dyn_cast<SymbolAssignment>(sub_base))
259 if (auto *os = dyn_cast<OutputSection>(base)) {
283 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
296 if (auto *cmd = dyn_cast<SymbolAssignment>(base2))
467 if (auto *cmd = dyn_cast<InputSectionDescription>(base)) {
481 if (auto *sec = dyn_cast<OutputSection>(base)) {
542 if (auto *cmd = dyn_cast<SymbolAssignment>(base))
546 if (auto *cmd = dyn_cast<SymbolAssignment>(sub_base))
556 if (auto *sec = dyn_cast<OutputSection>(base))
713 if (auto *sec = dyn_cast<InputSection>(isec))
852 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
860 if (auto *cmd = dyn_cast<ByteCommand>(base)) {
897 if (auto cmd = dyn_cast<SymbolAssignment>(base))
933 auto *sec = dyn_cast<OutputSection>(cmd);
974 if (auto *sec = dyn_cast<OutputSection>(base)) {
1001 auto *sec = dyn_cast<OutputSection>(base);
1102 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
1171 if (auto *ds = dyn_cast<Defined>(sym))
tools/lld/ELF/MapFile.cpp 58 if (auto *dr = dyn_cast<Defined>(b))
165 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
180 if (auto *isd = dyn_cast<InputSectionDescription>(base)) {
182 if (auto *ehSec = dyn_cast<EhFrameSection>(isec)) {
196 if (auto *cmd = dyn_cast<ByteCommand>(base)) {
203 if (auto *cmd = dyn_cast<SymbolAssignment>(base)) {
240 if (auto *d = dyn_cast<Defined>(sym))
tools/lld/ELF/MarkLive.cpp 98 if (auto *d = dyn_cast<Defined>(&sym)) {
112 if (auto *ss = dyn_cast<SharedSymbol>(&sym))
191 if (auto *ms = dyn_cast<MergeInputSection>(sec))
202 if (InputSection *s = dyn_cast<InputSection>(sec))
246 if (auto *eh = dyn_cast<EhInputSection>(sec)) {
301 if (auto *d = dyn_cast<Defined>(s))
328 if (auto *s = dyn_cast<SharedSymbol>(sym))
tools/lld/ELF/OutputSections.cpp 165 auto *cmd = dyn_cast<InputSectionDescription>(base);
170 MergeInputSection *ms = dyn_cast<MergeInputSection>(s);
242 if (auto *isd = dyn_cast<InputSectionDescription>(b))
336 if (auto *data = dyn_cast<ByteCommand>(base))
363 if (auto *ex = dyn_cast<ARMExidxSyntheticSection>(first))
467 if (auto *isd = dyn_cast<InputSectionDescription>(base))
tools/lld/ELF/Relocations.cpp 69 if (auto *cmd = dyn_cast<SymbolAssignment>(base))
328 if (const auto *dr = dyn_cast<Defined>(&sym))
902 if (auto *eh = dyn_cast<EhInputSection>(&sec))
1087 if (auto *ss = dyn_cast<SharedSymbol>(&sym)) {
1420 auto *ta = dyn_cast<ThunkSection>(a);
1421 auto *tb = dyn_cast<ThunkSection>(b);
1446 if (auto *isd = dyn_cast<InputSectionDescription>(bc))
1618 auto *isd = dyn_cast<InputSectionDescription>(bc);
1710 if (auto *d = dyn_cast<Defined>(rel.sym))
tools/lld/ELF/Symbols.cpp 189 if (const auto *dr = dyn_cast<Defined>(this))
195 if (auto *s = dyn_cast<Defined>(this)) {
250 if (auto *sym = dyn_cast<LazyArchive>(this)) {
255 if (auto *sym = dyn_cast<LazyObject>(this)) {
256 dyn_cast<LazyObjFile>(sym->file)->fetch();
329 auto *d = dyn_cast<Defined>(sym);
tools/lld/ELF/SyntheticSections.cpp 391 if (auto *d = dyn_cast<Defined>(&b))
860 if (auto *isd = dyn_cast<InputSectionDescription>(cmd))
2094 if (auto *d = dyn_cast<Defined>(sym))
2192 if (auto *d = dyn_cast<Defined>(sym))
2546 if (InputSection *isec = dyn_cast<InputSection>(s))
3138 if (auto *s = dyn_cast<MergeInputSection>(sec))
3140 else if (auto *eh = dyn_cast<EhInputSection>(sec))
3398 if (auto *isd = dyn_cast<InputSectionDescription>(base))
3412 if (auto *isd = dyn_cast<InputSectionDescription>(base)) {
tools/lld/ELF/Thunks.cpp 660 return dyn_cast<InputSection>(dr.section);
684 return dyn_cast<InputSection>(dr.section);
708 return dyn_cast<InputSection>(dr.section);
tools/lld/ELF/Writer.cpp 101 if (auto *isec = dyn_cast<InputSection>(s)) {
164 else if (auto *es = dyn_cast<EhInputSection>(s))
185 if (auto *es = dyn_cast<EhInputSection>(s)) {
305 if (auto *sec = dyn_cast<OutputSection>(base))
656 if (auto *d = dyn_cast<Defined>(&b)) {
667 if (auto *s = dyn_cast<MergeInputSection>(sec))
686 auto *dr = dyn_cast<Defined>(b);
706 auto *sec = dyn_cast<OutputSection>(base);
710 if (auto *isd = dyn_cast<InputSectionDescription>(base))
1125 auto *sec = dyn_cast<OutputSection>(b);
1144 if (auto *assign = dyn_cast<SymbolAssignment>(cmd))
1167 auto *curSec = dyn_cast<OutputSection>(*i);
1176 auto *os = dyn_cast<OutputSection>(cmd);
1231 if (auto *d = dyn_cast<Defined>(&sym)) {
1369 if (auto *isd = dyn_cast<InputSectionDescription>(b))
1379 if (auto *sec = dyn_cast<OutputSection>(base))
1394 auto *os = dyn_cast<OutputSection>(base);
1459 if (auto *sec = dyn_cast<OutputSection>(base))
1522 if (auto *isd = dyn_cast<InputSectionDescription>(base)) {
1624 SyntheticSection *ss = dyn_cast<SyntheticSection>(s);
1634 if (auto *isd = dyn_cast<InputSectionDescription>(b))
1683 if (auto *sec = dyn_cast<OutputSection>(base))
1821 if (auto *sec = dyn_cast<OutputSection>(base))
tools/lld/include/lld/Core/Simple.h 64 if (auto *p = dyn_cast<DefinedAtom>(&atom)) {
66 } else if (auto *p = dyn_cast<UndefinedAtom>(&atom)) {
68 } else if (auto *p = dyn_cast<SharedLibraryAtom>(&atom)) {
70 } else if (auto *p = dyn_cast<AbsoluteAtom>(&atom)) {
tools/lld/lib/Core/Resolver.cpp 185 if (FileNode *node = dyn_cast<FileNode>(inputs[i].get()))
195 if (GroupEnd *group = dyn_cast<GroupEnd>(inputs[index].get())) {
299 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get())) {
326 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom)) {
356 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get()))
360 if (const AbsoluteAtom *absAtom = dyn_cast<AbsoluteAtom>(atom.get()))
367 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get()))
480 if (auto *definedAtom = dyn_cast<DefinedAtom>(atom.get())) {
tools/lld/lib/Core/SymbolTable.cpp 283 if (const auto *undef = dyn_cast<const UndefinedAtom>(atom))
tools/lld/lib/Driver/DarwinLdDriver.cpp 105 if (auto *archive = dyn_cast<ArchiveLibraryFile>(file.get())) {
130 if (SharedLibraryFile *shl = dyn_cast<SharedLibraryFile>(file.get())) {
1165 if (FileNode *node = dyn_cast<FileNode>(ie.get()))
tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp 342 if (const DefinedAtom* lp = dyn_cast<DefinedAtom>(ref->target())) {
1028 if (const DefinedAtom *defTarg = dyn_cast<DefinedAtom>(target)) {
1049 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(&target)) {
tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp 534 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(&target)) {
tools/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp 508 const DefinedAtom *cfiTarget = dyn_cast<DefinedAtom>(ref->target());
tools/lld/lib/ReaderWriter/MachO/GOTPass.cpp 145 const DefinedAtom *defTarget = dyn_cast<DefinedAtom>(target);
tools/lld/lib/ReaderWriter/MachO/LayoutPass.cpp 56 const DefinedAtom *definedAtom = dyn_cast<DefinedAtom>(atom);
345 const DefinedAtom *targetAtom = dyn_cast<DefinedAtom>(r->target());
tools/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp 176 FileNode *node = dyn_cast<FileNode>(nodes[i].get());
1001 if (FileNode *node = dyn_cast<FileNode>(const_cast<Node *>(elem.get()))) {
1026 auto *machoFile = dyn_cast<MachOFile>(&file);
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp 407 if (auto *machoFile = dyn_cast<mach_o::MachOFile>(&atom->file())) {
770 if (auto *definedAtom = dyn_cast<DefinedAtom>(atom)) {
808 if (const DefinedAtom *atom = dyn_cast<DefinedAtom>(info.atom)) {
822 dyn_cast<mach_o::MachOFile>(&info.atom->file())) {
1132 ordinal = dylibOrdinal(dyn_cast<SharedLibraryAtom>(ai.atom));
1160 if (const DefinedAtom *lpAtom = dyn_cast<DefinedAtom>(ta)) {
1448 if (const SharedLibraryAtom *sa = dyn_cast<SharedLibraryAtom>(targ)) {
1462 if (const SharedLibraryAtom *sa = dyn_cast<SharedLibraryAtom>(targ)) {
1495 const DefinedAtom *da = dyn_cast<DefinedAtom>(ref->target());
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp 1267 const MachODefinedAtom *cie = dyn_cast<MachODefinedAtom>(cieRefTarget);
tools/lld/lib/ReaderWriter/MachO/ShimPass.cpp 58 if (const lld::DefinedAtom *daTarget = dyn_cast<DefinedAtom>(target)) {
tools/lld/lib/ReaderWriter/MachO/StubsPass.cpp 235 const DefinedAtom *defTarget = dyn_cast<DefinedAtom>(target);
tools/lld/wasm/Driver.cpp 434 if (auto *lazySym = dyn_cast<LazySymbol>(sym))
tools/lld/wasm/InputFiles.cpp 97 if (auto *ss = dyn_cast<SectionSymbol>(sym))
200 if (auto gs = dyn_cast<GlobalSymbol>(sym))
253 auto *obj = dyn_cast<WasmObjectFile>(bin.get());
tools/lld/wasm/LTO.cpp 79 if (auto f = dyn_cast<DefinedFunction>(s))
tools/lld/wasm/SymbolTable.cpp 33 if (auto *f = dyn_cast<ArchiveFile>(file)) {
39 if (auto *f = dyn_cast<SharedFile>(file)) {
48 if (auto *f = dyn_cast<BitcodeFile>(file)) {
171 auto existingEvent = dyn_cast<EventSymbol>(existing);
291 auto existingFunction = dyn_cast<FunctionSymbol>(s);
298 if (auto ud = dyn_cast<UndefinedFunction>(existingFunction))
449 else if (auto *lazy = dyn_cast<LazySymbol>(s))
452 auto existingFunction = dyn_cast<FunctionSymbol>(s);
457 auto *existingUndefined = dyn_cast<UndefinedFunction>(existingFunction);
489 else if (auto *lazy = dyn_cast<LazySymbol>(s))
512 else if (auto *lazy = dyn_cast<LazySymbol>(s))
542 if (auto *f = dyn_cast<UndefinedFunction>(s))
701 if (auto f = dyn_cast<DefinedFunction>(symbol)) {
tools/lld/wasm/Symbols.cpp 96 if (auto* f = dyn_cast<FunctionSymbol>(this))
98 if (auto *l = dyn_cast<LazySymbol>(this))
104 if (auto *f = dyn_cast<DefinedFunction>(this))
106 if (auto *d = dyn_cast<DefinedData>(this))
118 if (auto *g = dyn_cast<DefinedGlobal>(this))
120 if (auto *e = dyn_cast<DefinedEvent>(this))
129 if (auto *g = dyn_cast<DefinedGlobal>(this))
131 if (auto *e = dyn_cast<DefinedEvent>(this))
200 if (auto *f = dyn_cast<DefinedFunction>(this))
213 if (auto *f = dyn_cast<DefinedFunction>(this))
219 if (auto *f = dyn_cast<DefinedFunction>(this))
226 if (auto *f = dyn_cast<DefinedFunction>(this))
235 if (auto *f = dyn_cast<DefinedFunction>(this)) {
280 if (auto *f = dyn_cast<DefinedGlobal>(this))
293 if (auto *f = dyn_cast<DefinedGlobal>(this))
305 if (auto *f = dyn_cast<DefinedEvent>(this))
318 if (auto *f = dyn_cast<DefinedEvent>(this))
tools/lld/wasm/SyntheticSections.cpp 116 if (auto *f = dyn_cast<FunctionSymbol>(sym))
118 else if (auto *g = dyn_cast<GlobalSymbol>(sym))
158 if (auto *f = dyn_cast<UndefinedFunction>(sym)) {
161 } else if (auto *g = dyn_cast<UndefinedGlobal>(sym)) {
169 if (auto *functionSym = dyn_cast<FunctionSymbol>(sym)) {
172 } else if (auto *globalSym = dyn_cast<GlobalSymbol>(sym)) {
259 if (auto *F = dyn_cast<FunctionSymbol>(sym))
274 if (auto *d = dyn_cast<DefinedData>(sym))
276 else if (auto *f = dyn_cast<FunctionSymbol>(sym))
399 if (auto *f = dyn_cast<FunctionSymbol>(sym)) {
403 } else if (auto *g = dyn_cast<GlobalSymbol>(sym)) {
407 } else if (auto *e = dyn_cast<EventSymbol>(sym)) {
413 if (auto *dataSym = dyn_cast<DefinedData>(sym)) {
513 if (auto *f = dyn_cast<FunctionSymbol>(s)) {
tools/lld/wasm/Writer.cpp 523 if (auto *f = dyn_cast<DefinedFunction>(sym)) {
525 } else if (auto *g = dyn_cast<DefinedGlobal>(sym)) {
535 } else if (auto *e = dyn_cast<DefinedEvent>(sym)) {
580 if (auto *f = dyn_cast<FunctionSymbol>(sym))
582 else if (auto *e = dyn_cast<EventSymbol>(sym))
tools/lldb/include/lldb/Symbol/ClangASTContext.h 224 llvm::dyn_cast<RecordDeclType>(named_decl))
tools/lldb/source/API/SBTypeSummary.cpp 214 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get())) {
227 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get())) {
249 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get())) {
256 llvm::dyn_cast<StringSummaryFormat>(m_opaque_sp.get()))
286 llvm::dyn_cast<StringSummaryFormat>(m_opaque_sp.get()))
299 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get()))
312 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get()))
382 return llvm::dyn_cast<CXXFunctionSummaryFormat>(m_opaque_sp.get()) ==
383 llvm::dyn_cast<CXXFunctionSummaryFormat>(rhs.m_opaque_sp.get());
429 llvm::dyn_cast<CXXFunctionSummaryFormat>(m_opaque_sp.get())) {
434 llvm::dyn_cast<ScriptSummaryFormat>(m_opaque_sp.get())) {
439 llvm::dyn_cast<StringSummaryFormat>(m_opaque_sp.get())) {
tools/lldb/source/Breakpoint/Breakpoint.cpp 977 dyn_cast<BreakpointResolverFileLine>(m_resolver_sp.get());
tools/lldb/source/Expression/IRExecutionUnit.cpp 982 if (llvm::ConstantArray *ctor_array = llvm::dyn_cast<llvm::ConstantArray>(
990 llvm::dyn_cast<llvm::Function>(ctor_struct->getOperand(1))) {
tools/lldb/source/Expression/IRInterpreter.cpp 166 const Constant *constant = dyn_cast<Constant>(value);
234 if (const Function *constant_func = dyn_cast<Function>(constant)) {
245 if (const ConstantInt *constant_int = dyn_cast<ConstantInt>(constant)) {
251 if (const ConstantFP *constant_fp = dyn_cast<ConstantFP>(constant)) {
258 dyn_cast<ConstantExpr>(constant)) {
419 if (const Constant *constant = dyn_cast<Constant>(value)) {
461 if (const ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
623 if (Constant *constant = llvm::dyn_cast<Constant>(operand)) {
710 const BinaryOperator *bin_op = dyn_cast<BinaryOperator>(inst);
807 const AllocaInst *alloca_inst = dyn_cast<AllocaInst>(inst);
878 const CastInst *cast_inst = dyn_cast<CastInst>(inst);
903 const CastInst *cast_inst = dyn_cast<CastInst>(inst);
932 const BranchInst *br_inst = dyn_cast<BranchInst>(inst);
974 const PHINode *phi_inst = dyn_cast<PHINode>(inst);
1009 const GetElementPtrInst *gep_inst = dyn_cast<GetElementPtrInst>(inst);
1042 ConstantInt *constant_index = dyn_cast<ConstantInt>(*ii);
1079 const ICmpInst *icmp_inst = dyn_cast<ICmpInst>(inst);
1175 const IntToPtrInst *int_to_ptr_inst = dyn_cast<IntToPtrInst>(inst);
1206 const PtrToIntInst *ptr_to_int_inst = dyn_cast<PtrToIntInst>(inst);
1237 const TruncInst *trunc_inst = dyn_cast<TruncInst>(inst);
1268 const LoadInst *load_inst = dyn_cast<LoadInst>(inst);
1287 PointerType *pointer_ptr_ty = dyn_cast<PointerType>(pointer_ty);
1358 const StoreInst *store_inst = dyn_cast<StoreInst>(inst);
1379 PointerType *pointer_ptr_ty = dyn_cast<PointerType>(pointer_ty);
1443 const CallInst *call_inst = dyn_cast<CallInst>(inst);
tools/lldb/source/Host/common/FileSystem.cpp 459 auto *F = dyn_cast<vfs::RedirectingFileSystem::RedirectingFileEntry>(*E);
tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp 810 llvm::dyn_cast<ClangASTContext>(m_type.GetTypeSystem());
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp 21 clang::DeclContext *decl_ctx = llvm::dyn_cast<clang::DeclContext>(decl);
50 if (clang::Decl *decl = llvm::dyn_cast<clang::Decl>(decl_ctx)) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp 43 m_passthrough_sema = dyn_cast<SemaConsumer>(passthrough);
58 if (NamedDecl *named_decl = dyn_cast<NamedDecl>(D)) {
63 else if (ObjCMethodDecl *method_decl = dyn_cast<ObjCMethodDecl>(D))
75 if (LinkageSpecDecl *linkage_spec_decl = dyn_cast<LinkageSpecDecl>(D)) {
83 if (ObjCMethodDecl *method_decl = dyn_cast<ObjCMethodDecl>(D)) {
89 } else if (FunctionDecl *function_decl = dyn_cast<FunctionDecl>(D)) {
137 CompoundStmt *compound_stmt = dyn_cast<CompoundStmt>(function_body);
181 CompoundStmt *compound_stmt = dyn_cast<CompoundStmt>(method_body);
214 while (dyn_cast<NullStmt>(last_stmt)) {
223 Expr *last_expr = dyn_cast<Expr>(last_stmt);
233 ImplicitCastExpr *implicit_cast = dyn_cast<ImplicitCastExpr>(last_expr);
474 if (NamedDecl *NamedDecl_scratch = dyn_cast<NamedDecl>(D_scratch))
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp 38 m_passthrough_sema = dyn_cast<SemaConsumer>(passthrough);
55 CompoundStmt *body_compound_stmt = dyn_cast<CompoundStmt>(body_stmt);
68 DeclStmt *curr_decl_stmt = dyn_cast<DeclStmt>(curr_stmt);
73 RecordDecl *candidate_record_decl = dyn_cast<RecordDecl>(candidate_decl);
112 LinkageSpecDecl *linkage_spec_decl = dyn_cast<LinkageSpecDecl>(D);
123 FunctionDecl *function_decl = dyn_cast<FunctionDecl>(D);
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.h 141 m_sc = llvm::dyn_cast<clang::SemaConsumer>(m_c);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp 314 dyn_cast<NamespaceDecl>(decl_ctx)) {
453 dyn_cast<ObjCInterfaceDecl>(original_decl)) {
507 dyn_cast<ObjCInterfaceType>(complete_clang_type);
523 if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl_context)) {
541 const Decl *context_decl = dyn_cast<Decl>(decl_context);
556 if (const NamedDecl *context_named_decl = dyn_cast<NamedDecl>(context_decl))
592 dyn_cast<ObjCInterfaceDecl>(original_decl)) {
604 if (TagDecl *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
612 dyn_cast<DeclContext>(original_decl);
630 dyn_cast<NamedDecl>(context_decl))
645 if (FieldDecl *copied_field = dyn_cast<FieldDecl>(copied_decl)) {
703 dyn_cast<NamedDecl>(context.m_decl_context))
721 dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
740 dyn_cast<NamespaceDecl>(context.m_decl_context)) {
942 copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
999 copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
1028 return TD<D2>(dyn_cast<D2>(source.decl));
1056 return DeclFromUser<D>(dyn_cast<D>(origin_decl.decl));
1064 return DeclFromParser<D>(dyn_cast<D>(parser_generic_decl.decl));
1123 ObjCMethodDecl *result_method = dyn_cast<ObjCMethodDecl>(named_decl);
1133 ObjCMethodDecl *copied_method_decl = dyn_cast<ObjCMethodDecl>(copied_decl);
1156 if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
1177 dyn_cast<ObjCInterfaceDecl>(decl_ctx);
1193 dyn_cast<ObjCInterfaceDecl>(original_decl);
1341 dyn_cast<ObjCMethodDecl>(copied_decl);
1405 dyn_cast<ObjCInterfaceDecl>(decls[0]);
1446 dyn_cast<ObjCInterfaceDecl>(decls[0]);
1591 dyn_cast<ObjCInterfaceDecl>(decls[0]));
1636 dyn_cast<ObjCInterfaceDecl>(decls[0]));
1974 NamespaceDecl *copied_namespace_decl = dyn_cast<NamespaceDecl>(copied_decl);
1984 return dyn_cast<NamespaceDecl>(copied_decl);
2095 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
2122 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp 151 llvm::dyn_cast<ClangExpressionVariable>(pvar_sp.get()))
712 dyn_cast<NamedDecl>(context.m_decl_context))
727 dyn_cast<NamespaceDecl>(context.m_decl_context)) {
834 dyn_cast<NamedDecl>(parser_persistent_decl);
840 llvm::dyn_cast<clang::FunctionDecl>(parser_named_decl)) {
1438 copied_decl ? dyn_cast<clang::FunctionDecl>(copied_decl)
1634 if (const TagType *tag_type = dyn_cast<TagType>(parser_type))
1637 dyn_cast<ObjCObjectPointerType>(parser_type))
1790 const VarDecl *var_decl = dyn_cast<VarDecl>(named_decl);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp 497 auto *clang_expr = dyn_cast<ClangUserExpression>(&m_expr);
785 if (const FunctionDecl *F = dyn_cast<FunctionDecl>(D)) {
793 } else if (const VarDecl *V = dyn_cast<VarDecl>(D)) {
795 } else if (const FieldDecl *F = dyn_cast<FieldDecl>(D)) {
797 } else if (const NamespaceDecl *N = dyn_cast<NamespaceDecl>(D)) {
944 dyn_cast<ClangExpressionHelper>(m_expr.GetTypeSystemHelper());
1108 const auto *diagnostic = llvm::dyn_cast<ClangDiagnostic>(diag.get());
1238 dyn_cast<ClangExpressionHelper>(m_expr.GetTypeSystemHelper());
1313 if (auto *checker_funcs = llvm::dyn_cast<ClangDynamicCheckerFunctions>(
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h 90 llvm::dyn_cast<ClangExpressionVariable>(var_sp.get())) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp 87 if (clang::EnumDecl *enum_decl = llvm::dyn_cast<clang::EnumDecl>(decl)) {
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp 332 if (llvm::LoadInst *li = dyn_cast<llvm::LoadInst>(inst))
334 else if (llvm::StoreInst *si = dyn_cast<llvm::StoreInst>(inst))
358 if (dyn_cast<llvm::LoadInst>(&i) || dyn_cast<llvm::StoreInst>(&i))
358 if (dyn_cast<llvm::LoadInst>(&i) || dyn_cast<llvm::StoreInst>(&i))
389 CallInst *call_inst = dyn_cast<CallInst>(inst);
450 if (llvm::Function *function = llvm::dyn_cast<llvm::Function>(value)) {
455 llvm::dyn_cast<llvm::ConstantExpr>(value)) {
474 CallInst *call_inst = dyn_cast<CallInst>(&i);
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp 129 dyn_cast<llvm::MDNode>(named_metadata->getOperand(node_index));
224 GlobalVariable *result_global = dyn_cast<GlobalVariable>(result_value);
256 clang::VarDecl *result_var = dyn_cast<clang::VarDecl>(result_decl);
490 string_array = dyn_cast<ConstantDataSequential>(cstr->getInitializer());
566 dyn_cast<GlobalVariable>(nsstring_value);
587 dyn_cast<ConstantStruct>(nsstring_global->getInitializer());
634 ConstantExpr *nsstring_expr = dyn_cast<ConstantExpr>(nsstring_member);
651 cstr_global = dyn_cast<GlobalVariable>(nsstring_cstr);
654 cstr_global = dyn_cast<GlobalVariable>(nsstring_cstr);
709 dyn_cast<ConstantDataArray>(cstr_global->getInitializer());
736 GlobalVariable *gv = dyn_cast<GlobalVariable>(value_symbol.second);
759 GlobalVariable *global_variable = dyn_cast<GlobalVariable>(value);
770 LoadInst *load = dyn_cast<LoadInst>(selector_load);
791 dyn_cast<GlobalVariable>(load->getPointerOperand());
799 ConstantExpr *osr_initializer_expr = dyn_cast<ConstantExpr>(osr_initializer);
813 dyn_cast<GlobalVariable>(osr_initializer_base);
821 dyn_cast<ConstantDataArray>(omvn_initializer);
899 if (LoadInst *load = dyn_cast<LoadInst>(&inst))
920 GlobalVariable *global_variable = dyn_cast<GlobalVariable>(value);
931 LoadInst *load = dyn_cast<LoadInst>(class_load);
949 dyn_cast<GlobalVariable>(load->getPointerOperand());
957 ConstantExpr *ocr_initializer_expr = dyn_cast<ConstantExpr>(ocr_initializer);
971 dyn_cast<GlobalVariable>(ocr_initializer_base);
979 dyn_cast<ConstantDataArray>(ocn_initializer);
1050 if (LoadInst *load = dyn_cast<LoadInst>(&inst))
1075 AllocaInst *alloc = dyn_cast<AllocaInst>(persistent_alloc);
1150 if (AllocaInst *alloc = dyn_cast<AllocaInst>(&inst)) {
1190 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) {
1201 dyn_cast<GlobalVariable>(llvm_value_ptr)) {
1222 clang::ValueDecl *value_decl = dyn_cast<clang::ValueDecl>(named_decl);
1269 } else if (dyn_cast<llvm::Function>(llvm_value_ptr)) {
1335 dyn_cast<GlobalVariable>(classlist_reference);
1365 if (LoadInst *load_instruction = dyn_cast<LoadInst>(u))
1390 CallInst *call = dyn_cast<CallInst>(&inst);
1422 CallInst *call = dyn_cast<CallInst>(&inst);
1479 Constant *Old = dyn_cast<Constant>(V);
1484 if (auto CE = dyn_cast<ConstantExpr>(V)) {
1491 GlobalVariable *GV = dyn_cast<GlobalVariable>(Old);
1517 if (LoadInst *load = dyn_cast<LoadInst>(&inst))
1521 if (StoreInst *store = dyn_cast<StoreInst>(&inst))
1551 if (Constant *constant = dyn_cast<Constant>(user)) {
1554 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
1630 if (Instruction *inst = llvm::dyn_cast<Instruction>(user)) {
1813 if (Constant *constant = dyn_cast<Constant>(value)) {
1818 } else if (Instruction *instruction = dyn_cast<Instruction>(value)) {
1832 if (GlobalVariable *var = dyn_cast<GlobalVariable>(value))
tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp 340 llvm::dyn_cast<ObjectFileMachO>(module_sp->GetObjectFile())) {
tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp 53 llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get());
tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp 52 llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl_ctx);
588 llvm::dyn_cast<clang::ObjCInterfaceDecl>(lookup_result[0])) {
tools/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp 965 llvm::dyn_cast<llvm::object::COFFObjectFile>(m_owningbin->getBinary());
tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 1486 if (auto *simple = llvm::dyn_cast<SimplePythonFile>(&file))
tools/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp 587 auto *symbol = llvm::dyn_cast<postfix::SymbolNode>(it->second);
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp 212 auto *tag_decl_ctx = clang::dyn_cast<clang::TagDecl>(decl_ctx);
2921 ivar_decl = clang::dyn_cast<clang::ObjCIvarDecl>(field_decl);
3372 llvm::dyn_cast<clang::NamedDecl>(
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp 91 if (auto *type_unit = llvm::dyn_cast<DWARFTypeUnit>(unit_sp->get())) {
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 754 if (auto *cu = llvm::dyn_cast<DWARFCompileUnit>(info->GetUnitAtIndex(i))) {
869 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit)) {
1544 DWARFCompileUnit *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit);
2067 auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2152 llvm::dyn_cast<DWARFCompileUnit>(die.GetCU());
2556 if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(die.GetCU()))
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp 79 llvm::dyn_cast<DWARFCompileUnit>(debug_info->GetUnitAtIndex(i))) {
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp 816 return llvm::dyn_cast<clang::BlockDecl>(decl);
851 return llvm::dyn_cast<clang::VarDecl>(decl);
861 return llvm::dyn_cast<clang::VarDecl>(decl);
871 return llvm::dyn_cast<clang::TypedefNameDecl>(decl);
985 return llvm::dyn_cast<clang::FunctionDecl>(decl);
989 if (clang::NamespaceDecl *ns = llvm::dyn_cast<clang::NamespaceDecl>(parent)) {
991 } else if (clang::TagDecl *tag = llvm::dyn_cast<clang::TagDecl>(parent)) {
1166 return !!llvm::dyn_cast<clang::TagDecl>(&context);
1170 return !!llvm::dyn_cast<clang::FunctionDecl>(&context);
1174 return !!llvm::dyn_cast<clang::BlockDecl>(&context);
1204 clang::NamespaceDecl *ns = llvm::dyn_cast<clang::NamespaceDecl>(context);
1244 clang::FunctionDecl *func_decl = llvm::dyn_cast<clang::FunctionDecl>(&decl);
1303 if (auto *tag = llvm::dyn_cast<clang::TagDecl>(&context)) {
1327 clang::NamespaceDecl &ns = *llvm::dyn_cast<clang::NamespaceDecl>(&context);
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp 124 auto *obj = llvm::dyn_cast<llvm::object::COFFObjectFile>(binary.getBinary());
tools/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp 233 if (auto *record_decl = llvm::dyn_cast<clang::CXXRecordDecl>(&m_tag_decl)) {
tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp 251 auto parent_udt = llvm::dyn_cast<PDBSymbolTypeUDT>(parent.get());
383 auto udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&type);
473 auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(&type);
541 auto type_def = llvm::dyn_cast<PDBSymbolTypeTypedef>(&type);
590 if (auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(&type)) {
601 llvm::dyn_cast<PDBSymbolTypeFunctionSig>(&type)) {
655 auto array_type = llvm::dyn_cast<PDBSymbolTypeArray>(&type);
691 auto *builtin_type = llvm::dyn_cast<PDBSymbolTypeBuiltin>(&type);
718 auto *pointer_type = llvm::dyn_cast<PDBSymbolTypePointer>(&type);
804 auto udt = llvm::dyn_cast<PDBSymbolTypeUDT>(symbol.get());
885 auto data = llvm::dyn_cast<PDBSymbolData>(&symbol);
919 auto func = llvm::dyn_cast<PDBSymbolFunc>(&symbol);
tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp 397 if (auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(pdb_symbol)) {
404 } else if (llvm::dyn_cast<PDBSymbolBlock>(pdb_symbol)) {
755 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
873 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
1036 if (auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1117 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1486 if (auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1489 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1491 else if (auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1595 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
tools/lldb/source/Symbol/ClangASTContext.cpp 173 if (auto *base_record = llvm::dyn_cast<clang::CXXRecordDecl>(
193 llvm::dyn_cast<clang::CXXMethodDecl>(path.Decls.front()))
1312 if (auto *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl))
1319 llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl))
1321 if (clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(decl))
1534 class_template_decl = dyn_cast<clang::ClassTemplateDecl>(decl);
1735 const CXXRecordDecl *cxx_record_decl = dyn_cast<CXXRecordDecl>(record_decl);
1817 namespace_decl = dyn_cast<clang::NamespaceDecl>(decl);
2040 llvm::dyn_cast<clang::FunctionProtoType>(method_qual_type.getTypePtr());
2326 clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl_ctx);
2341 clang::RecordDecl *record_decl = llvm::dyn_cast<clang::RecordDecl>(decl);
2348 clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl);
2391 llvm::dyn_cast<clang::NamedDecl>(lhs_decl);
2393 llvm::dyn_cast<clang::NamedDecl>(rhs_decl);
2416 llvm::dyn_cast<clang::NamedDecl>(lhs_decl_ctx);
2418 llvm::dyn_cast<clang::NamedDecl>(rhs_decl_ctx);
2451 if (clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(decl)) {
2462 llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl)) {
2506 return llvm::dyn_cast<clang::DeclContext>(cxx_method_decl);
2511 return llvm::dyn_cast<clang::DeclContext>(objc_method_decl);
2518 const clang::TagType *tag_type = llvm::dyn_cast<clang::TagType>(clang_type);
2521 llvm::dyn_cast<clang::TagDecl>(tag_type->getDecl());
2603 llvm::dyn_cast<clang::ArrayType>(qual_type.getTypePtr());
2642 llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
2962 llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl_ctx);
3018 llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
3170 llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
3183 llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
3583 llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
3650 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
4524 llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
4544 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
4573 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
4633 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
4697 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
4772 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
5544 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
5584 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
5823 llvm::dyn_cast<clang::RecordType>(qual_type.getTypePtr());
5890 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
6042 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
6619 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
6729 llvm::dyn_cast<clang::ObjCObjectType>(parent_qual_type.getTypePtr());
7067 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
7103 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl),
7166 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
7253 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
7438 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
7483 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
7656 llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(
7712 return llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(
7909 llvm::dyn_cast<clang::RecordDecl>(TagT->getDecl()))
7961 ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
7997 llvm::dyn_cast<clang::FieldDecl>(*di)) {
8015 llvm::dyn_cast<clang::IndirectFieldDecl>(*di)) {
8066 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
8085 ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
8145 llvm::dyn_cast<clang::FunctionType>(method_qual_type.getTypePtr());
8151 llvm::dyn_cast<clang::FunctionProtoType>(function_type));
8378 ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
8588 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
8632 llvm::dyn_cast<clang::FunctionProtoType>(method_type));
8721 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
8825 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
8884 const clang::EnumType *enutype = llvm::dyn_cast<clang::EnumType>(clang_type);
8926 llvm::dyn_cast<clang::EnumType>(clang_type);
8942 llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
9029 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
9656 llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
9710 llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
9722 llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
9887 llvm::dyn_cast<NamedDecl>((clang::Decl *)opaque_decl);
9897 llvm::dyn_cast<clang::NamedDecl>((clang::Decl *)opaque_decl);
9904 mc->mangleCXXCtor(llvm::dyn_cast<clang::CXXConstructorDecl>(nd),
9907 mc->mangleCXXDtor(llvm::dyn_cast<clang::CXXDestructorDecl>(nd),
9930 llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl))
9933 llvm::dyn_cast<clang::ObjCMethodDecl>((clang::Decl *)opaque_decl))
9941 llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl))
9944 llvm::dyn_cast<clang::ObjCMethodDecl>((clang::Decl *)opaque_decl))
9953 llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl)) {
9960 llvm::dyn_cast<clang::ObjCMethodDecl>(
9995 llvm::dyn_cast<clang::UsingDirectiveDecl>(child)) {
10003 llvm::dyn_cast<clang::UsingDecl>(child)) {
10009 llvm::dyn_cast<clang::NamedDecl>(target)) {
10017 llvm::dyn_cast<clang::NamedDecl>(child)) {
10110 llvm::dyn_cast<clang::UsingDirectiveDecl>(child)) {
10120 llvm::dyn_cast<clang::UsingDecl>(child)) {
10123 clang::NamedDecl *nd = llvm::dyn_cast<clang::NamedDecl>(target);
10161 llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
10172 llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
10186 llvm::dyn_cast<clang::ObjCMethodDecl>(decl_ctx)) {
10195 llvm::dyn_cast<clang::CXXMethodDecl>(decl_ctx)) {
10204 llvm::dyn_cast<clang::FunctionDecl>(decl_ctx)) {
10248 return llvm::dyn_cast<clang::ObjCMethodDecl>(
10256 return llvm::dyn_cast<clang::CXXMethodDecl>(
10264 return llvm::dyn_cast<clang::FunctionDecl>(
10272 return llvm::dyn_cast<clang::NamespaceDecl>(
tools/lldb/source/Symbol/ClangASTImporter.cpp 129 if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
193 base = clang::dyn_cast<clang::DeclContext>(decl);
201 clang::dyn_cast<clang::DeclContext>(decl)) {
300 if (auto *tag_decl = dyn_cast<TagDecl>(decl)) {
301 if (auto *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
310 } else if (auto *container_decl = dyn_cast<ObjCContainerDecl>(decl)) {
327 RecordDecl *from_record_decl = dyn_cast<RecordDecl>(from);
332 NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
610 if (ObjCInterfaceDecl *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl)) {
616 dyn_cast<ObjCProtocolDecl>(decl)) {
619 } else if (TagDecl *tag_decl = dyn_cast<TagDecl>(decl)) {
720 TagDecl *origin_tag_decl = llvm::dyn_cast<TagDecl>(decl_origin.decl);
732 if (RecordDecl *record_decl = dyn_cast<RecordDecl>(origin_tag_decl)) {
751 llvm::dyn_cast<ObjCInterfaceDecl>(decl_origin.decl);
867 dyn_cast<NamespaceDecl>(parent_context);
964 if (clang::TagDecl *to_tag = dyn_cast<clang::TagDecl>(to)) {
965 if (clang::TagDecl *from_tag = dyn_cast<clang::TagDecl>(from)) {
971 if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
996 if (ObjCInterfaceDecl *to_objc_interface = dyn_cast<ObjCInterfaceDecl>(to)) {
1004 dyn_cast<ObjCInterfaceDecl>(from);
1024 dyn_cast<ObjCInterfaceDecl>(*imported_from_superclass_decl);
1055 if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
1122 dyn_cast<clang::NamespaceDecl>(to)) {
1124 dyn_cast<clang::NamespaceDecl>(from);
1145 if (TagDecl *from_tag_decl = dyn_cast<TagDecl>(from)) {
1146 TagDecl *to_tag_decl = dyn_cast<TagDecl>(to);
1161 NamespaceDecl *to_namespace_decl = dyn_cast<NamespaceDecl>(to);
1169 ObjCContainerDecl *to_container_decl = dyn_cast<ObjCContainerDecl>(to);
1178 llvm::dyn_cast<ObjCInterfaceDecl>(to_container_decl)) {
tools/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp 94 clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(
tools/lldb/source/Symbol/CxxModuleHandler.cpp 136 NamedDecl *ns = llvm::dyn_cast<NamedDecl>(foreign_ctxt);
141 if (DeclContext *DC = llvm::dyn_cast<DeclContext>(named_decl))
181 auto td = dyn_cast<ClassTemplateSpecializationDecl>(d);
217 if ((new_class_template = dyn_cast<ClassTemplateDecl>(LD)))
tools/lldb/source/Target/Target.cpp 2267 return llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get());
tools/lldb/unittests/tools/lldb-server/tests/TestClient.h 65 if (const auto *Reply = llvm::dyn_cast<T>(m_stop_reply.get()))
tools/lli/lli.cpp 622 dyn_cast<Function>(Exit.getCallee()->stripPointerCasts())) {
tools/llvm-cfi-verify/lib/FileAnalysis.cpp 84 Analysis.Object = dyn_cast<object::ObjectFile>(Analysis.Binary.getBinary());
567 if (auto *ElfObject = dyn_cast<object::ELFObjectFileBase>(Object)) {
tools/llvm-cvtres/llvm-cvtres.cpp 171 WindowsResource *RF = dyn_cast<WindowsResource>(&Binary);
tools/llvm-cxxdump/llvm-cxxdump.cpp 516 if (ObjectFile *Obj = dyn_cast<ObjectFile>(&*ChildOrErr.get()))
535 if (Archive *Arc = dyn_cast<Archive>(&Binary))
537 else if (ObjectFile *Obj = dyn_cast<ObjectFile>(&Binary))
tools/llvm-dis/llvm-dis.cpp 94 if (const Instruction *I = dyn_cast<Instruction>(&V)) {
105 if (const DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) {
112 else if (const DbgValueInst *DVI = dyn_cast<DbgValueInst>(I)) {
tools/llvm-dwarfdump/llvm-dwarfdump.cpp 265 if (auto *MachO = dyn_cast<MachOObjectFile>(&Obj)) {
491 if (auto *Obj = dyn_cast<ObjectFile>(BinOrErr->get())) {
497 else if (auto *Fat = dyn_cast<MachOUniversalBinary>(BinOrErr->get()))
517 else if (auto *Arch = dyn_cast<Archive>(BinOrErr->get()))
tools/llvm-elfabi/ELFObjHandler.cpp 377 if (auto Obj = dyn_cast<ELFObjectFile<ELF32LE>>(Bin)) {
379 } else if (auto Obj = dyn_cast<ELFObjectFile<ELF64LE>>(Bin)) {
381 } else if (auto Obj = dyn_cast<ELFObjectFile<ELF32BE>>(Bin)) {
383 } else if (auto Obj = dyn_cast<ELFObjectFile<ELF64BE>>(Bin)) {
tools/llvm-extract/llvm-extract.cpp 293 if (auto *F = dyn_cast<Function>(GV)) {
303 CallBase *CB = dyn_cast<CallBase>(&I);
tools/llvm-lipo/llvm-lipo.cpp 472 dyn_cast<MachOUniversalBinary>(InputBinaries.front().getBinary())) {
480 dyn_cast<MachOObjectFile>(InputBinaries.front().getBinary())) {
493 if (auto UO = dyn_cast<MachOUniversalBinary>(Binary)) {
631 if (auto UO = dyn_cast<MachOUniversalBinary>(InputBinary)) {
640 } else if (auto O = dyn_cast<MachOObjectFile>(InputBinary)) {
642 } else if (auto A = dyn_cast<Archive>(InputBinary)) {
750 auto O = dyn_cast<MachOObjectFile>(ReplacementBinary);
tools/llvm-lto/llvm-lto.cpp 343 if (auto *FuncSummary = dyn_cast<FunctionSummary>(Summary.get())) {
tools/llvm-nm/llvm-nm.cpp 333 if (auto *IRObj = dyn_cast<IRObjectFile>(&Obj))
339 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj))
367 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj);
797 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj);
1065 return !dyn_cast<ELFObjectFileBase>(&Obj)
1085 if (ELFObjectFileBase *ELFObj = dyn_cast<ELFObjectFileBase>(&Obj)) {
1126 else if (IRObjectFile *IR = dyn_cast<IRObjectFile>(&Obj))
1128 else if (COFFObjectFile *COFF = dyn_cast<COFFObjectFile>(&Obj))
1130 else if (COFFImportFile *COFFImport = dyn_cast<COFFImportFile>(&Obj))
1132 else if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj))
1134 else if (WasmObjectFile *Wasm = dyn_cast<WasmObjectFile>(&Obj))
1190 const auto *E = dyn_cast<ELFObjectFileBase>(&Obj);
1202 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj);
1748 auto *MachO = dyn_cast<MachOObjectFile>(O);
1792 if (Archive *A = dyn_cast<Archive>(&Bin)) {
1826 if (SymbolicFile *O = dyn_cast<SymbolicFile>(&*ChildOrErr.get())) {
1850 if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(&Bin)) {
1901 dyn_cast<SymbolicFile>(&*ChildOrErr.get())) {
1970 dyn_cast<SymbolicFile>(&*ChildOrErr.get())) {
2035 if (SymbolicFile *F = dyn_cast<SymbolicFile>(&*ChildOrErr.get())) {
2066 if (SymbolicFile *O = dyn_cast<SymbolicFile>(&Bin)) {
tools/llvm-objcopy/ELF/ELFObjcopy.cpp 193 if (auto *O = dyn_cast<ELFObjectFile<ELF32LE>>(&In))
195 else if (auto *O = dyn_cast<ELFObjectFile<ELF64LE>>(&In))
197 else if (auto *O = dyn_cast<ELFObjectFile<ELF32BE>>(&In))
199 else if (auto *O = dyn_cast<ELFObjectFile<ELF64BE>>(&In))
637 } else if (auto *RelocSec = dyn_cast<RelocationSectionBase>(&Sec)) {
tools/llvm-objcopy/ELF/Object.cpp 1435 if (T *Sec = dyn_cast<T>(getSection(Index, IndexErrMsg)))
1573 if (auto RelSec = dyn_cast<RelocationSection>(&Sec)) {
1581 } else if (auto GroupSec = dyn_cast<GroupSection>(&Sec)) {
1666 if (auto *O = dyn_cast<ELFObjectFile<ELF32LE>>(Bin)) {
1670 } else if (auto *O = dyn_cast<ELFObjectFile<ELF64LE>>(Bin)) {
1674 } else if (auto *O = dyn_cast<ELFObjectFile<ELF32BE>>(Bin)) {
1678 } else if (auto *O = dyn_cast<ELFObjectFile<ELF64BE>>(Bin)) {
1816 if (auto RelSec = dyn_cast<RelocationSectionBase>(Sec.get())) {
2097 if (auto StrTab = dyn_cast<StringTableSection>(&Sec))
tools/llvm-objcopy/llvm-objcopy.cpp 167 if (auto *ELFBinary = dyn_cast<object::ELFObjectFileBase>(&In)) {
171 } else if (auto *COFFBinary = dyn_cast<object::COFFObjectFile>(&In))
173 else if (auto *MachOBinary = dyn_cast<object::MachOObjectFile>(&In))
291 if (Archive *Ar = dyn_cast<Archive>(BinaryOrErr.get().getBinary())) {
tools/llvm-objdump/COFFDump.cpp 629 const COFFObjectFile *file = dyn_cast<const COFFObjectFile>(Obj);
tools/llvm-objdump/ELFDump.cpp 119 if (auto *ELF32LE = dyn_cast<ELF32LEObjectFile>(Obj))
121 if (auto *ELF64LE = dyn_cast<ELF64LEObjectFile>(Obj))
123 if (auto *ELF32BE = dyn_cast<ELF32BEObjectFile>(Obj))
148 if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(Sec.getObject()))
150 else if (const auto *ELFObj = dyn_cast<ELF32BEObjectFile>(Sec.getObject()))
152 else if (const auto *ELFObj = dyn_cast<ELF64LEObjectFile>(Sec.getObject()))
331 if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
333 else if (const auto *ELFObj = dyn_cast<ELF32BEObjectFile>(Obj))
335 else if (const auto *ELFObj = dyn_cast<ELF64LEObjectFile>(Obj))
337 else if (const auto *ELFObj = dyn_cast<ELF64BEObjectFile>(Obj))
342 if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
344 else if (const auto *ELFObj = dyn_cast<ELF32BEObjectFile>(Obj))
346 else if (const auto *ELFObj = dyn_cast<ELF64LEObjectFile>(Obj))
348 else if (const auto *ELFObj = dyn_cast<ELF64BEObjectFile>(Obj))
353 if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
355 else if (const auto *ELFObj = dyn_cast<ELF32BEObjectFile>(Obj))
357 else if (const auto *ELFObj = dyn_cast<ELF64LEObjectFile>(Obj))
359 else if (const auto *ELFObj = dyn_cast<ELF64BEObjectFile>(Obj))
tools/llvm-objdump/MachODump.cpp 1878 auto *MachO = dyn_cast<MachOObjectFile>(O);
2336 if (Archive *A = dyn_cast<Archive>(&Bin)) {
2351 if (MachOObjectFile *O = dyn_cast<MachOObjectFile>(&*ChildOrErr.get())) {
2361 if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(&Bin)) {
2365 if (ObjectFile *O = dyn_cast<ObjectFile>(&Bin)) {
2368 if (MachOObjectFile *MachOOF = dyn_cast<MachOObjectFile>(&*O))
2406 if (MachOObjectFile *MachOOF = dyn_cast<MachOObjectFile>(&O))
2435 dyn_cast<MachOObjectFile>(&*ChildOrErr.get()))
2471 if (MachOObjectFile *MachOOF = dyn_cast<MachOObjectFile>(&O))
2495 dyn_cast<MachOObjectFile>(&*ChildOrErr.get()))
2522 if (MachOObjectFile *MachOOF = dyn_cast<MachOObjectFile>(&Obj))
2548 dyn_cast<MachOObjectFile>(&*ChildOrErr.get())) {
2549 if (MachOObjectFile *MachOOF = dyn_cast<MachOObjectFile>(O))
7378 if (ObjectFile *O = dyn_cast<ObjectFile>(DSYMBinary.get())) {
7380 if (MachOObjectFile *MachDSYM = dyn_cast<MachOObjectFile>(&*O)) {
7389 else if (auto UB = dyn_cast<MachOUniversalBinary>(DSYMBinary.get())){
10213 const MachOObjectFile *file = dyn_cast<const MachOObjectFile>(Obj);
10218 const MachOObjectFile *file = dyn_cast<const MachOObjectFile>(Obj);
10468 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o))
10478 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o))
10488 if (const MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o))
10498 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o))
10508 if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o))
tools/llvm-objdump/WasmDump.cpp 21 const auto *File = dyn_cast<const WasmObjectFile>(Obj);
tools/llvm-objdump/llvm-objdump.cpp 497 if (auto *ELF = dyn_cast<ELFObjectFileBase>(Obj))
499 if (auto *COFF = dyn_cast<COFFObjectFile>(Obj))
501 if (auto *Wasm = dyn_cast<WasmObjectFile>(Obj))
503 if (auto *MachO = dyn_cast<MachOObjectFile>(Obj))
512 auto *MachO = dyn_cast<MachOObjectFile>(RelRef.getObject());
660 const auto *Elf = dyn_cast<ELFObjectFileBase>(Obj);
665 const auto *Elf = dyn_cast<ELFObjectFileBase>(Obj);
892 if (auto *Elf32LEObj = dyn_cast<ELF32LEObjectFile>(Obj))
894 if (auto *Elf64LEObj = dyn_cast<ELF64LEObjectFile>(Obj))
896 if (auto *Elf32BEObj = dyn_cast<ELF32BEObjectFile>(Obj))
934 if (auto *Elf32LEObj = dyn_cast<ELF32LEObjectFile>(Obj))
936 else if (auto *Elf64LEObj = dyn_cast<ELF64LEObjectFile>(Obj))
938 else if (auto *Elf32BEObj = dyn_cast<ELF32BEObjectFile>(Obj))
961 if (auto *ElfObj = dyn_cast<ELFObjectFileBase>(Obj)) {
1172 if (const auto *COFFObj = dyn_cast<COFFObjectFile>(Obj)) {
1247 if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(Obj)) {
1661 const auto *Elf = dyn_cast<ELFObjectFileBase>(Obj);
1801 if (const COFFObjectFile *Coff = dyn_cast<const COFFObjectFile>(O)) {
1869 dyn_cast<const MachOObjectFile>(O)) {
1917 if (const COFFObjectFile *Coff = dyn_cast<COFFObjectFile>(O))
1919 else if (const MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(O))
2093 if (const auto *Elf = dyn_cast<ELFObjectFileBase>(Obj)) {
2221 if (ObjectFile *O = dyn_cast<ObjectFile>(&*ChildOrErr.get()))
2223 else if (COFFImportFile *I = dyn_cast<COFFImportFile>(&*ChildOrErr.get()))
2247 if (Archive *A = dyn_cast<Archive>(&Binary))
2249 else if (ObjectFile *O = dyn_cast<ObjectFile>(&Binary))
2251 else if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(&Binary))
tools/llvm-pdbutil/PrettyTypeDumper.cpp 315 if (auto *FS = dyn_cast<PDBSymbolTypeFunctionSig>(P.get())) {
324 if (auto *UDT = dyn_cast<PDBSymbolTypeUDT>(P.get())) {
tools/llvm-pdbutil/llvm-pdbutil.cpp 994 OuterT *ConcreteOuter = dyn_cast<OuterT>(&Outer);
tools/llvm-rc/ResourceFileWriter.cpp 873 if (auto *IconRes = dyn_cast<IconResource>(Base)) {
877 auto *CursorRes = dyn_cast<CursorResource>(Base);
1181 if (auto *MenuItemPtr = dyn_cast<MenuItem>(DefPtr)) {
1351 if (auto *BlockPtr = dyn_cast<VersionInfoBlock>(ItemPtr)) {
tools/llvm-readobj/COFFDumper.cpp 246 const COFFObjectFile *COFFObj = dyn_cast<COFFObjectFile>(Obj);
tools/llvm-readobj/DwarfCFIEHPrinter.h 200 if (const auto *CIE = dyn_cast<dwarf::CIE>(&Entry)) {
221 } else if (const auto *FDE = dyn_cast<dwarf::FDE>(&Entry)) {
tools/llvm-readobj/ELFDumper.cpp 623 if (const ELF32LEObjectFile *ELFObj = dyn_cast<ELF32LEObjectFile>(Obj))
627 if (const ELF32BEObjectFile *ELFObj = dyn_cast<ELF32BEObjectFile>(Obj))
631 if (const ELF64LEObjectFile *ELFObj = dyn_cast<ELF64LEObjectFile>(Obj))
635 if (const ELF64BEObjectFile *ELFObj = dyn_cast<ELF64BEObjectFile>(Obj))
tools/llvm-readobj/MachODumper.cpp 74 const MachOObjectFile *MachOObj = dyn_cast<MachOObjectFile>(Obj);
tools/llvm-readobj/WasmDumper.cpp 249 const auto *WasmObj = dyn_cast<WasmObjectFile>(Obj);
tools/llvm-readobj/XCOFFDumper.cpp 537 const XCOFFObjectFile *XObj = dyn_cast<XCOFFObjectFile>(Obj);
tools/llvm-readobj/llvm-readobj.cpp 561 if (ObjectFile *Obj = dyn_cast<ObjectFile>(&*ChildOrErr.get()))
563 else if (COFFImportFile *Imp = dyn_cast<COFFImportFile>(&*ChildOrErr.get()))
604 if (Archive *Arc = dyn_cast<Archive>(&Binary))
607 dyn_cast<MachOUniversalBinary>(&Binary))
609 else if (ObjectFile *Obj = dyn_cast<ObjectFile>(&Binary))
611 else if (COFFImportFile *Import = dyn_cast<COFFImportFile>(&Binary))
613 else if (WindowsResource *WinRes = dyn_cast<WindowsResource>(&Binary))
tools/llvm-reduce/deltas/ReduceArguments.cpp 27 if (auto *CI = dyn_cast<CallInst>(*I++)) {
70 if (auto *I = dyn_cast<Instruction>(*&U))
tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp 41 if (auto IndBI = dyn_cast<IndirectBrInst>(Term))
111 if (auto *SwInst = dyn_cast<SwitchInst>(BB.getTerminator()))
tools/llvm-reduce/deltas/ReduceFunctions.cpp 43 if (auto *Call = dyn_cast<CallInst>(U)) {
tools/llvm-reduce/deltas/ReduceGlobalVars.cpp 39 if (auto *Inst = dyn_cast<Instruction>(U))
tools/llvm-size/llvm-size.cpp 369 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(Obj);
513 auto *MachO = dyn_cast<MachOObjectFile>(O);
549 if (Archive *a = dyn_cast<Archive>(&Bin)) {
559 if (ObjectFile *o = dyn_cast<ObjectFile>(&*ChildOrErr.get())) {
560 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
579 dyn_cast<MachOUniversalBinary>(&Bin)) {
593 if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) {
594 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
631 if (ObjectFile *o = dyn_cast<ObjectFile>(&*ChildOrErr.get())) {
632 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
684 if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) {
685 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
718 if (ObjectFile *o = dyn_cast<ObjectFile>(&*ChildOrErr.get())) {
719 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
759 if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) {
760 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
795 if (ObjectFile *o = dyn_cast<ObjectFile>(&*ChildOrErr.get())) {
796 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
825 } else if (ObjectFile *o = dyn_cast<ObjectFile>(&Bin)) {
828 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
tools/obj2yaml/elf2yaml.cpp 985 if (const auto *ELFObj = dyn_cast<object::ELF32LEObjectFile>(&Obj))
988 if (const auto *ELFObj = dyn_cast<object::ELF32BEObjectFile>(&Obj))
991 if (const auto *ELFObj = dyn_cast<object::ELF64LEObjectFile>(&Obj))
994 if (const auto *ELFObj = dyn_cast<object::ELF64BEObjectFile>(&Obj))
tools/obj2yaml/macho2yaml.cpp 547 if (const auto *MachOObj = dyn_cast<object::MachOUniversalBinary>(&Binary)) {
554 if (const auto *MachOObj = dyn_cast<object::MachOObjectFile>(&Binary)) {
tools/obj2yaml/obj2yaml.cpp 47 if (ObjectFile *Obj = dyn_cast<ObjectFile>(&Binary))
49 if (MinidumpFile *Minidump = dyn_cast<MinidumpFile>(&Binary))
tools/opt/AnalysisWrappers.cpp 40 Instruction *UI = dyn_cast<Instruction>(U);
tools/opt/BreakpointPrinter.cpp 31 if (auto *NS = dyn_cast<DINamespace>(Context)) {
36 } else if (auto *TY = dyn_cast<DIType>(Context)) {
tools/opt/Debugify.cpp 263 auto *DVI = dyn_cast<DbgValueInst>(&I);
tools/polly/lib/Analysis/ScopBuilder.cpp 434 if (auto Load = dyn_cast<LoadInst>(Condition)) {
443 } else if (auto *PHI = dyn_cast<PHINode>(Condition)) {
444 auto *Unique = dyn_cast<ConstantInt>(
451 } else if (auto *CCond = dyn_cast<ConstantInt>(Condition)) {
456 } else if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Condition)) {
480 auto *ICond = dyn_cast<ICmpInst>(Condition);
565 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI))
750 BranchInst *BI = dyn_cast<BranchInst>(TI);
1102 auto *OpInst = dyn_cast<Instruction>(Op);
1329 PointerType *PTy = dyn_cast<PointerType>(V->getType());
1336 auto *StructArrTy = dyn_cast<StructType>(Ty);
1360 ArrayType *DescriptorDimArrayTy = dyn_cast<ArrayType>(ArrMemberTys[3]);
1366 dyn_cast<StructType>(DescriptorDimArrayTy->getElementType());
1398 if (auto *Slot = dyn_cast<GetElementPtrInst>(Address)) {
1401 Bitcast = dyn_cast<BitCastInst>(TypedMem);
1404 Bitcast = dyn_cast<BitCastInst>(Address);
1413 auto *MallocCall = dyn_cast<CallInst>(MallocMem);
1426 auto *MallocStore = dyn_cast<StoreInst>(user);
1431 dyn_cast<GEPOperator>(MallocStore->getPointerOperand());
1437 dyn_cast<StructType>(DescriptorGEP->getSourceElementType());
1441 Value *Descriptor = dyn_cast<Value>(DescriptorGEP->getPointerOperand());
1464 if (auto *SlotGEP = dyn_cast<GetElementPtrInst>(Slot)) {
1466 MemLoad = dyn_cast<LoadInst>(SlotGEP->getPointerOperand());
1469 MemLoad = dyn_cast<LoadInst>(Slot);
1476 dyn_cast<BitCastOperator>(MemLoad->getPointerOperand());
1480 Value *Descriptor = dyn_cast<Value>(BitcastOperator->getOperand(0));
1607 dyn_cast<SCEVUnknown>(SE.getPointerBase(AccessFunction));
1611 if (auto *BitCast = dyn_cast<BitCastInst>(Address)) {
1626 auto *GEP = dyn_cast<GetElementPtrInst>(Address);
1635 if (auto *BasePtrCast = dyn_cast<BitCastInst>(BasePtr))
1687 dyn_cast<SCEVUnknown>(SE.getPointerBase(AccessFunction));
1760 auto *DestPtrSCEV = dyn_cast<SCEVUnknown>(SE.getPointerBase(DestAccFunc));
1768 auto *MemTrans = dyn_cast<MemTransferInst>(MemIntr);
1782 auto *SrcPtrSCEV = dyn_cast<SCEVUnknown>(SE.getPointerBase(SrcAccFunc));
1852 dyn_cast<SCEVUnknown>(SE.getPointerBase(AccessFunction));
2002 Instruction *OpInst = dyn_cast<Instruction>(Op.get());
2076 PHINode *PHI = dyn_cast<PHINode>(Inst);
2085 dyn_cast<Instruction>(PHI->getIncomingValue(Idx));
2224 PHINode *PHI = dyn_cast<PHINode>(Inst);
2328 if (auto *MulExpr = dyn_cast<SCEVMulExpr>(Expr)) {
2337 if (auto *NAryExpr = dyn_cast<SCEVNAryExpr>(Expr)) {
2731 dyn_cast<const LoadInst>(CandidatePair.first->getAccessInstruction());
2733 getReductionType(dyn_cast<BinaryOperator>(Load->user_back()), Load);
2808 if (auto *BasePtrInst = dyn_cast<Instruction>(BaseAddr))
3091 auto *Store = dyn_cast<StoreInst>(StoreMA->getAccessInstruction());
3096 auto *BinOp = dyn_cast<BinaryOperator>(Store->getValueOperand());
3119 auto *PossibleLoad0 = dyn_cast<LoadInst>(BinOp->getOperand(0));
3120 auto *PossibleLoad1 = dyn_cast<LoadInst>(BinOp->getOperand(1));
3613 LoadInst *Load = dyn_cast<LoadInst>(&Inst);
3641 PHINode *PHI = dyn_cast<PHINode>(&Inst);
tools/polly/lib/Analysis/ScopDetection.cpp 495 if (auto *P2I = dyn_cast<PtrToIntInst>(V))
505 auto *BasePtr = dyn_cast<SCEVUnknown>(SE.getPointerBase(PtrSCEV));
563 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Condition)) {
573 if (auto PHI = dyn_cast<PHINode>(Condition)) {
580 if (auto Load = dyn_cast<LoadInst>(Condition))
659 if (BranchInst *BI = dyn_cast<BranchInst>(TI))
662 SwitchInst *SI = dyn_cast<SwitchInst>(TI);
676 if (auto *II = dyn_cast<IntrinsicInst>(&CI))
717 auto *BP = dyn_cast<SCEVUnknown>(SE.getPointerBase(ArgSCEV));
758 BP = dyn_cast<SCEVUnknown>(SE.getPointerBase(AF));
767 BP = dyn_cast<SCEVUnknown>(SE.getPointerBase(AF));
792 Instruction *I = dyn_cast<Instruction>(&Val);
802 if (auto LI = dyn_cast<LoadInst>(I)) {
870 if (auto *AF = dyn_cast<SCEVAddExpr>(Pair.second)) {
872 if (auto *AF2 = dyn_cast<SCEVAddRecExpr>(Op))
874 if (auto *AF2 = dyn_cast<SCEVMulExpr>(Op)) {
878 if (auto *Const = dyn_cast<SCEVConstant>(MulOp))
880 if (auto *Unknown = dyn_cast<SCEVUnknown>(MulOp)) {
881 if (auto *Inst = dyn_cast<Instruction>(Unknown->getValue())) {
923 if (auto *Unknown = dyn_cast<SCEVUnknown>(DelinearizedSize)) {
924 auto *V = dyn_cast<Value>(Unknown->getValue());
925 if (auto *Load = dyn_cast<LoadInst>(V)) {
1066 if (IntToPtrInst *Inst = dyn_cast<IntToPtrInst>(BV))
1148 Instruction *Inst = dyn_cast<Instruction>(Ptr.getValue());
1150 auto *Load = dyn_cast<LoadInst>(Inst);
1187 BasePointer = dyn_cast<SCEVUnknown>(SE.getPointerBase(AccessFunction));
1195 auto *OpInst = dyn_cast<Instruction>(&Op);
1201 auto *PHI = dyn_cast<PHINode>(OpInst);
1204 auto *UI = dyn_cast<Instruction>(U);
1218 if (CallInst *CI = dyn_cast<CallInst>(&Inst)) {
1345 if (auto *TripCountC = dyn_cast<SCEVConstant>(TripCount))
tools/polly/lib/Analysis/ScopInfo.cpp 201 LoadInst *BasePtrLI = dyn_cast<LoadInst>(BasePtr);
215 auto *OriginBaseSCEVUnknown = dyn_cast<SCEVUnknown>(OriginBaseSCEV);
425 auto *DimSizeCst = dyn_cast<SCEVConstant>(DimSize);
1436 if (auto *AddRec = dyn_cast<SCEVAddRecExpr>(E)) {
1438 } else if (auto *Unknown = dyn_cast<SCEVUnknown>(E)) {
1439 if (Instruction *I = dyn_cast<Instruction>(Unknown->getValue()))
1497 if (const SCEVUnknown *ValueParameter = dyn_cast<SCEVUnknown>(Parameter)) {
1499 CallInst *Call = dyn_cast<CallInst>(Val);
1509 else if (LoadInst *LI = dyn_cast<LoadInst>(Val)) {
1795 LoadInst *LInst = dyn_cast<LoadInst>(Val);
1988 auto *PointerBaseInst = dyn_cast<Instruction>(PointerBase);
2434 if (auto *IncomingInst = dyn_cast<Instruction>(U.get())) {
2514 Instruction *Val = dyn_cast<Instruction>(SAI->getBasePtr());
tools/polly/lib/CodeGen/BlockGenerators.cpp 368 if (auto *Load = dyn_cast<LoadInst>(Inst)) {
376 if (auto *Store = dyn_cast<StoreInst>(Inst)) {
385 if (auto *PHI = dyn_cast<PHINode>(Inst)) {
535 Instruction *UI = dyn_cast<Instruction>(U);
626 if (auto *Const = dyn_cast<ConstantInt>(Cond))
641 if (auto *CondInst = dyn_cast<Instruction>(Cond))
721 auto *OpInst = dyn_cast<Instruction>(Op);
842 auto *Inst = dyn_cast<Instruction>(Array->getBasePtr());
914 auto *Inst = dyn_cast<Instruction>(Array->getBasePtr());
952 PHINode *PHI = dyn_cast<PHINode>(Val);
1040 PointerType *PointerTy = dyn_cast<PointerType>(Val->getType());
1108 dyn_cast<PointerType>(Pointer->getType())->getElementType(), VectorWidth);
1168 const CastInst *Cast = dyn_cast<CastInst>(Inst);
1302 if (auto *Load = dyn_cast<LoadInst>(Inst)) {
1308 if (auto *Store = dyn_cast<StoreInst>(Inst)) {
1317 if (auto *Unary = dyn_cast<UnaryInstruction>(Inst)) {
1322 if (auto *Binary = dyn_cast<BinaryOperator>(Inst)) {
tools/polly/lib/CodeGen/CodeGeneration.cpp 152 if (auto *IT = dyn_cast<IntrinsicInst>(&*InstIt)) {
tools/polly/lib/CodeGen/IRBuilder.cpp 216 auto *SU = dyn_cast<SCEVUnknown>(BaseSCEV);
tools/polly/lib/CodeGen/IslExprBuilder.cpp 417 if (auto *Const = dyn_cast<ConstantInt>(RHS)) {
tools/polly/lib/CodeGen/IslNodeBuilder.cpp 251 if (Instruction *OpInst = dyn_cast<Instruction>(BasePtr))
851 dyn_cast<Instruction>(MA->getLatestScopArrayInfo()->getBasePtr());
1050 if (auto *Inst = dyn_cast<Instruction>(Val)) {
1152 Type *endType = dyn_cast<IntegerType>(end->getType());
1215 if (LoadInst *PreloadInst = dyn_cast<LoadInst>(PreloadVal))
1217 MaybeAlign(dyn_cast<LoadInst>(AccInst)->getAlignment()));
1430 if (Instruction *UI = dyn_cast<Instruction>(U))
tools/polly/lib/CodeGen/LoopGenerators.cpp 92 IntegerType *LoopIVType = dyn_cast<IntegerType>(UB->getType());
tools/polly/lib/CodeGen/RuntimeDebugBuilder.cpp 209 } else if (auto PtTy = dyn_cast<PointerType>(Ty)) {
tools/polly/lib/Exchange/JSONExporter.cpp 449 if (LoadInst *LoadI = dyn_cast<LoadInst>(MA->getAccessInstruction())) {
454 dyn_cast<StoreInst>(MA->getAccessInstruction())) {
tools/polly/lib/Support/SCEVAffinator.cpp 62 if (auto *NAry = dyn_cast<SCEVNAryExpr>(Expr))
169 auto *AddRec = dyn_cast<SCEVAddRecExpr>(CachedPair.first.first);
184 if (auto *NAry = dyn_cast<SCEVNAryExpr>(Expr))
531 if (Instruction *I = dyn_cast<Instruction>(Expr->getValue())) {
tools/polly/lib/Support/SCEVValidator.cpp 421 auto *CI = dyn_cast<ConstantInt>(Divisor);
443 if (Instruction *I = dyn_cast<Instruction>(Expr->getValue())) {
473 const SCEVUnknown *Unknown = dyn_cast<SCEVUnknown>(S);
477 CallInst *Call = dyn_cast<CallInst>(Unknown->getValue());
508 if (auto Unknown = dyn_cast<SCEVUnknown>(S)) {
509 Instruction *Inst = dyn_cast<Instruction>(Unknown->getValue());
511 CallInst *Call = dyn_cast<CallInst>(Unknown->getValue());
525 LoadInst *LI = dyn_cast<LoadInst>(Inst);
538 if (auto AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
564 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(S))
587 const SCEVUnknown *Unknown = dyn_cast<SCEVUnknown>(S);
592 Instruction *Inst = dyn_cast<Instruction>(Unknown->getValue());
679 if (auto *ICmp = dyn_cast<ICmpInst>(V)) {
683 } else if (auto *BinOp = dyn_cast<BinaryOperator>(V)) {
716 if (auto *Constant = dyn_cast<SCEVConstant>(S))
719 auto *AddRec = dyn_cast<SCEVAddRecExpr>(S);
732 if (auto *Add = dyn_cast<SCEVAddExpr>(S)) {
758 auto *Mul = dyn_cast<SCEVMulExpr>(S);
775 if (auto *Unknown = dyn_cast<SCEVUnknown>(Expr)) {
777 auto *PHI = dyn_cast<PHINode>(V);
tools/polly/lib/Support/ScopHelper.cpp 302 Instruction *Inst = dyn_cast<Instruction>(E->getValue());
430 if (CallInst *CI = dyn_cast<CallInst>(&Inst)) {
451 if (BranchInst *BR = dyn_cast<BranchInst>(TI)) {
458 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI))
562 if (auto *GepInst = dyn_cast<GetElementPtrInst>(Ptr)) {
565 dyn_cast<LoadInst>(GepInst->getPointerOperand())) {
580 auto *UserI = dyn_cast<Instruction>(User);
611 if (auto *IT = dyn_cast<IntrinsicInst>(V)) {
651 Instruction *UI = dyn_cast<Instruction>(U.getUser());
655 if (PHINode *PHI = dyn_cast<PHINode>(UI))
675 if (auto *PtrTy = dyn_cast<PointerType>(Ty)) {
677 } else if (auto *ArrayTy = dyn_cast<ArrayType>(Ty)) {
684 if (auto *Const = dyn_cast<SCEVConstant>(Expr))
693 auto *ArrayTy = dyn_cast<ArrayType>(Ty);
725 auto *CI = dyn_cast<CallInst>(Inst);
tools/polly/lib/Support/VirtualInstruction.cpp 23 Instruction *UI = dyn_cast<Instruction>(U.getUser());
28 if (PHINode *PHI = dyn_cast<PHINode>(UI)) {
75 if (S->lookupInvariantEquivClass(Val) || RIL.count(dyn_cast<LoadInst>(Val)))
385 PHINode *PHI = dyn_cast<PHINode>(Inst);
tools/polly/lib/Transform/ForwardOpTree.cpp 400 LoadInst *LI = dyn_cast<LoadInst>(Inst);
tools/polly/lib/Transform/RewriteByReferenceParameters.cpp 41 auto *Call = dyn_cast<CallInst>(&Inst);
56 auto *BitCast = dyn_cast<BitCastInst>(Call->getOperand(1));
61 auto *Alloca = dyn_cast<AllocaInst>(BitCast->getOperand(0));
tools/polly/lib/Transform/ZoneAlgo.cpp 434 if (auto *Memset = dyn_cast<MemSetInst>(AccInst)) {
435 auto *WrittenConstant = dyn_cast<Constant>(Memset->getValue());
523 auto *IncomingPHI = dyn_cast<PHINode>(IncomingVal);
855 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(
931 auto *PHI = dyn_cast<PHINode>(static_cast<Value *>(OutTupleId.get_user()));
tools/sancov/sancov.cpp 358 yaml::ScalarNode *S = dyn_cast<yaml::ScalarNode>(N);
379 yaml::MappingNode *Top = dyn_cast<yaml::MappingNode>(Root);
387 dyn_cast<yaml::SequenceNode>(KVNode.getValue());
397 dyn_cast<yaml::MappingNode>(KVNode.getValue());
404 dyn_cast<yaml::MappingNode>(FileKVNode.getValue());
411 dyn_cast<yaml::MappingNode>(FunctionKVNode.getValue());
664 if (const auto *CO = dyn_cast<object::COFFObjectFile>(&O)) {
680 if (const auto *MO = dyn_cast<object::MachOObjectFile>(&O)) {
783 if (auto *O = dyn_cast<object::ObjectFile>(&*ChildOrErr.get()))
800 if (object::Archive *A = dyn_cast<object::Archive>(&Binary))
802 else if (object::ObjectFile *O = dyn_cast<object::ObjectFile>(&Binary))
tools/verify-uselistorder/verify-uselistorder.cpp 238 if (auto *C = dyn_cast<Constant>(V))
388 if (auto *C = dyn_cast<Constant>(V))
430 if (auto *C = dyn_cast<Constant>(V))
unittests/Analysis/DomTreeUpdaterTest.cpp 71 SwitchInst *SI = dyn_cast<SwitchInst>(BB0->getTerminator());
646 SwitchInst *SI = dyn_cast<SwitchInst>(BB0->getTerminator());
unittests/Analysis/IVDescriptorsTest.cpp 82 PHINode *Inst_i = dyn_cast<PHINode>(&Header->front());
unittests/Analysis/LazyCallGraphTest.cpp 1138 CallInst *CI = dyn_cast<CallInst>(U);
unittests/Analysis/LoopInfoTest.cpp 264 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
275 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
322 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
333 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
380 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
391 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
438 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
449 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
496 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
507 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
555 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
566 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
613 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
624 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
668 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
679 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
726 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
742 dyn_cast<ConstantInt>(&Bounds->getFinalIVValue());
784 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
796 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
844 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
855 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
904 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
915 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
975 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
1027 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
1073 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
1084 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
1142 BranchInst *OuterGuard = dyn_cast<BranchInst>(Entry->getTerminator());
1147 BranchInst *InnerGuard = dyn_cast<BranchInst>(Header->getTerminator());
1154 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
1179 dyn_cast<ConstantInt>(&InnerBounds->getInitialIVValue());
1234 BranchInst *Guard = dyn_cast<BranchInst>(Entry->getTerminator());
1245 dyn_cast<ConstantInt>(&Bounds->getInitialIVValue());
unittests/Analysis/MemorySSATest.cpp 177 dyn_cast<MemoryPhi>(SecondLoadAccess->getDefiningAccess());
192 MergePhi = dyn_cast<MemoryPhi>(SecondLoadAccess->getDefiningAccess());
unittests/Analysis/ScalarEvolutionTest.cpp 1556 EXPECT_TRUE(dyn_cast<ConstantInt>(Start)->isZero());
1559 auto *NextBinOp = dyn_cast<BinaryOperator>(Next);
1564 EXPECT_TRUE(dyn_cast<ConstantInt>(Step)->isOne());
unittests/Analysis/SparsePropagation.cpp 114 if (auto *C = dyn_cast<Constant>(Key.getPointer()))
205 auto *GV = dyn_cast<GlobalVariable>(I.getPointerOperand());
unittests/Analysis/ValueTrackingTest.cpp 941 GlobalVariable *GV = dyn_cast<GlobalVariable>(M->getNamedValue("test"));
unittests/IR/ConstantsTest.cpp 427 ASSERT_TRUE(dyn_cast<ConstantDataArray>(CDV) != nullptr)
436 ASSERT_TRUE(dyn_cast<ConstantDataArray>(CDV) != nullptr)
449 ASSERT_TRUE(dyn_cast<ConstantDataVector>(CDV) != nullptr)
457 ASSERT_TRUE(dyn_cast<ConstantDataVector>(CDV) != nullptr)
unittests/IR/IRBuilderTest.cpp 319 IntrinsicInst *II_Start1 = dyn_cast<IntrinsicInst>(Start1);
320 IntrinsicInst *II_End1 = dyn_cast<IntrinsicInst>(End1);
unittests/Support/Casting.cpp 70 return dyn_cast<foo>(this);
170 const foo *F1 = dyn_cast<foo>(B2);
172 const foo *F2 = dyn_cast<foo>(B2);
174 const foo *F3 = dyn_cast<foo>(B4);
285 Base *BP = dyn_cast<Base>(&D);
unittests/Support/YAMLIOTest.cpp 2964 auto seq = llvm::dyn_cast<Seq>(node.get());
2967 auto first = llvm::dyn_cast<Scalar>((*seq)[0].get());
2971 auto second = llvm::dyn_cast<Scalar>((*seq)[1].get());
2996 auto map = llvm::dyn_cast<Map>(node.get());
2998 auto foo = llvm::dyn_cast<Scalar>((*map)["foo"].get());
3002 auto bar = llvm::dyn_cast<Scalar>((*map)["bar"].get());
unittests/Support/YAMLParserTest.cpp 193 = dyn_cast<yaml::SequenceNode>(Stream.begin()->getRoot());
195 = dyn_cast<yaml::ScalarNode>(
230 = dyn_cast<yaml::SequenceNode>(Stream.begin()->getRoot());
266 yaml::SequenceNode *Node = dyn_cast<yaml::SequenceNode>(
281 yaml::SequenceNode *Node = dyn_cast<yaml::SequenceNode>(
297 yaml::SequenceNode *Node = dyn_cast<yaml::SequenceNode>(
299 yaml::SequenceNode *AnotherNode = dyn_cast<yaml::SequenceNode>(
318 yaml::SequenceNode *Node = dyn_cast<yaml::SequenceNode>(
320 yaml::SequenceNode *AnotherNode = dyn_cast<yaml::SequenceNode>(
unittests/Transforms/Utils/CloningTest.cpp 613 if (DbgDeclareInst* OldIntrin = dyn_cast<DbgDeclareInst>(&OldI)) {
614 DbgDeclareInst* NewIntrin = dyn_cast<DbgDeclareInst>(&NewI);
636 } else if (DbgValueInst* OldIntrin = dyn_cast<DbgValueInst>(&OldI)) {
637 DbgValueInst* NewIntrin = dyn_cast<DbgValueInst>(&NewI);
837 DICompileUnit *CU = dyn_cast<llvm::DICompileUnit>(NMD->getOperand(0));
unittests/Transforms/Utils/IntegerDivisionTest.cpp 48 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
78 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
108 Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
138 Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
169 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
199 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
229 Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
259 Instruction* Remainder = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0));
unittests/Transforms/Utils/LocalTest.cpp 145 auto *F = dyn_cast<Function>(GV);
148 auto *AI = dyn_cast<AllocaInst>(Inst);
152 auto *DII = dyn_cast<DbgDeclareInst>(Inst);
219 BranchInst *Term = dyn_cast<BranchInst>(SinglePred->getTerminator());
521 F = dyn_cast<Function>(GV);
552 auto DI = dyn_cast<DbgValueInst>(&I);
unittests/Transforms/Vectorize/VPlanHCFGTest.cpp 55 VPInstruction *Phi = dyn_cast<VPInstruction>(&*Iter++);
58 VPInstruction *Idx = dyn_cast<VPInstruction>(&*Iter++);
63 VPInstruction *Load = dyn_cast<VPInstruction>(&*Iter++);
68 VPInstruction *Add = dyn_cast<VPInstruction>(&*Iter++);
73 VPInstruction *Store = dyn_cast<VPInstruction>(&*Iter++);
79 VPInstruction *IndvarAdd = dyn_cast<VPInstruction>(&*Iter++);
84 VPInstruction *ICmp = dyn_cast<VPInstruction>(&*Iter++);
136 auto *Phi = dyn_cast<VPWidenPHIRecipe>(&*Iter++);
139 auto *Idx = dyn_cast<VPWidenRecipe>(&*Iter++);
142 auto *Load = dyn_cast<VPWidenMemoryInstructionRecipe>(&*Iter++);
145 auto *Add = dyn_cast<VPWidenRecipe>(&*Iter++);
148 auto *Store = dyn_cast<VPWidenMemoryInstructionRecipe>(&*Iter++);
151 auto *LastWiden = dyn_cast<VPWidenRecipe>(&*Iter++);
utils/TableGen/AsmMatcherEmitter.cpp 1169 if (DefInit *DI= dyn_cast<DefInit>(R->getValue())) {
1312 if (StringInit *SI = dyn_cast<StringInit>(DiagnosticType))
1316 if (StringInit *SI = dyn_cast<StringInit>(DiagnosticString))
1363 DefInit *DI = dyn_cast<DefInit>(I);
1381 if (StringInit *SI = dyn_cast<StringInit>(PMName)) {
1390 if (StringInit *SI = dyn_cast<StringInit>(RMName)) {
1399 if (StringInit *SI = dyn_cast<StringInit>(PRMName))
1404 if (StringInit *SI = dyn_cast<StringInit>(DiagnosticType))
1407 if (StringInit *SI = dyn_cast<StringInit>(DiagnosticString))
1415 if (BitInit *BI = dyn_cast<BitInit>(IsOptional))
1420 if (StringInit *SI = dyn_cast<StringInit>(DMName)) {
utils/TableGen/AsmWriterEmitter.cpp 1121 if (CodeInit *SI = dyn_cast<CodeInit>(MCOpPred)) {
utils/TableGen/CodeEmitterGen.cpp 68 if (VarBitInit *VBI = dyn_cast<VarBitInit>(BI->getBit(bit))) {
69 if (VarInit *VI = dyn_cast<VarInit>(VBI->getBitVar()))
72 } else if (VarInit *VI = dyn_cast<VarInit>(BI->getBit(bit))) {
379 if (BitInit *B = dyn_cast<BitInit>(BI->getBit(e - i - 1)))
utils/TableGen/CodeGenDAGPatterns.cpp 977 IntInit *IntVal = dyn_cast<IntInit>(Val);
1330 DefInit *DI = dyn_cast<DefInit>(P->getLeafValue());
1772 if (DagInit *Dag = dyn_cast<DagInit>(I))
1773 if (DefInit *DI = dyn_cast<DefInit>(Dag->getOperator()))
1871 if (DefInit *DI = dyn_cast<DefInit>(getLeafValue())) {
1872 if (DefInit *NDI = dyn_cast<DefInit>(N->getLeafValue())) {
2223 DefInit *DI = dyn_cast<DefInit>(getLeafValue());
2242 DefInit *DI = dyn_cast<DefInit>(getLeafValue());
2306 DefInit *DI = dyn_cast<DefInit>(N->getLeafValue());
2337 if (DefInit *DI = dyn_cast<DefInit>(getLeafValue())) {
2347 if (IntInit *II = dyn_cast<IntInit>(getLeafValue())) {
2700 if (DefInit *DI = dyn_cast<DefInit>(TheInit)) {
2742 if (BitsInit *BI = dyn_cast<BitsInit>(TheInit)) {
2750 DagInit *Dag = dyn_cast<DagInit>(TheInit);
2755 DefInit *OpDef = dyn_cast<DefInit>(Dag->getOperator());
2952 DefInit *DI = dyn_cast<DefInit>(Node->getLeafValue());
3128 DefInit *OpsOp = dyn_cast<DefInit>(OpsList->getOperator());
3242 DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
3252 DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
3321 DefInit *Val = dyn_cast<DefInit>(Dest->getLeafValue());
3368 DefInit *Val = dyn_cast<DefInit>(Dest->getLeafValue());
3439 if (DefInit *DI = dyn_cast<DefInit>(N->getLeafValue())) {
3543 DefInit *OpDef = dyn_cast<DefInit>(DI->getOperator());
3551 DagInit *Arg = dyn_cast<DagInit>(DI->getArg(i));
3563 DagInit *DI = dyn_cast<DagInit>(I);
3863 if (DefInit *Pred = dyn_cast<DefInit>(I))
4544 if (DefInit *DI = dyn_cast<DefInit>(Child->getLeafValue())) {
utils/TableGen/CodeGenInstruction.cpp 34 if (DefInit *Init = dyn_cast<DefInit>(OutDI->getOperator())) {
46 if (DefInit *Init = dyn_cast<DefInit>(InDI->getOperator())) {
70 DefInit *Arg = dyn_cast<DefInit>(ArgInit);
510 if (DefInit *Constraint = dyn_cast<DefInit>(ConstraintList->getArg(i))) {
532 DefInit *ADI = dyn_cast<DefInit>(Arg);
606 if (IntInit *II = dyn_cast<IntInit>(Arg)) {
618 if (BitsInit *BI = dyn_cast<BitsInit>(Arg)) {
672 DefInit *DI = dyn_cast<DefInit>(Result->getOperator());
683 DefInit *ADI = dyn_cast<DefInit>(Result->getArg(i));
utils/TableGen/CodeGenSchedule.cpp 90 StringInit *SI = dyn_cast<StringInit>(Arg);
utils/TableGen/DAGISelMatcher.cpp 350 if (const CheckOpcodeMatcher *COM = dyn_cast<CheckOpcodeMatcher>(M)) {
360 if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M)) {
374 if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M))
380 if (const CheckChildTypeMatcher *CC = dyn_cast<CheckChildTypeMatcher>(M)) {
392 if (const CheckIntegerMatcher *CIM = dyn_cast<CheckIntegerMatcher>(M))
398 if (const CheckChildIntegerMatcher *CCIM = dyn_cast<CheckChildIntegerMatcher>(M)) {
410 if (const CheckValueTypeMatcher *CVT = dyn_cast<CheckValueTypeMatcher>(M))
utils/TableGen/DAGISelMatcherEmitter.cpp 439 if (const SwitchOpcodeMatcher *SOM = dyn_cast<SwitchOpcodeMatcher>(N)) {
456 if (const SwitchOpcodeMatcher *SOM = dyn_cast<SwitchOpcodeMatcher>(N)) {
495 if (const SwitchOpcodeMatcher *SOM = dyn_cast<SwitchOpcodeMatcher>(N))
703 if (const MorphNodeToMatcher *SNT = dyn_cast<MorphNodeToMatcher>(N)) {
754 if (const EmitNodeMatcher *E = dyn_cast<EmitNodeMatcher>(EN)) {
764 if (const MorphNodeToMatcher *SNT = dyn_cast<MorphNodeToMatcher>(N)) {
985 if (const ScopeMatcher *SM = dyn_cast<ScopeMatcher>(M)) {
989 dyn_cast<SwitchOpcodeMatcher>(M)) {
992 } else if (const SwitchTypeMatcher *STM = dyn_cast<SwitchTypeMatcher>(M)) {
utils/TableGen/DAGISelMatcherGen.cpp 206 if (IntInit *II = dyn_cast<IntInit>(N->getLeafValue())) {
224 DefInit *DI = dyn_cast<DefInit>(N->getLeafValue());
344 if (IntInit *II = dyn_cast<IntInit>(N->getChild(1)->getLeafValue())) {
671 if (IntInit *II = dyn_cast<IntInit>(N->getLeafValue())) {
678 if (DefInit *DI = dyn_cast<DefInit>(N->getLeafValue())) {
utils/TableGen/DAGISelMatcherOpt.cpp 31 if (ScopeMatcher *Scope = dyn_cast<ScopeMatcher>(N)) {
42 if (MoveChildMatcher *MC = dyn_cast<MoveChildMatcher>(N)) {
44 if (RecordMatcher *RM = dyn_cast<RecordMatcher>(MC->getNext()))
49 if (CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(MC->getNext()))
54 if (CheckSameMatcher *CS = dyn_cast<CheckSameMatcher>(MC->getNext()))
58 if (CheckIntegerMatcher *CI = dyn_cast<CheckIntegerMatcher>(MC->getNext()))
62 if (auto *CCC = dyn_cast<CheckCondCodeMatcher>(MC->getNext()))
77 if (MoveChildMatcher *MC = dyn_cast<MoveChildMatcher>(N))
79 dyn_cast<MoveParentMatcher>(MC->getNext())) {
85 if (EmitNodeMatcher *EN = dyn_cast<EmitNodeMatcher>(N))
87 dyn_cast<CompleteMatchMatcher>(EN->getNext())) {
197 Scope = dyn_cast<ScopeMatcher>(N);
214 if (auto *SM = dyn_cast<ScopeMatcher>(Child.get())) {
424 if (ScopeMatcher *SM = dyn_cast<ScopeMatcher>(PrevMatcher)) {
441 if (ScopeMatcher *SM = dyn_cast<ScopeMatcher>(M.second)) {
utils/TableGen/DFAEmitter.cpp 332 if (auto *Bit = dyn_cast<BitInit>(NewStateInit->getBit(I))) {
340 if (auto *Ty = dyn_cast<RecordRecTy>(SymbolV->getType())) {
utils/TableGen/FastISelEmitter.cpp 258 DefInit *OpDI = dyn_cast<DefInit>(Op->getLeafValue());
505 DefInit *SR = dyn_cast<DefInit>(Dst->getChild(1)->getLeafValue());
utils/TableGen/FixedLenDecoderEmitter.cpp 193 if (BitInit *bit = dyn_cast<BitInit>(bits.getBit(index)))
1774 dyn_cast<StringInit>(DecoderString->getValue()) : nullptr;
1878 VarBitInit *BI = dyn_cast<VarBitInit>(Bits.getBit(bi));
1880 Var = dyn_cast<VarInit>(BI->getBitVar());
1882 Var = dyn_cast<VarInit>(Bits.getBit(bi));
1900 VarBitInit *BI = dyn_cast<VarBitInit>(Bits.getBit(bi));
1902 Var = dyn_cast<VarInit>(BI->getBitVar());
1904 Var = dyn_cast<VarInit>(Bits.getBit(bi));
1938 dyn_cast<StringInit>(DecoderString->getValue()) : nullptr;
1965 dyn_cast<StringInit>(DecoderString->getValue()) : nullptr;
1972 dyn_cast<BitInit>(HasCompleteDecoderVal->getValue()) : nullptr;
2031 dyn_cast<BitInit>(HasCompleteDecoderVal->getValue()) : nullptr;
2040 if (const BitsInit *OpBits = dyn_cast<BitsInit>(EncodedValue->getValue()))
2042 if (const BitInit *OpBit = dyn_cast<BitInit>(OpBits->getBit(I)))
2052 VarBitInit *BI = dyn_cast<VarBitInit>(Bits.getBit(bi));
2054 Var = dyn_cast<VarInit>(BI->getBitVar());
2056 Var = dyn_cast<VarInit>(Bits.getBit(bi));
utils/TableGen/GICombinerEmitter.cpp 97 if (const DefInit *OpI = dyn_cast<DefInit>(&N))
108 if (const DefInit *OpI = dyn_cast<DefInit>(&N))
172 if (const CodeInit *CodeI = dyn_cast<CodeInit>(Matchers->getArg(I))) {
323 if (const CodeInit *Code = dyn_cast<CodeInit>(Applyer->getArg(0))) {
utils/TableGen/GlobalISelEmitter.cpp 241 IntInit *IntVal = dyn_cast<IntInit>(Val);
375 if (DefInit *VDefInit = dyn_cast<DefInit>(V)) {
1699 dyn_cast<InstructionOpcodeMatcher>(&B))
2184 if (auto *OpMatcher = dyn_cast<InstructionOpcodeMatcher>(P.get()))
2208 dyn_cast<LLTOperandMatcher>(&**InsnMatcher.predicates_begin()))
2263 dyn_cast<InstructionOperandMatcher>(&B))
2774 if (const auto *Copy = dyn_cast<CopyRenderer>(&*Renderer.value())) {
3188 dyn_cast<InstructionOperandMatcher>(this);
3190 dyn_cast<InstructionOperandMatcher>(&B);
3519 IntInit *IntVal = dyn_cast<IntInit>(Val);
3667 if (IntInit *SrcIntInit = dyn_cast<IntInit>(SrcInit)) {
3696 DefInit *DI = dyn_cast<DefInit>(SrcChild->getLeafValue());
3775 if (auto *ChildDefInit = dyn_cast<DefInit>(SrcChild->getLeafValue())) {
3875 if (auto *ChildInt = dyn_cast<IntInit>(SrcChild->getLeafValue())) {
3881 if (auto *ChildDefInit = dyn_cast<DefInit>(SrcChild->getLeafValue())) {
4010 dyn_cast<IntInit>(DstChild->getLeafValue())) {
4016 if (auto *ChildDefInit = dyn_cast<DefInit>(DstChild->getLeafValue())) {
4248 dyn_cast<DefInit>(Dst->getChild(1)->getLeafValue())) {
4290 dyn_cast<DefInit>(SubRegChild->getLeafValue())) {
4357 if (const DagInit *DefaultDagOp = dyn_cast<DagInit>(DefaultOp)) {
4359 dyn_cast<DefInit>(DefaultDagOp->getOperator())) {
4368 if (const DefInit *DefaultDefOp = dyn_cast<DefInit>(DefaultOp)) {
4387 if (const IntInit *DefaultIntOp = dyn_cast<IntInit>(DefaultOp)) {
4485 DefInit *SubRegInit = dyn_cast<DefInit>(SubRegIdxNode->getLeafValue());
4520 DefInit *SubRegInit = dyn_cast<DefInit>(SubRegIdxNode->getLeafValue());
5553 if (const auto *Condition = dyn_cast<InstructionOpcodeMatcher>(&P)) {
5558 if (const auto *Condition = dyn_cast<LLTOperandMatcher>(&P)) {
utils/TableGen/InstrInfoEmitter.cpp 713 if (const auto *Bit = dyn_cast<BitInit>(TSF->getBit(i)))
utils/TableGen/OptParserEmitter.cpp 181 if (const DefInit *DI = dyn_cast<DefInit>(R.getValueInit("Group")))
229 if (const DefInit *DI = dyn_cast<DefInit>(R.getValueInit("Group"))) {
237 if (const DefInit *DI = dyn_cast<DefInit>(R.getValueInit("Alias")))
utils/TableGen/PseudoLoweringEmitter.cpp 77 if (DefInit *DI = dyn_cast<DefInit>(Dag->getArg(i))) {
103 } else if (IntInit *II = dyn_cast<IntInit>(Dag->getArg(i))) {
107 } else if (DagInit *SubDag = dyn_cast<DagInit>(Dag->getArg(i))) {
130 DefInit *OpDef = dyn_cast<DefInit>(Dag->getOperator());
utils/TableGen/RISCVCompressInstEmitter.cpp 200 if (DefInit *DI = dyn_cast<DefInit>(Dag->getArg(i - TiedCount))) {
227 } else if (IntInit *II = dyn_cast<IntInit>(Dag->getArg(i - TiedCount))) {
280 DefInit *Type1 = dyn_cast<DefInit>(Arg1);
281 DefInit *Type2 = dyn_cast<DefInit>(Arg2);
752 if (CodeInit *SI = dyn_cast<CodeInit>(MCOpPred))
utils/TableGen/RegisterInfoEmitter.cpp 1099 if (BitInit *B = dyn_cast<BitInit>(BI->getBit(b)))
1554 dyn_cast<DagInit>(CSRSet->getValueInit("OtherPreserved"))) {
utils/TableGen/SearchableTableEmitter.cpp 110 if (StringInit *SI = dyn_cast<StringInit>(I))
112 else if (BitsInit *BI = dyn_cast<BitsInit>(I))
114 else if (BitInit *BI = dyn_cast<BitInit>(I))
116 else if (CodeInit *CI = dyn_cast<CodeInit>(I))
129 if (DefInit *DI = dyn_cast<DefInit>(I))
154 } else if (BitsRecTy *BI = dyn_cast<BitsRecTy>(Field.RecType)) {
528 if (auto DI = dyn_cast<DefInit>(II)) {
600 auto TI = dyn_cast<TypedInit>(EntryRec->getValueInit(Field.Name));
626 if (auto RecordTy = dyn_cast<RecordRecTy>(Field.RecType)) {
utils/TableGen/X86EVEX2VEXTablesEmitter.cpp 75 if (BitInit *Bit = dyn_cast<BitInit>(B->getBit(i)))
utils/yaml-bench/YAMLBench.cpp 94 if (yaml::ScalarNode *sn = dyn_cast<yaml::ScalarNode>(n)) {
98 } else if (yaml::BlockScalarNode *BN = dyn_cast<yaml::BlockScalarNode>(n)) {
100 } else if (yaml::SequenceNode *sn = dyn_cast<yaml::SequenceNode>(n)) {
110 } else if (yaml::MappingNode *mn = dyn_cast<yaml::MappingNode>(n)) {
124 } else if (yaml::AliasNode *an = dyn_cast<yaml::AliasNode>(n)){