reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/Analysis/MemorySSA.h
  400     return cast_or_null<MemoryAccess>(getOperand(1));
  721     return cast_or_null<MemoryUseOrDef>(ValueToMemoryAccess.lookup(I));
  725     return cast_or_null<MemoryPhi>(ValueToMemoryAccess.lookup(cast<Value>(BB)));
include/llvm/IR/DebugInfoMetadata.h
  407   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
  628   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
  823   DIType *getBaseType() const { return cast_or_null<DIType>(getRawBaseType()); }
  845     return cast_or_null<DIType>(getExtraData());
  854     if (auto *CM = cast_or_null<ConstantAsMetadata>(getExtraData()))
  862     if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData()))
  869     if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData()))
  875     if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData()))
 1008   DIType *getBaseType() const { return cast_or_null<DIType>(getRawBaseType()); }
 1010     return cast_or_null<MDTuple>(getRawElements());
 1013     return cast_or_null<DIType>(getRawVTableHolder());
 1016     return cast_or_null<MDTuple>(getRawTemplateParams());
 1104     return cast_or_null<MDTuple>(getRawTypeArray());
 1262     return cast_or_null<MDTuple>(getRawEnumTypes());
 1265     return cast_or_null<MDTuple>(getRawRetainedTypes());
 1268     return cast_or_null<MDTuple>(getRawGlobalVariables());
 1271     return cast_or_null<MDTuple>(getRawImportedEntities());
 1274     return cast_or_null<MDTuple>(getRawMacros());
 1438     return cast_or_null<DILocation>(getRawInlinedAt());
 1784   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 1790     return cast_or_null<DISubroutineType>(getRawType());
 1793     return cast_or_null<DIType>(getRawContainingType());
 1797     return cast_or_null<DICompileUnit>(getRawUnit());
 1801     return cast_or_null<MDTuple>(getRawTemplateParams());
 1804     return cast_or_null<DISubprogram>(getRawDeclaration());
 1807     return cast_or_null<MDTuple>(getRawRetainedNodes());
 1810     return cast_or_null<MDTuple>(getRawThrownTypes());
 2057   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 2111   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 2138   DIType *getType() const { return cast_or_null<DIType>(getRawType()); }
 2245   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 2247   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 2248   DIType *getType() const { return cast_or_null<DIType>(getRawType()); }
 2629                    cast_or_null<Metadata>(TemplateParams), AlignInBits, Storage,
 2673     return cast_or_null<DIDerivedType>(getRawStaticDataMemberDeclaration());
 2727   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 2729     return cast_or_null<DIGlobalVariable>(getRawDecl());
 2732   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 2877     return cast_or_null<DILocalScope>(getRawScope());
 2881   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 2955   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 2958   DIType *getType() const { return cast_or_null<DIType>(getRawType()); }
 3033   DIScope *getScope() const { return cast_or_null<DIScope>(getRawScope()); }
 3034   DINode *getEntity() const { return cast_or_null<DINode>(getRawEntity()); }
 3036   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 3076     return cast_or_null<DIGlobalVariable>(getRawVariable());
 3236   DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }
 3239     return cast_or_null<MDTuple>(getRawElements());
include/llvm/IR/Instructions.h
 3070     return cast_or_null<BasicBlock>((&Op<-1>() - i)->get());
include/llvm/IR/Metadata.h
  371     return cast_or_null<ConstantAsMetadata>(getIfExists(C));
  375     return cast_or_null<LocalAsMetadata>(getIfExists(Local));
  565   if (auto *V = cast_or_null<ConstantAsMetadata>(MD))
include/llvm/IR/ValueMap.h
  258   KeyT Unwrap() const { return cast_or_null<KeySansPointerT>(getValPtr()); }
