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

References

tools/clang/lib/Sema/SemaLambda.cpp
 1024   for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E;
 1025        PrevCaptureLoc = C->Loc, ++C) {
 1025        PrevCaptureLoc = C->Loc, ++C) {
 1026     if (C->Kind == LCK_This || C->Kind == LCK_StarThis) {
 1026     if (C->Kind == LCK_This || C->Kind == LCK_StarThis) {
 1027       if (C->Kind == LCK_StarThis)
 1028         Diag(C->Loc, !getLangOpts().CPlusPlus17
 1036         Diag(C->Loc, diag::err_capture_more_than_once)
 1039                    SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));
 1048       if (Intro.Default == LCD_ByCopy && C->Kind != LCK_StarThis)
 1049         Diag(C->Loc, !getLangOpts().CPlusPlus2a
 1058         Diag(C->Loc, diag::err_this_capture) << true;
 1062       CheckCXXThisCapture(C->Loc, /*Explicit=*/true, /*BuildAndDiagnose*/ true,
 1064                           C->Kind == LCK_StarThis);
 1066         LSI->ExplicitCaptureRanges[LSI->Captures.size() - 1] = C->ExplicitRange;
 1070     assert(C->Id && "missing identifier for capture");
 1072     if (C->Init.isInvalid())
 1076     if (C->Init.isUsable()) {
 1077       Diag(C->Loc, getLangOpts().CPlusPlus14
 1086       if (C->InitCaptureType.get().isNull())
 1089       if (C->Init.get()->containsUnexpandedParameterPack() &&
 1090           !C->InitCaptureType.get()->getAs<PackExpansionType>())
 1091         DiagnoseUnexpandedParameterPack(C->Init.get(), UPPC_Initializer);
 1094       switch (C->InitKind) {
 1107       Var = createLambdaInitCaptureVarDecl(C->Loc, C->InitCaptureType.get(),
 1107       Var = createLambdaInitCaptureVarDecl(C->Loc, C->InitCaptureType.get(),
 1108                                            C->EllipsisLoc, C->Id, InitStyle,
 1108                                            C->EllipsisLoc, C->Id, InitStyle,
 1109                                            C->Init.get());
 1117       assert(C->InitKind == LambdaCaptureInitKind::NoInit &&
 1125       if (C->Kind == LCK_ByRef && Intro.Default == LCD_ByRef) {
 1126         Diag(C->Loc, diag::err_reference_capture_with_reference_default)
 1128                 SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));
 1130       } else if (C->Kind == LCK_ByCopy && Intro.Default == LCD_ByCopy) {
 1131         Diag(C->Loc, diag::err_copy_capture_with_copy_default)
 1133                 SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));
 1140       DeclarationNameInfo Name(C->Id, C->Loc);
 1140       DeclarationNameInfo Name(C->Id, C->Loc);
 1154       if (Var && DiagnoseUseOfDecl(Var, C->Loc))
 1161     if (!CaptureNames.insert(C->Id).second) {
 1163         Diag(C->Loc, diag::err_capture_more_than_once)
 1164             << C->Id << SourceRange(LSI->getCapture(Var).getLocation())
 1166                    SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));
 1170         Diag(C->Loc, diag::err_capture_more_than_once) << C->Id;
 1170         Diag(C->Loc, diag::err_capture_more_than_once) << C->Id;
 1179       Diag(C->Loc, diag::err_capture_does_not_name_variable) << C->Id;
 1179       Diag(C->Loc, diag::err_capture_does_not_name_variable) << C->Id;
 1188       Diag(C->Loc, diag::err_capture_non_automatic_variable) << C->Id;
 1188       Diag(C->Loc, diag::err_capture_non_automatic_variable) << C->Id;
 1189       Diag(Var->getLocation(), diag::note_previous_decl) << C->Id;
 1196     if (C->EllipsisLoc.isValid()) {
 1198         EllipsisLoc = C->EllipsisLoc;
 1200         Diag(C->EllipsisLoc, diag::err_pack_expansion_without_parameter_packs)
 1201             << (C->Init.isUsable() ? C->Init.get()->getSourceRange()
 1201             << (C->Init.isUsable() ? C->Init.get()->getSourceRange()
 1202                                    : SourceRange(C->Loc));
 1210     if (C->Init.isUsable()) {
 1213       TryCaptureKind Kind = C->Kind == LCK_ByRef ? TryCapture_ExplicitByRef :
 1215       tryCaptureVariable(Var, C->Loc, Kind, EllipsisLoc);
 1218       LSI->ExplicitCaptureRanges[LSI->Captures.size() - 1] = C->ExplicitRange;