Home
last modified time | relevance | path

Searched refs:cast_or_null (Results 1 – 25 of 149) sorted by relevance

123456

/llvm-project-15.0.7/clang/lib/Tooling/Syntax/
H A DNodes.cpp222 return cast_or_null<syntax::Leaf>( in getSwitchKeyword()
232 return cast_or_null<syntax::Leaf>( in getCaseKeyword()
247 return cast_or_null<syntax::Leaf>( in getDefaultKeyword()
257 return cast_or_null<syntax::Leaf>( in getIfKeyword()
276 return cast_or_null<syntax::Leaf>( in getForKeyword()
286 return cast_or_null<syntax::Leaf>( in getWhileKeyword()
296 return cast_or_null<syntax::Leaf>( in getContinueKeyword()
301 return cast_or_null<syntax::Leaf>( in getBreakKeyword()
306 return cast_or_null<syntax::Leaf>( in getReturnKeyword()
316 return cast_or_null<syntax::Leaf>( in getForKeyword()
[all …]
/llvm-project-15.0.7/llvm/unittests/Support/
H A DCasting.cpp65 foo *bar::caz() { return cast_or_null<foo>(this); } in caz()
186 TEST(CastingTest, cast_or_null) { in TEST() argument
187 const foo *F11 = cast_or_null<foo>(B2); in TEST()
189 const foo *F12 = cast_or_null<foo>(B2); in TEST()
191 const foo *F13 = cast_or_null<foo>(B4); in TEST()
193 const foo *F14 = cast_or_null<foo>(fub()); // Shouldn't print. in TEST()
199 auto FP = cast_or_null<foo>(std::move(BP)); in TEST()
476 EXPECT_EQ(cast_or_null<pointer_wrappers::Derived>(MN), nullptr); in TEST()
477 EXPECT_EQ(cast_or_null<pointer_wrappers::Derived>(CN), nullptr); in TEST()
478 EXPECT_EQ(cast_or_null<pointer_wrappers::Derived>(MD), &D); in TEST()
[all …]
/llvm-project-15.0.7/clang/include/clang/AST/
H A DStmtCXX.h163 return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]); in getBeginStmt()
165 DeclStmt *getEndStmt() { return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]); } in getEndStmt()
166 Expr *getCond() { return cast_or_null<Expr>(SubExprs[COND]); } in getCond()
167 Expr *getInc() { return cast_or_null<Expr>(SubExprs[INC]); } in getInc()
175 return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]); in getBeginStmt()
178 return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]); in getEndStmt()
181 return cast_or_null<Expr>(SubExprs[COND]); in getCond()
184 return cast_or_null<Expr>(SubExprs[INC]); in getInc()
402 return cast_or_null<Expr>(getStoredStmts()[SubStmt::Allocate]); in getAllocate()
405 return cast_or_null<Expr>(getStoredStmts()[SubStmt::Deallocate]); in getDeallocate()
H A DExprOpenMP.h94 Expr *getLowerBound() { return cast_or_null<Expr>(SubExprs[LOWER_BOUND]); } in getLowerBound()
96 return cast_or_null<Expr>(SubExprs[LOWER_BOUND]); in getLowerBound()
102 Expr *getLength() { return cast_or_null<Expr>(SubExprs[LENGTH]); } in getLength()
103 const Expr *getLength() const { return cast_or_null<Expr>(SubExprs[LENGTH]); } in getLength()
108 Expr *getStride() { return cast_or_null<Expr>(SubExprs[STRIDE]); } in getStride()
109 const Expr *getStride() const { return cast_or_null<Expr>(SubExprs[STRIDE]); } in getStride()
H A DStmtObjC.h223 return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]); in getCatchStmt()
229 return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]); in getCatchStmt()
243 return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]); in getFinallyStmt()
249 return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]); in getFinallyStmt()
H A DStmtOpenMP.h666 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
1698 return cast_or_null<Expr>(Data->getChildren()[numLoopChildren( in getTaskReductionRefExpr()
1842 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
2165 return cast_or_null<Expr>(Data->getChildren()[numLoopChildren( in getTaskReductionRefExpr()
2299 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
2362 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
2441 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
3030 return cast_or_null<Expr>( in getUpdateExpr()
3034 return cast_or_null<Expr>( in getUpdateExpr()
3369 return cast_or_null<Expr>(Data->getChildren()[0]); in getTaskReductionRefExpr()
[all …]
H A DDeclTemplate.h1070 return cast_or_null<FunctionTemplateDecl>(
1074 return cast_or_null<FunctionTemplateDecl>(
1088 return cast_or_null<FunctionTemplateDecl>(
2362 return cast_or_null<ClassTemplateDecl>(
2366 return cast_or_null<ClassTemplateDecl>(
2380 return cast_or_null<ClassTemplateDecl>(
2584 return cast_or_null<TypeAliasTemplateDecl>(
2588 return cast_or_null<TypeAliasTemplateDecl>(
3191 return cast_or_null<VarTemplateDecl>(
3195 return cast_or_null<VarTemplateDecl>(
[all …]
/llvm-project-15.0.7/llvm/lib/IR/
H A DModule.cpp111 return cast_or_null<GlobalValue>(getValueSymbolTable().lookup(Name)); in getNamedValue()
550 cast_or_null<ConstantAsMetadata>(getModuleFlag("NumRegisterParameters")); in getNumberRegisterParameters()
557 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Dwarf Version")); in getDwarfVersion()
564 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("DWARF64")); in isDwarf64()
569 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("CodeView")); in getCodeViewFlag()
589 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("PIC Level")); in getPICLevel()
603 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("PIE Level")); in getPIELevel()
617 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Code Model")); in getCodeModel()
649 auto *Val = cast_or_null<ConstantAsMetadata>(MF); in getSemanticInterposition()
665 auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("RtLibUseGOT")); in getRtLibUseGOT()
[all …]
H A DDebugLoc.cpp21 return cast_or_null<DILocation>(Loc.get()); in get()
H A DDIBuilder.cpp183 auto *M = DIImportedEntity::get(C, Tag, Context, cast_or_null<DINode>(NS), in createImportedModule()
500 cast_or_null<MDTuple>(TemplateParams), UniqueIdentifier); in createClassType()
744 VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F, in createGlobalVariableExpression()
746 cast_or_null<DIDerivedType>(Decl), TemplateParams, AlignInBits, in createGlobalVariableExpression()
762 VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F, in createTempGlobalVariableFwdDecl()
764 cast_or_null<DIDerivedType>(Decl), TemplateParams, AlignInBits, in createTempGlobalVariableFwdDecl()
782 VMContext, cast_or_null<DILocalScope>(Context), Name, File, LineNo, Ty, in createLocalVariable()
819 auto *Node = DILabel::get(VMContext, cast_or_null<DILocalScope>(Context), in createLabel()
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DDebugInfoMetadata.h86 return cast_or_null<DIType>(N->getOperand(I));
143 return cast_or_null<Ty>(getOperand(I)); in getOperandAs()
1012 return cast_or_null<MDTuple>(getRawAnnotations()); in getAnnotations()
1177 return cast_or_null<MDTuple>(getRawElements()); in getElements()
1311 return cast_or_null<MDTuple>(getRawTypeArray()); in getTypeArray()
1462 return cast_or_null<MDTuple>(getRawEnumTypes()); in getEnumTypes()
1474 return cast_or_null<MDTuple>(getRawMacros()); in getMacros()
2011 return cast_or_null<DICompileUnit>(getRawUnit()); in getUnit()
3343 return cast_or_null<MDTuple>(getRawElements());
3419 return cast_or_null<Ty>(getOperand(I));
[all …]
/llvm-project-15.0.7/clang/lib/AST/
H A DDeclOpenMP.cpp127 return cast_or_null<OMPDeclareReductionDecl>( in getPrevDeclInScope()
132 return cast_or_null<OMPDeclareReductionDecl>( in getPrevDeclInScope()
159 return cast_or_null<OMPDeclareMapperDecl>( in getPrevDeclInScope()
164 return cast_or_null<OMPDeclareMapperDecl>( in getPrevDeclInScope()
H A DDeclFriend.cpp30 return cast_or_null<FriendDecl>( in getNextFriendSlowCase()
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/Utils/
H A DWebAssemblyUtilities.cpp128 MCSymbolWasm *Sym = cast_or_null<MCSymbolWasm>(Ctx.lookupSymbol(Name)); in getOrCreateFunctionTableSymbol()
147 MCSymbolWasm *Sym = cast_or_null<MCSymbolWasm>(Ctx.lookupSymbol(Name)); in getOrCreateFuncrefCallTableSymbol()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DMemorySSAUpdater.cpp279 if (MemoryPhi *Phi = cast_or_null<MemoryPhi>(MP)) in insertUse()
372 if (const auto *RealPHI = cast_or_null<MemoryPhi>(VH)) in insertDef()
579 cast_or_null<Instruction>(VMap.lookup(DefMUDI))) { in getNewDefiningAccessForClone()
691 if (BasicBlock *NewIncBB = cast_or_null<BasicBlock>(VMap.lookup(IncBB))) in updateForClonedLoop()
709 cast_or_null<Instruction>(VMap.lookup(IncI))) { in updateForClonedLoop()
731 BasicBlock *NewBlock = cast_or_null<BasicBlock>(VMap.lookup(BB)); in updateForClonedLoop()
780 if (BasicBlock *NewExit = cast_or_null<BasicBlock>(VMap->lookup(Exit))) { in privateUpdateExitBlocksForClonedLoop()
1095 if (auto *MPhi = cast_or_null<MemoryPhi>(VH)) in applyInsertUpdates()
1367 cast_or_null<MemoryPhi>(PhisToOptimize.pop_back_val())) in removeMemoryAccess()
1404 if (auto *MPhi = cast_or_null<MemoryPhi>(VH)) in tryRemoveTrivialPhis()
/llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/Models/
H A DUncheckedOptionalAccessModel.cpp193 cast_or_null<BoolValue>(OptionalVal->getProperty("has_value")); in getHasValue()
294 cast_or_null<BoolValue>(OptionalVal.getProperty("has_value")); in isEmptyOptional()
303 cast_or_null<BoolValue>(OptionalVal.getProperty("has_value")); in isNonEmptyOptional()
359 auto *ExprValue = cast_or_null<BoolValue>( in transferValueOrImpl()
662 if (auto *HasValueVal = cast_or_null<BoolValue>(Prop)) { in diagnoseUnwrapCall()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DValueMapper.cpp152 return cast_or_null<Constant>(mapValue(C)); in mapConstant()
546 BB = cast_or_null<BasicBlock>(mapValue(BA.getBasicBlock())); in mapBlockAddress()
909 BasicBlock *BB = cast_or_null<BasicBlock>(mapValue(DBB.OldBB)); in flush()
944 MDNode *New = cast_or_null<MDNode>(mapMetadata(Old)); in remapInstruction()
1049 NewV = cast_or_null<Constant>(mapValue(V)); in mapAppendingVariable()
1164 return cast_or_null<Constant>(mapValue(C)); in mapConstant()
1172 return cast_or_null<MDNode>(mapMetadata(N)); in mapMDNode()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DSemanticSelection.cpp63 const auto *LBrace = cast_or_null<syntax::Leaf>( in extractFoldingRange()
68 const auto *RBrace = cast_or_null<syntax::Leaf>( in extractFoldingRange()
/llvm-project-15.0.7/llvm/tools/opt/
H A DBreakpointPrinter.cpp49 auto *SP = cast_or_null<DISubprogram>(NMD->getOperand(i)); in runOnModule()
/llvm-project-15.0.7/lldb/source/Plugins/LanguageRuntime/CPlusPlus/
H A DCPPLanguageRuntime.h58 return llvm::cast_or_null<CPPLanguageRuntime>( in Get()
/llvm-project-15.0.7/clang/test/Analysis/Inputs/
H A Dllvm.h15 const X *cast_or_null(Y Value);
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DFlattenCFGPass.cpp62 if (auto *BB = cast_or_null<BasicBlock>(BlockHandle)) in iterativelyFlattenCFG()
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DLLVM.h64 using llvm::cast_or_null;
/llvm-project-15.0.7/clang/unittests/Analysis/FlowSensitive/
H A DTypeErasedDataflowAnalysisTest.cpp344 auto *IsSet1 = cast_or_null<BoolValue>(Val1.getProperty("is_set")); in compareEquivalent()
348 auto *IsSet2 = cast_or_null<BoolValue>(Val2.getProperty("is_set")); in compareEquivalent()
365 auto *IsSet1 = cast_or_null<BoolValue>(Val1.getProperty("is_set")); in merge()
369 auto *IsSet2 = cast_or_null<BoolValue>(Val2.getProperty("is_set")); in merge()
509 auto *HasValue1 = cast_or_null<BoolValue>(Val1.getProperty("has_value")); in merge()
513 auto *HasValue2 = cast_or_null<BoolValue>(Val2.getProperty("has_value")); in merge()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DSlicingCheck.cpp93 if (const auto *BaseRecord = cast_or_null<CXXRecordDecl>( in diagnoseSlicedOverriddenMethods()

123456