lib/Analysis/TargetLibraryInfo.cpp
 1609   if (auto *ShortWChar = cast_or_null<ConstantAsMetadata>(
lib/AsmParser/LLParser.cpp
 1411     cast_or_null<GlobalValue>(M->getValueSymbolTable().lookup(Name));
 1423     return cast_or_null<GlobalValue>(
 1452     return cast_or_null<GlobalValue>(
lib/Bitcode/Reader/BitcodeReader.cpp
 1850       StructType *Res = cast_or_null<StructType>(TypeList[NumRecords]);
 1879       StructType *Res = cast_or_null<StructType>(TypeList[NumRecords]);
lib/Bitcode/Reader/MetadataLoader.cpp
 1093     return cast_or_null<MDString>(MDS);
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
 1259           LScopes.findAbstractScope(cast_or_null<DILocalScope>(ScopeNode)))
 1746   if (auto *Scope = cast_or_null<DIScope>(S)) {
lib/IR/DIBuilder.cpp
  169   auto *M = DIImportedEntity::get(C, Tag, Context, cast_or_null<DINode>(NS),
  455       cast_or_null<MDTuple>(TemplateParams), UniqueIdentifier);
  646       VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
  647       LineNumber, Ty, isLocalToUnit, true, cast_or_null<DIDerivedType>(Decl),
  663              VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
  665              cast_or_null<DIDerivedType>(Decl), templateParams, AlignInBits)
  682       DILocalVariable::get(VMContext, cast_or_null<DILocalScope>(Context), Name,
  720       DILabel::get(VMContext, cast_or_null<DILocalScope>(Context), Name,
lib/IR/DebugInfo.cpp
   66     if (auto *SP = cast_or_null<DISubprogram>(F.getSubprogram()))
  427     auto *FileAndScope = cast_or_null<DIFile>(map(MDS->getFile()));
  430     auto *Type = cast_or_null<DISubroutineType>(map(MDS->getType()));
  432         cast_or_null<DIType>(map(MDS->getContainingType()));
  433     auto *Unit = cast_or_null<DICompileUnit>(map(MDS->getUnit()));
  480     auto *File = cast_or_null<DIFile>(map(CU->getFile()));
lib/IR/DebugLoc.cpp
   22   return cast_or_null<DILocation>(Loc.get());
lib/IR/Metadata.cpp
 1083   return cast_or_null<MDNode>(N);
 1523   return cast_or_null<DISubprogram>(getMetadata(LLVMContext::MD_dbg));
lib/IR/Module.cpp
  114   return cast_or_null<GlobalValue>(getValueSymbolTable().lookup(Name));
  455       cast_or_null<ConstantAsMetadata>(getModuleFlag("NumRegisterParameters"));
  462   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Dwarf Version"));
  469   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("CodeView"));
  489   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("PIC Level"));
  503   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("PIE Level"));
  517   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Code Model"));
  551   auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("RtLibUseGOT"));
lib/IR/SafepointIRVerifier.cpp
  107     assert(cast_or_null<BasicBlock>(U->get()) &&
  188     BasicBlock *BB = cast_or_null<BasicBlock>(DeadEdge.get());
lib/Linker/IRMover.cpp
  985     return linkAppendingVarProto(cast_or_null<GlobalVariable>(DGV),
lib/MC/ELFObjectWriter.cpp
  532       cast_or_null<MCSymbolELF>(Layout.getBaseSymbol(Symbol));
lib/MC/MCParser/ELFAsmParser.cpp
  629             cast_or_null<MCSectionELF>(CurrentSection.first))
lib/Target/Hexagon/HexagonCommonGEP.cpp
  688     BasicBlock *B = cast_or_null<BasicBlock>(*I);
  900   BasicBlock *LocB = cast_or_null<BasicBlock>(Loc[Node]);
 1199       BasicBlock *ChildB = cast_or_null<BasicBlock>(Loc[Child]);
lib/Transforms/IPO/GlobalDCE.cpp
  163       cast_or_null<ConstantAsMetadata>(M.getModuleFlag("LTOPostLink"));
lib/Transforms/InstCombine/InstCombineShifts.cpp
  311   if (auto *NewShift = cast_or_null<Instruction>(
lib/Transforms/Instrumentation/GCOVProfiling.cpp
 1005       auto *SP = cast_or_null<DISubprogram>(CountersBySP[j].second);
lib/Transforms/Scalar/LICM.cpp
 1449     if (MemoryUseOrDef *OldMemAcc = cast_or_null<MemoryUseOrDef>(
lib/Transforms/Scalar/LoopUnswitch.cpp
  379     const SwitchInst *NewInst = cast_or_null<SwitchInst>(NewI);
lib/Transforms/Utils/CloneFunction.cpp
  495     BasicBlock *NewBB = cast_or_null<BasicBlock>(V);
  535         if (BasicBlock *MappedBlock = cast_or_null<BasicBlock>(V)) {
lib/Transforms/Utils/ValueMapper.cpp
  149     return cast_or_null<Constant>(mapValue(C));
  501     BB = cast_or_null<BasicBlock>(mapValue(BA.getBasicBlock()));
  847     BasicBlock *BB = cast_or_null<BasicBlock>(mapValue(DBB.OldBB));
  882     MDNode *New = cast_or_null<MDNode>(mapMetadata(Old));
  986       NewV = cast_or_null<Constant>(mapValue(V));
 1099   return cast_or_null<Constant>(mapValue(C));
 1107   return cast_or_null<MDNode>(mapMetadata(N));
lib/Transforms/Vectorize/VPlan.h
  655     return cast_or_null<Instruction>(getUnderlyingValue());
lib/Transforms/Vectorize/VPlanSLP.cpp
  350     if (auto *VPInstr = cast_or_null<VPInstruction>(Op))
tools/clang/include/clang/AST/CanonicalType.h
   88     return cast_or_null<T>(Stored.getTypePtrOrNull());
tools/clang/include/clang/AST/Decl.h
 3489     return cast_or_null<EnumDecl>(
 3504     return cast_or_null<EnumDecl>(TagDecl::getDefinition());
 3709     return cast_or_null<RecordDecl>(
 3875     return cast_or_null<RecordDecl>(TagDecl::getDefinition());
tools/clang/include/clang/AST/DeclCXX.h
  503     return cast_or_null<CXXRecordDecl>(
tools/clang/include/clang/AST/DeclFriend.h
   99       return cast_or_null<FriendDecl>(NextFriend.get(nullptr));
tools/clang/include/clang/AST/DeclTemplate.h
 1043     return cast_or_null<FunctionTemplateDecl>(
 1047     return cast_or_null<FunctionTemplateDecl>(
 1061     return cast_or_null<FunctionTemplateDecl>(
 2158     return cast_or_null<ClassTemplateDecl>(
 2162     return cast_or_null<ClassTemplateDecl>(
 2176     return cast_or_null<ClassTemplateDecl>(
 2379     return cast_or_null<TypeAliasTemplateDecl>(
 2383     return cast_or_null<TypeAliasTemplateDecl>(
 2389     return cast_or_null<TypeAliasTemplateDecl>(
 2976     return cast_or_null<VarTemplateDecl>(
 2980     return cast_or_null<VarTemplateDecl>(
 2994     return cast_or_null<VarTemplateDecl>(
tools/clang/include/clang/AST/Expr.h
 4425     return cast_or_null<Expr>(InitExprs[Init]);
 4430     return cast_or_null<Expr>(InitExprs[Init]);
tools/clang/include/clang/AST/ExprCXX.h
  248     return cast_or_null<CallExpr>(getPreArg(CONFIG));
  250   CallExpr *getConfig() { return cast_or_null<CallExpr>(getPreArg(CONFIG)); }
 1162   const Expr *getSubExpr() const { return cast_or_null<Expr>(Operand); }
 1163   Expr *getSubExpr() { return cast_or_null<Expr>(Operand); }
 2228     return cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]);
 2233     return cast_or_null<Expr>(getTrailingObjects<Stmt *>()[arraySizeOffset()]);
tools/clang/include/clang/AST/ExprObjC.h
  714     return cast_or_null<ObjCMethodDecl>(PropertyOrGetter.getPointer());
tools/clang/include/clang/AST/ExprOpenMP.h
   90   Expr *getLowerBound() { return cast_or_null<Expr>(SubExprs[LOWER_BOUND]); }
   92     return cast_or_null<Expr>(SubExprs[LOWER_BOUND]);
   98   Expr *getLength() { return cast_or_null<Expr>(SubExprs[LENGTH]); }
   99   const Expr *getLength() const { return cast_or_null<Expr>(SubExprs[LENGTH]); }
tools/clang/include/clang/AST/OpenMPClause.h
  298   Expr *getAllocator() const { return cast_or_null<Expr>(Allocator); }
  490   Expr *getCondition() const { return cast_or_null<Expr>(Condition); }
  564   Expr *getCondition() const { return cast_or_null<Expr>(Condition); }
  635   Expr *getNumThreads() const { return cast_or_null<Expr>(NumThreads); }
  701   Expr *getSafelen() const { return cast_or_null<Expr>(Safelen); }
  766   Expr *getSimdlen() const { return cast_or_null<Expr>(Simdlen); }
  832   Expr *getNumForLoops() const { return cast_or_null<Expr>(NumForLoops); }
 1529   Expr *getNumForLoops() const { return cast_or_null<Expr>(NumForLoops); }
 5324   Expr *getGrainsize() const { return cast_or_null<Expr>(Grainsize); }
 5431   Expr *getNumTasks() const { return cast_or_null<Expr>(NumTasks); }
 5491   Expr *getHint() const { return cast_or_null<Expr>(Hint); }
tools/clang/include/clang/AST/Stmt.h
 1061       return cast_or_null<T>(*this->I);
tools/clang/include/clang/AST/StmtCXX.h
  163     return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]);
  165   DeclStmt *getEndStmt() { return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]); }
  166   Expr *getCond() { return cast_or_null<Expr>(SubExprs[COND]); }
  167   Expr *getInc() { return cast_or_null<Expr>(SubExprs[INC]); }
  175     return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]);
  178     return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]);
  181     return cast_or_null<Expr>(SubExprs[COND]);
  184     return cast_or_null<Expr>(SubExprs[INC]);
  404     return cast_or_null<Expr>(getStoredStmts()[SubStmt::Allocate]);
  407     return cast_or_null<Expr>(getStoredStmts()[SubStmt::Deallocate]);
tools/clang/include/clang/AST/StmtObjC.h
  219     return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
  225     return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
  239     return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
  245     return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
tools/clang/include/clang/AST/StmtOpenMP.h
 2405   Expr *getX() { return cast_or_null<Expr>(*std::next(child_begin())); }
 2407     return cast_or_null<Expr>(*std::next(child_begin()));
 2413     return cast_or_null<Expr>(*std::next(child_begin(), 2));
 2416     return cast_or_null<Expr>(*std::next(child_begin(), 2));
 2426   Expr *getV() { return cast_or_null<Expr>(*std::next(child_begin(), 3)); }
 2428     return cast_or_null<Expr>(*std::next(child_begin(), 3));
 2431   Expr *getExpr() { return cast_or_null<Expr>(*std::next(child_begin(), 4)); }
 2433     return cast_or_null<Expr>(*std::next(child_begin(), 4));
tools/clang/include/clang/Sema/Sema.h
10617       return std::make_pair(cast_or_null<VarDecl>(ConditionVar),
tools/clang/include/clang/Serialization/ASTReader.h
 1856     return cast_or_null<T>(GetLocalDecl(F, LocalID));
 1888     return cast_or_null<T>(GetDecl(ReadDeclID(F, R, I)));
tools/clang/lib/AST/ASTImporter.cpp
  155         To = cast_or_null<ImportT>(*ToOrErr);
  166       return cast_or_null<T>(*ToOrErr);
  262       ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD));
 1249       ToD, cast_or_null<TypeDecl>(ToPrevD));
 1580   ToD = cast_or_null<NamedDecl>(Importer.GetAlreadyImportedOrNull(D));
 2706               cast_or_null<CXXRecordDecl>(PrevDecl), DelayTypeCreation))
 2714                                   cast_or_null<CXXRecordDecl>(PrevDecl)))
 5032   return cast_or_null<T>(TemplateWithDef);
 5244             cast_or_null<ClassTemplatePartialSpecializationDecl>(PrevDecl)))
 5323       cast_or_null<VarDecl>(D->getTemplatedDecl()->getDefinition());
 8119   if (ExpectedStmt ToSOrErr = Import(cast_or_null<Stmt>(FromE)))
 8120     return cast_or_null<Expr>(*ToSOrErr);
 8532         ToContext, cast_or_null<FieldDecl>(*ToFieldOrErr), *MemberLocOrErr,
 8544         ToContext, cast_or_null<IndirectFieldDecl>(*ToIFieldOrErr),
tools/clang/lib/AST/CXXInheritance.cpp
  166             cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition());
tools/clang/lib/AST/Decl.cpp
 2226   return cast_or_null<Expr>(Init.get<EvaluatedStmt *>()->Value);
 2740   return cast_or_null<Expr>(Init.get<Stmt *>());
tools/clang/lib/AST/DeclCXX.cpp
 2707   return cast_or_null<NamespaceDecl>(NominatedNamespace);
 3001   return cast_or_null<ValueDecl>(Decomp.get(Source));
tools/clang/lib/AST/DeclFriend.cpp
   30   return cast_or_null<FriendDecl>(
tools/clang/lib/AST/DeclOpenMP.cpp
  159   return cast_or_null<OMPDeclareReductionDecl>(
  164   return cast_or_null<OMPDeclareReductionDecl>(
  219   return cast_or_null<OMPDeclareMapperDecl>(
  224   return cast_or_null<OMPDeclareMapperDecl>(
tools/clang/lib/AST/Expr.cpp
 2257   Expr *Result = cast_or_null<Expr>(InitExprs[Init]);
tools/clang/lib/AST/ExprConstant.cpp
   88            Redecl = cast_or_null<ValueDecl>(Redecl->getPreviousDecl())) {
tools/clang/lib/AST/ExternalASTMerger.cpp
  515     NamedDecl *ND = cast_or_null<NamedDecl>(*NDOrErr);
tools/clang/lib/AST/RecordLayoutBuilder.cpp
 3132   return cast_or_null<CXXMethodDecl>(Result);
tools/clang/lib/AST/Type.cpp
 1807   return cast_or_null<DeducedType>(
tools/clang/lib/Analysis/AnalysisDeclContext.cpp
  389   LOC *L = cast_or_null<LOC>(Contexts.FindNodeOrInsertPos(ID, InsertPos));
  405    cast_or_null<StackFrameContext>(Contexts.FindNodeOrInsertPos(ID, InsertPos));
  429     cast_or_null<BlockInvocationContext>(Contexts.FindNodeOrInsertPos(ID,
tools/clang/lib/Analysis/RetainSummaryManager.cpp
  667     Summ = getFunctionSummary(cast_or_null<FunctionDecl>(C.getDecl()));
  674     const auto *ME = cast_or_null<ObjCMessageExpr>(C.getExpr());
tools/clang/lib/CodeGen/CGDebugInfo.cpp
 1469     return cast_or_null<llvm::DISubroutineType>(
 1802           TheCU, Name, TTy, cast_or_null<llvm::Constant>(V)));
 2220   llvm::DIType *T = cast_or_null<llvm::DIType>(getTypeOrNull(QualType(Ty, 0)));
 3087   auto *T = cast_or_null<llvm::DICompositeType>(getTypeOrNull(QTy));
 3121   auto *T = cast_or_null<llvm::DICompositeType>(
 4277               cast_or_null<CXXMethodDecl>(blockDecl->getNonClosureContext()))
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
 6748                     cast_or_null<DeclStmt>(IfClause->getPreInitStmt())) {
 6773                 cast_or_null<DeclStmt>(NumThreadsClause->getPreInitStmt())) {
 6846                 cast_or_null<DeclStmt>(ThreadLimitClause->getPreInitStmt())) {
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp
   32                 cast_or_null<DeclStmt>(CPI->getPreInitStmt())) {
  163     if (const auto *PreInits = cast_or_null<DeclStmt>(S.getPreInits())) {
  194                 cast_or_null<DeclStmt>(CPI->getPreInitStmt())) {
  219     const auto *CS = cast_or_null<CapturedStmt>(S.getAssociatedStmt());
 1469     if (const auto *CS = cast_or_null<BinaryOperator>(C->getCalcStep()))
tools/clang/lib/CodeGen/CodeGenModule.cpp
 3087   if (const FunctionDecl *FD = cast_or_null<FunctionDecl>(D)) {
 3121       const FunctionDecl *FD = cast_or_null<FunctionDecl>(D);
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
 5698         cast_or_null<CompoundStmt>(RewriteFunctionBodyOrGlobalInitializer(Body));
 5719           cast_or_null<CompoundStmt>(RewriteFunctionBodyOrGlobalInitializer(Body));
tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
 4797         cast_or_null<CompoundStmt>(RewriteFunctionBodyOrGlobalInitializer(Body));
 4818           cast_or_null<CompoundStmt>(RewriteFunctionBodyOrGlobalInitializer(Body));
tools/clang/lib/Parse/ParseDecl.cpp
 1111               cast_or_null<StringLiteral>(MessageExpr.get())) {
tools/clang/lib/Sema/SemaDecl.cpp
15413                            cast_or_null<EnumDecl>(PrevDecl), ScopedEnum,
15457                                   cast_or_null<CXXRecordDecl>(PrevDecl));
15463                                cast_or_null<RecordDecl>(PrevDecl));
15863   FieldDecl *Res = HandleField(S, cast_or_null<RecordDecl>(TagD),
17102     cast_or_null<EnumConstantDecl>(lastEnumConst);
17241     EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(Element);
17358         cast_or_null<EnumConstantDecl>(Elements[i]);
17385       cast_or_null<EnumConstantDecl>(Elements[i]);
17501     auto *ECD = cast_or_null<EnumConstantDecl>(D);
17567       EnumConstantDecl *ECD = cast_or_null<EnumConstantDecl>(D);
tools/clang/lib/Sema/SemaDeclAttr.cpp
 7658   } while ((Ctx = cast_or_null<Decl>(Ctx->getDeclContext())));
 7691        Ctx = cast_or_null<Decl>(Ctx->getDeclContext())) {
tools/clang/lib/Sema/SemaDeclCXX.cpp
 1336   const CXXRecordDecl *RD = cast_or_null<CXXRecordDecl>(BasePair.getDecl());
 9471   return cast_or_null<CXXRecordDecl>(
 9476   return cast_or_null<EnumDecl>(StdAlignValT.get(Context.getExternalSource()));
 9480   return cast_or_null<NamespaceDecl>(
15858       cast_or_null<CXXConstructorDecl>(FNTarget));
tools/clang/lib/Sema/SemaDeclObjC.cpp
 3912       cast_or_null<ObjCMethodDecl>(allMethods[i]);
tools/clang/lib/Sema/SemaExpr.cpp
   91       const Decl *DC = cast_or_null<Decl>(S.getCurObjCLexicalContext());
tools/clang/lib/Sema/SemaExprMember.cpp
  554     cast_or_null<CXXRecordDecl>(computeDeclContext(BaseType));
tools/clang/lib/Sema/SemaInit.cpp
 5444   if (ParmVarDecl *param = cast_or_null<ParmVarDecl>(Entity.getDecl()))
 5890     if (ParmVarDecl *Param = cast_or_null<ParmVarDecl>(Entity.getDecl()))
 6803     const auto *MD = cast_or_null<CXXMethodDecl>(MCE->getDirectCallee());
tools/clang/lib/Sema/SemaLookup.cpp
 3036   return cast_or_null<ObjCProtocolDecl>(D);
 3282   return cast_or_null<CXXConstructorDecl>(Result.getMethod());
 3294   return cast_or_null<CXXConstructorDecl>(Result.getMethod());
 3304   return cast_or_null<CXXConstructorDecl>(Result.getMethod());
 3572            D = cast_or_null<NamedDecl>(D->getPreviousDecl())) {
tools/clang/lib/Sema/SemaOpenMP.cpp
 3669         if (auto *E = cast_or_null<Expr>(VarRef)) {
 3738           if (auto *DS = cast_or_null<DeclStmt>(C->getPreInitStmt())) {
12824                  cast_or_null<UnresolvedLookupExpr>(UnresolvedReduction)) {
15143   } else if (auto *ULE = cast_or_null<UnresolvedLookupExpr>(UnresolvedMapper)) {
tools/clang/lib/Sema/SemaStmt.cpp
  285     if (DiagnoseNoDiscard(*this, cast_or_null<WarnUnusedResultAttr>(
 2683       InitStmt, RangeDS, cast_or_null<DeclStmt>(BeginDeclStmt.get()),
 2684       cast_or_null<DeclStmt>(EndDeclStmt.get()), NotEqExpr.get(),
 3823   VarDecl *Var = cast_or_null<VarDecl>(Parm);
 3943       CXXCatchStmt(CatchLoc, cast_or_null<VarDecl>(ExDecl), HandlerBlock);
tools/clang/lib/Sema/SemaTemplate.cpp
 1897         cast_or_null<TemplateParmDecl>(SemaRef.SubstDecl(OldParam, DC, Args));
 3942         cast_or_null<VarTemplatePartialSpecializationDecl>(PrevDecl);
 7872       = cast_or_null<ClassTemplatePartialSpecializationDecl>(PrevDecl);
 8927   auto *A = cast_or_null<InheritableAttr>(getDLLAttr(Def));
 9164     = cast_or_null<ClassTemplateSpecializationDecl>(
 9174   Def = cast_or_null<ClassTemplateSpecializationDecl>(
 9304     = cast_or_null<CXXRecordDecl>(Record->getPreviousDecl());
 9322     = cast_or_null<CXXRecordDecl>(Record->getDefinition());
 9328       = cast_or_null<CXXRecordDecl>(Pattern->getDefinition());
 9341       RecordDef = cast_or_null<CXXRecordDecl>(Record->getDefinition());
tools/clang/lib/Sema/SemaTemplateDeduction.cpp
 3366   Specialization = cast_or_null<FunctionDecl>(
 4253   Specialization = cast_or_null<CXXConversionDecl>(ConversionSpecialized);
tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
 1114         return cast_or_null<NamedDecl>(TransformDecl(Loc, D));
 1125   return cast_or_null<NamedDecl>(TransformDecl(Loc, D));
 1341       VD = cast_or_null<ValueDecl>(
 1408     VarDecl *VD = cast_or_null<VarDecl>(TransformDecl(E->getExprLoc(), D));
 1424     VarDecl *D = cast_or_null<VarDecl>(TransformDecl(E->getExprLoc(), *I));
 1581     NewTTPDecl = cast_or_null<TemplateTypeParmDecl>(
 2081     = cast_or_null<CXXRecordDecl>(Pattern->getDefinition());
 2821       Pattern = cast_or_null<CXXRecordDecl>(Record->getDefinition());
tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  820   TypeAliasDecl *AliasInst = cast_or_null<TypeAliasDecl>(
  857   auto *NewDD = cast_or_null<DecompositionDecl>(
 1541       cast_or_null<VarDecl>(VisitVarDecl(Pattern,
 1615     Instantiated = cast_or_null<FunctionDecl>(VisitCXXMethodDecl(DMethod,
 1618     Instantiated = cast_or_null<FunctionDecl>(VisitFunctionDecl(
 2812         cast_or_null<NamedDecl>(SemaRef.FindInstantiatedDecl(
 2823       PrevDecl = cast_or_null<UsingShadowDecl>(SemaRef.FindInstantiatedDecl(
 2976   return cast_or_null<CXXMethodDecl>(
 3257       cast_or_null<ClassTemplateDecl>(SemaRef.FindInstantiatedDecl(
 3386       cast_or_null<VarTemplateDecl>(SemaRef.FindInstantiatedDecl(
 3513     NamedDecl *D = cast_or_null<NamedDecl>(Visit(P));
 3883             cast_or_null<ParmVarDecl>(VisitParmVarDecl(OldParam));
 4144   return cast_or_null<FunctionDecl>(SubstDecl(FD, FD->getParent(), MArgs));
 4447   return cast_or_null<VarTemplateSpecializationDecl>(
 4867     Var = cast_or_null<VarDecl>(SubstDecl(Def, Var->getDeclContext(),
 4876     Var = cast_or_null<VarDecl>(Instantiator.VisitVarTemplateSpecializationDecl(
 5020       FieldDecl *Member = cast_or_null<FieldDecl>(FindInstantiatedDecl(
 5034          cast_or_null<IndirectFieldDecl>(FindInstantiatedDecl(
 5275     return cast_or_null<DeclContext>(ID);
 5527         VarTemplateDecl *Templ = cast_or_null<VarTemplateDecl>(
tools/clang/lib/Sema/TreeTransform.h
  482     return cast_or_null<NamedDecl>(getDerived().TransformDecl(Loc, D));
 3645     VarDecl *ConditionVar = cast_or_null<VarDecl>(
 3694         = cast_or_null<NamespaceDecl>(
 3704         = cast_or_null<NamespaceAliasDecl>(
 3720           cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
 3797     TemplateDecl *NewTemplate = cast_or_null<TemplateDecl>(
 3854       = cast_or_null<TemplateDecl>(getDerived().TransformDecl(NameLoc,
 3900       = cast_or_null<TemplateDecl>(getDerived().TransformDecl(NameLoc,
 3915     = cast_or_null<TemplateTemplateParmDecl>(
 5622     = cast_or_null<TypedefNameDecl>(getDerived().TransformDecl(TL.getNameLoc(),
 5816     = cast_or_null<RecordDecl>(getDerived().TransformDecl(TL.getNameLoc(),
 5840     = cast_or_null<EnumDecl>(getDerived().TransformDecl(TL.getNameLoc(),
 6463   ObjCTypeParamDecl *OTP = cast_or_null<ObjCTypeParamDecl>(
 7778   MSPropertyDecl *PD = cast_or_null<MSPropertyDecl>(
 9268     = cast_or_null<ValueDecl>(getDerived().TransformDecl(E->getLocation(),
 9275     Found = cast_or_null<NamedDecl>(
 9693     = cast_or_null<ValueDecl>(getDerived().TransformDecl(E->getMemberLoc(),
 9702     FoundDecl = cast_or_null<NamedDecl>(
 9816     NamedDecl *Found = cast_or_null<NamedDecl>(getDerived().TransformDecl(
10010         FieldDecl *Field = cast_or_null<FieldDecl>(
10569   ParmVarDecl *Param = cast_or_null<ParmVarDecl>(
10584   FieldDecl *Field = cast_or_null<FieldDecl>(
10653     OperatorNew = cast_or_null<FunctionDecl>(
10661     OperatorDelete = cast_or_null<FunctionDecl>(
10737     OperatorDelete = cast_or_null<FunctionDecl>(
10925       = cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
11254   CXXConstructorDecl *Constructor = cast_or_null<CXXConstructorDecl>(
11294   CXXConstructorDecl *Constructor = cast_or_null<CXXConstructorDecl>(
11343   CXXConstructorDecl *Constructor = cast_or_null<CXXConstructorDecl>(
11633             = cast_or_null<VarDecl>(getDerived().TransformDecl(C->getLocation(),
11654       = cast_or_null<VarDecl>(getDerived().TransformDecl(C->getLocation(),
11732     VarDecl *CapturedVar = cast_or_null<VarDecl>(
11915       = cast_or_null<CXXRecordDecl>(getDerived().TransformDecl(
12035     auto *Pack = cast_or_null<NamedDecl>(
tools/clang/lib/Serialization/ASTReader.cpp
 1772         MacroDefinitionRecord *PPDef = cast_or_null<MacroDefinitionRecord>(
 6615     RD = cast_or_null<RecordDecl>(RD->getCanonicalDecl());
tools/clang/lib/Serialization/ASTReaderDecl.cpp
 1486   BD->setBody(cast_or_null<CompoundStmt>(Record.readStmt()));
 2002   auto *TemplatedDecl = cast_or_null<NamedDecl>(Reader.GetDecl(PatternID));
 2341   D->Message = cast_or_null<StringLiteral>(Record.readExpr());
 2394   auto *FirstDecl = cast_or_null<T>(Reader.GetDecl(FirstDeclID));
 2690     return cast_or_null<T>(Reader->GetLocalDecl(*F, LocalID));
 4202         add(cast_or_null<ObjCCategoryDecl>(
tools/clang/lib/Serialization/ASTReaderStmt.cpp
  375   S->setAsmString(cast_or_null<StringLiteral>(Record.readSubStmt()));
  388     Constraints.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
  395     Clobbers.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
  476   E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
  485   E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
  935   if (auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
 1068   E->setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
 1356     S->setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
 2422   return cast_or_null<Expr>(ReadStmt(F));
 2426   return cast_or_null<Expr>(ReadSubStmt());
tools/clang/lib/Serialization/ASTWriterDecl.cpp
  293   Record.AddDeclRef(cast_or_null<Decl>(D->getDeclContext()));
  295     Record.AddDeclRef(cast_or_null<Decl>(D->getLexicalDeclContext()));
tools/clang/lib/Serialization/ASTWriterStmt.cpp
  955   Record.AddDeclRef(cast_or_null<Decl>(E->getParentContext()));
 1535   Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
 1543   Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  670   const auto *CE = cast_or_null<CallExpr>(getOriginExpr());
  687   if (const auto *D = cast_or_null<CXXMethodDecl>(getDecl())) {
tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
  700   if (const BinaryOperator *Term = cast_or_null<BinaryOperator>(T.getStmt())) {
tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  807     if (const auto *NewReg = cast_or_null<SubRegion>(symVal.getAsRegion())) {
tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
   71   auto *R = cast_or_null<RegionTy>(Regions.FindNodeOrInsertPos(ID, InsertPos));
   88   auto *R = cast_or_null<RegionTy>(Regions.FindNodeOrInsertPos(ID, InsertPos));
  107   auto *R = cast_or_null<RegionTy>(Regions.FindNodeOrInsertPos(ID, InsertPos));
  999   auto *R = cast_or_null<ElementRegion>(data);
tools/clang/lib/Tooling/Syntax/Nodes.cpp
   28   return llvm::cast_or_null<syntax::Leaf>(
   33   return llvm::cast_or_null<syntax::Leaf>(
tools/clang/tools/extra/clang-doc/Serialize.cpp
  444               cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition())) {
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
   92       if (const auto *BaseRecord = cast_or_null<CXXRecordDecl>(
tools/clang/unittests/AST/ASTImporterFixtures.h
  175     return cast_or_null<DeclT>(Import(cast<Decl>(From), Lang));
tools/clang/unittests/AST/ASTImporterTest.cpp
 3269   auto *ToF = cast_or_null<FunctionDecl>(Import(FromF, Lang_CXX11));
 3276   auto *ToLambda = cast_or_null<CXXRecordDecl>(Import(FromLambda, Lang_CXX11));
 3283     auto *ToField = cast_or_null<FieldDecl>(Import(FromField, Lang_CXX11));
 4816   auto *ToDef = cast_or_null<CXXRecordDecl>(Import(FromDef, Lang_CXX));
 4817   auto *ToFwd = cast_or_null<CXXRecordDecl>(Import(FromFwd, Lang_CXX));
tools/lld/COFF/InputFiles.cpp
  876         name, cast_or_null<DefinedImportData>(impSym), hdr->Machine);
tools/lld/COFF/Writer.cpp
  973     DefinedImportData *impSym = cast_or_null<DefinedImportData>(file->impSym);
tools/lld/ELF/InputSection.cpp
  378   return cast_or_null<OutputSection>(parent);
 1071       if (InputSection *isec = cast_or_null<InputSection>(d->section))
 1164   return cast_or_null<SyntheticSection>(parent);
 1222   return cast_or_null<SyntheticSection>(parent);
tools/lld/ELF/InputSection.h
  128     return cast_or_null<ObjFile<ELFT>>(file);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
   83       } else if (auto *module_ast_ctx = llvm::cast_or_null<ClangASTContext>(
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
 1393                 llvm::cast_or_null<FunctionDecl>(CopyDecl(decl));
tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
   57     return llvm::cast_or_null<CPPLanguageRuntime>(
tools/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
  208     return llvm::cast_or_null<ObjCLanguageRuntime>(
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
 3517         llvm::cast_or_null<clang::BlockDecl>(m_die_to_decl_ctx[die.GetDIE()]);
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  786     if (auto *dwarf_cu = llvm::cast_or_null<DWARFCompileUnit>(
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  333     auto *clang = llvm::cast_or_null<ClangASTContext>(&ts_or_err.get());
tools/opt/BreakpointPrinter.cpp
   49         auto *SP = cast_or_null<DISubprogram>(NMD->getOperand(i));
unittests/Support/Casting.cpp
   66     return cast_or_null<foo>(this);
  153   const foo *F11 = cast_or_null<foo>(B2);
  155   const foo *F12 = cast_or_null<foo>(B2);
  157   const foo *F13 = cast_or_null<foo>(B4);
  159   const foo *F14 = cast_or_null<foo>(fub());  // Shouldn't print.
utils/TableGen/DAGISelMatcherOpt.cpp
  369         cast_or_null<CheckTypeMatcher>(FindNodeWithKind(NewOptionsToMatch[i],