Home
last modified time | relevance | path

Searched refs:Captures (Results 1 – 25 of 30) sorted by relevance

12

/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DCaptureTrackingTest.cpp78 SmallVector<const Use *, 4> Captures; member
81 Captures.push_back(U); in captured()
112 EXPECT_EQ(7u, CT.Captures.size()); in TEST()
114 EXPECT_EQ(Call, CT.Captures[0]->getUser()); in TEST()
115 EXPECT_EQ(0u, CT.Captures[0]->getOperandNo()); in TEST()
117 EXPECT_EQ(Call, CT.Captures[1]->getUser()); in TEST()
118 EXPECT_EQ(2u, CT.Captures[1]->getOperandNo()); in TEST()
120 EXPECT_EQ(Call, CT.Captures[2]->getUser()); in TEST()
121 EXPECT_EQ(3u, CT.Captures[2]->getOperandNo()); in TEST()
129 EXPECT_EQ(ICmp, CT.Captures[5]->getUser()); in TEST()
[all …]
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DScopeInfo.h688 SmallVector<Capture, 4> Captures; variable
701 Captures.push_back(Capture(Var, isBlock, isByref, isNested, Loc, in addCapture()
703 CaptureMap[Var] = Captures.size(); in addCapture()
708 Captures.push_back(Capture(Capture::VLACapture, VLAType, in addVLATypeCapture()
721 return Captures[CXXThisCaptureIndex - 1]; in getCXXThisCapture()
736 return Captures[CaptureMap[Var] - 1]; in getCapture()
743 return Captures[Known->second - 1]; in getCapture()
920 NumExplicitCaptures = Captures.size(); in finishedExplicitCaptures()
1056 Captures.push_back(Capture(Capture::ThisCapture, isNested, Loc, CaptureType, in addThisCapture()
1058 CXXThisCaptureIndex = Captures.size(); in addThisCapture()
H A DDeclSpec.h2735 SmallVector<LambdaCapture, 4> Captures; member
2749 Captures.push_back(LambdaCapture(Kind, Loc, Id, EllipsisLoc, InitKind, Init, in addCapture()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGBlocks.h269 llvm::DenseMap<const VarDecl *, Capture *> Captures; variable
298 Captures[C.Cap->getVariable()] = &C; in buildCaptureMap()
305 auto it = Captures.find(var); in getCapture()
306 assert(it != Captures.end() && "no entry for variable!"); in getCapture()
H A DCGException.cpp1759 llvm::SmallSetVector<const VarDecl *, 4> Captures; member
1766 return !Captures.empty() || SEHCodeSlot.isValid(); in foundCaptures()
1780 Captures.insert(ParentThis); in VisitDeclRefExpr()
1784 Captures.insert(D); in VisitDeclRefExpr()
1788 Captures.insert(ParentThis); in VisitCXXThisExpr()
1940 for (const VarDecl *VD : Finder.Captures) { in EmitCapturedLocals()
H A DCGOpenMPRuntimeGPU.cpp3813 llvm::DenseMap<const VarDecl *, FieldDecl *> Captures; in adjustTargetSpecificDataForLambdas() local
3815 RD->getCaptureFields(Captures, ThisCapture); in adjustTargetSpecificDataForLambdas()
3828 auto It = Captures.find(VD); in adjustTargetSpecificDataForLambdas()
3829 assert(It != Captures.end() && "Found lambda capture without field."); in adjustTargetSpecificDataForLambdas()
H A DCGBlocks.cpp1812 const SmallVectorImpl<CGBlockInfo::Capture> &Captures, in getCopyDestroyHelperFuncName() argument
1826 for (auto &Cap : Captures) { in getCopyDestroyHelperFuncName()
H A DCGOpenMPRuntime.cpp8950 llvm::DenseMap<const VarDecl *, FieldDecl *> Captures; in generateInfoForLambdaCaptures() local
8952 RD->getCaptureFields(Captures, ThisCapture); in generateInfoForLambdaCaptures()
8975 auto It = Captures.find(VD); in generateInfoForLambdaCaptures()
8976 assert(It != Captures.end() && "Found lambda capture without field."); in generateInfoForLambdaCaptures()
/llvm-project-15.0.7/clang/test/Analysis/
H A Dblocks.mm19 // Captures i, with no copy expression.
43 // Captures s, with a copy expression calling the copy constructor for StructWithCopyConstructor.
67 // Captures s by reference, so no copy expression.
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaLambda.cpp542 ArrayRef<LambdaIntroducer::LambdaCapture> Captures, in addLambdaParameters() argument
554 for (const auto &Capture : Captures) { in addLambdaParameters()
1040 for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; in ActOnStartOfLambdaDefinition()
1081 if (!LSI->Captures.empty()) in ActOnStartOfLambdaDefinition()
1233 if (!LSI->Captures.empty()) in ActOnStartOfLambdaDefinition()
1241 addLambdaParameters(Intro.Captures, Method, CurScope); in ActOnStartOfLambdaDefinition()
1751 SmallVector<LambdaCapture, 4> Captures; in BuildLambdaExpr() local
1792 const Capture &From = LSI->Captures[I]; in BuildLambdaExpr()
1874 Captures.push_back(Capture); in BuildLambdaExpr()
1881 Class->setCaptures(Context, Captures); in BuildLambdaExpr()
[all …]
H A DSemaOpenMP.cpp8368 auto I = Captures.find(Capture); in tryBuildCapture()
8369 if (I != Captures.end()) in tryBuildCapture()
8373 Captures[Capture] = Ref; in tryBuildCapture()
9191 Captures); in checkOpenMPIterationSpace()
9193 ISC.buildCounterVar(Captures, DSA); in checkOpenMPIterationSpace()
9306 if (Captures) in buildCounterUpdate()
9322 if (Captures && !IsNonRectangularLB) in buildCounterUpdate()
9410 if (!Captures.empty()) { in buildPreInits()
9412 for (const auto &Pair : Captures) in buildPreInits()
9506 Captures[DRE] = DRE; in checkOpenMPLoop()
[all …]
H A DScopeInfo.cpp227 for (auto &Cap : Captures) in isVLATypeCaptured()
H A DSemaStmt.cpp4669 SmallVectorImpl<CapturedStmt::Capture> &Captures, in buildCapturedStmtCaptureList() argument
4671 for (const sema::Capture &Cap : RSI->Captures) { in buildCapturedStmtCaptureList()
4687 Captures.push_back(CapturedStmt::Capture(Cap.getLocation(), in buildCapturedStmtCaptureList()
4690 Captures.push_back( in buildCapturedStmtCaptureList()
4698 Captures.push_back(CapturedStmt::Capture(Cap.getLocation(), in buildCapturedStmtCaptureList()
4821 SmallVector<CapturedStmt::Capture, 4> Captures; in ActOnCapturedRegionEnd() local
4823 if (buildCapturedStmtCaptureList(*this, RSI, Captures, CaptureInits)) in ActOnCapturedRegionEnd()
4831 Captures, CaptureInits, CD, RD); in ActOnCapturedRegionEnd()
H A DSemaExpr.cpp16410 SmallVector<BlockDecl::Capture, 4> Captures; in ActOnBlockStmtExpr() local
16411 for (Capture &Cap : BSI->Captures) { in ActOnBlockStmtExpr()
16472 Captures.push_back(NewCap); in ActOnBlockStmtExpr()
16474 BD->setCaptures(Context, Captures, BSI->CXXThisCaptureIndex != 0); in ActOnBlockStmtExpr()
18671 if (llvm::any_of(LSI->Captures, [](Capture &C) { in buildLambdaCaptureFixit()
18691 if (CanDefaultCopyCapture && llvm::none_of(LSI->Captures, [](Capture &C) { in buildLambdaCaptureFixit()
18703 if (llvm::none_of(LSI->Captures, [](Capture &C) { in buildLambdaCaptureFixit()
/llvm-project-15.0.7/clang/lib/AST/
H A DStmt.cpp1320 ArrayRef<Capture> Captures, in CapturedStmt() argument
1324 : Stmt(CapturedStmtClass), NumCaptures(Captures.size()), in CapturedStmt()
1340 std::copy(Captures.begin(), Captures.end(), Buffer); in CapturedStmt()
1351 ArrayRef<Capture> Captures, in Create() argument
1364 assert(CaptureInits.size() == Captures.size() && "wrong number of arguments"); in Create()
1366 unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (Captures.size() + 1); in Create()
1367 if (!Captures.empty()) { in Create()
1370 Size += sizeof(Capture) * Captures.size(); in Create()
1374 return new (Mem) CapturedStmt(S, Kind, Captures, CaptureInits, CD, RD); in Create()
H A DDeclCXX.cpp1447 ArrayRef<LambdaCapture> Captures) { in setCaptures() argument
1451 Data.NumCaptures = Captures.size(); in setCaptures()
1453 Data.Captures = (LambdaCapture *)Context.Allocate(sizeof(LambdaCapture) * in setCaptures()
1454 Captures.size()); in setCaptures()
1455 LambdaCapture *ToCapture = Data.Captures; in setCaptures()
1456 for (unsigned I = 0, N = Captures.size(); I != N; ++I) { in setCaptures()
1457 if (Captures[I].isExplicit()) in setCaptures()
1460 *ToCapture++ = Captures[I]; in setCaptures()
1573 llvm::DenseMap<const VarDecl *, FieldDecl *> &Captures, in getCaptureFields() argument
1575 Captures.clear(); in getCaptureFields()
[all …]
H A DDecl.cpp4847 void BlockDecl::setCaptures(ASTContext &Context, ArrayRef<Capture> Captures, in setCaptures() argument
4850 this->NumCaptures = Captures.size(); in setCaptures()
4852 if (Captures.empty()) { in setCaptures()
4853 this->Captures = nullptr; in setCaptures()
4857 this->Captures = Captures.copy(Context).data(); in setCaptures()
H A DExprCXX.cpp1219 return getLambdaClass()->getLambdaData().Captures; in capture_begin()
1237 return Data.Captures + Data.NumExplicitCaptures; in explicit_capture_end()
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DFunctionExtrasTest.cpp75 TEST(UniqueFunctionTest, Captures) { in TEST() argument
/llvm-project-15.0.7/llvm/test/Transforms/SafeStack/X86/
H A Dcall.ll142 ; Captures the argument -> unsafe
/llvm-project-15.0.7/clang/include/clang/AST/
H A DDeclCXX.h414 Capture *Captures = nullptr; member
1046 void setCaptures(ASTContext &Context, ArrayRef<LambdaCapture> Captures);
1060 void getCaptureFields(llvm::DenseMap<const VarDecl *, FieldDecl *> &Captures,
1071 return isLambda() ? getLambdaData().Captures : nullptr; in captures_begin()
H A DDecl.h4279 const Capture *Captures = nullptr; variable
4346 ArrayRef<Capture> captures() const { return {Captures, NumCaptures}; } in captures()
4382 void setCaptures(ASTContext &Context, ArrayRef<Capture> Captures,
H A DStmt.h3604 CapturedStmt(Stmt *S, CapturedRegionKind Kind, ArrayRef<Capture> Captures,
3625 ArrayRef<Capture> Captures,
/llvm-project-15.0.7/clang/lib/Serialization/
H A DASTReaderDecl.cpp1875 Lambda.Captures = (Capture *)Reader.getContext().Allocate( in ReadCXXDefinitionData()
1877 Capture *ToCapture = Lambda.Captures; in ReadCXXDefinitionData()
H A DASTWriter.cpp5778 const LambdaCapture &Capture = Lambda.Captures[I]; in AddCXXDefinitionData()

12