aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaLambda.cpp
diff options
context:
space:
mode:
authorThorsten Schütt <schuett@gmail.com>2021-01-04 23:17:45 +0100
committerThorsten Schütt <schuett@gmail.com>2021-01-04 23:17:45 +0100
commit2fd11e0b1ef8bc6ea356670f15d78795aa8bb0e7 (patch)
treebfdfdb44258f7f51b6ca74de31de45bf0e76e5a5 /clang/lib/Sema/SemaLambda.cpp
parent36263a7cccc0d98afc36dea55e7a004d08455811 (diff)
downloadllvm-2fd11e0b1ef8bc6ea356670f15d78795aa8bb0e7.zip
llvm-2fd11e0b1ef8bc6ea356670f15d78795aa8bb0e7.tar.gz
llvm-2fd11e0b1ef8bc6ea356670f15d78795aa8bb0e7.tar.bz2
Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)"
This reverts commit efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d.
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 8800ff8..af61c82 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -395,7 +395,7 @@ CXXMethodDecl *Sema::startLambdaDefinition(CXXRecordDecl *Class,
Context, Class, EndLoc,
DeclarationNameInfo(MethodName, IntroducerRange.getBegin(),
MethodNameLoc),
- MethodType, MethodTypeInfo, StorageClass::None,
+ MethodType, MethodTypeInfo, SC_None,
/*isInline=*/true, ConstexprKind, EndLoc, TrailingRequiresClause);
Method->setAccess(AS_public);
if (!TemplateParams)
@@ -867,8 +867,8 @@ VarDecl *Sema::createLambdaInitCaptureVarDecl(SourceLocation Loc,
// used as a variable, and only exists as a way to name and refer to the
// init-capture.
// FIXME: Pass in separate source locations for '&' and identifier.
- VarDecl *NewVD = VarDecl::Create(Context, CurContext, Loc, Loc, Id,
- InitCaptureType, TSI, StorageClass::Auto);
+ VarDecl *NewVD = VarDecl::Create(Context, CurContext, Loc,
+ Loc, Id, InitCaptureType, TSI, SC_Auto);
NewVD->setInitCapture(true);
NewVD->setReferenced(true);
// FIXME: Pass in a VarDecl::InitializationStyle.
@@ -1484,8 +1484,7 @@ static void addFunctionPointerConversion(Sema &S, SourceRange IntroducerRange,
// to the new static invoker parameters - not the call operator's.
CXXMethodDecl *Invoke = CXXMethodDecl::Create(
S.Context, Class, Loc, DeclarationNameInfo(InvokerName, Loc),
- InvokerFunctionTy, CallOperator->getTypeSourceInfo(),
- StorageClass::Static,
+ InvokerFunctionTy, CallOperator->getTypeSourceInfo(), SC_Static,
/*isInline=*/true, ConstexprSpecKind::Unspecified,
CallOperator->getBody()->getEndLoc());
for (unsigned I = 0, N = CallOperator->getNumParams(); I != N; ++I)
@@ -2009,9 +2008,10 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation,
// the lambda object.
TypeSourceInfo *CapVarTSI =
Context.getTrivialTypeSourceInfo(Src->getType());
- VarDecl *CapVar =
- VarDecl::Create(Context, Block, ConvLocation, ConvLocation, nullptr,
- Src->getType(), CapVarTSI, StorageClass::None);
+ VarDecl *CapVar = VarDecl::Create(Context, Block, ConvLocation,
+ ConvLocation, nullptr,
+ Src->getType(), CapVarTSI,
+ SC_None);
BlockDecl::Capture Capture(/*variable=*/CapVar, /*byRef=*/false,
/*nested=*/false, /*copy=*/Init.get());
Block->setCaptures(Context, Capture, /*CapturesCXXThis=*/false);