aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 7870748..67a8ac9 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -1182,7 +1182,8 @@ DSAStackTy::DSAVarData DSAStackTy::getDSA(const_iterator &Iter,
// Variables with automatic storage duration that are declared in a scope
// inside the construct are private.
if (VD && isOpenMPLocal(VD, Iter) && VD->isLocalVarDecl() &&
- (VD->getStorageClass() == SC_Auto || VD->getStorageClass() == SC_None)) {
+ (VD->getStorageClass() == StorageClass::Auto ||
+ VD->getStorageClass() == StorageClass::None)) {
DVar.CKind = OMPC_private;
return DVar;
}
@@ -1398,8 +1399,8 @@ static VarDecl *buildVarDecl(Sema &SemaRef, SourceLocation Loc, QualType Type,
DeclContext *DC = SemaRef.CurContext;
IdentifierInfo *II = &SemaRef.PP.getIdentifierTable().get(Name);
TypeSourceInfo *TInfo = SemaRef.Context.getTrivialTypeSourceInfo(Type, Loc);
- auto *Decl =
- VarDecl::Create(SemaRef.Context, DC, Loc, Loc, II, Type, TInfo, SC_None);
+ auto *Decl = VarDecl::Create(SemaRef.Context, DC, Loc, Loc, II, Type, TInfo,
+ StorageClass::None);
if (Attrs) {
for (specific_attr_iterator<AlignedAttr> I(Attrs->begin()), E(Attrs->end());
I != E; ++I)
@@ -1623,7 +1624,7 @@ const DSAStackTy::DSAVarData DSAStackTy::getTopDSA(ValueDecl *D,
!(VD->hasAttr<OMPThreadPrivateDeclAttr>() &&
SemaRef.getLangOpts().OpenMPUseTLS &&
SemaRef.getASTContext().getTargetInfo().isTLSSupported())) ||
- (VD && VD->getStorageClass() == SC_Register &&
+ (VD && VD->getStorageClass() == StorageClass::Register &&
VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl())) {
DVar.RefExpr = buildDeclRefExpr(
SemaRef, VD, D->getType().getNonReferenceType(), D->getLocation());
@@ -2984,8 +2985,8 @@ Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {
!(VD->hasAttr<OMPThreadPrivateDeclAttr>() &&
getLangOpts().OpenMPUseTLS &&
getASTContext().getTargetInfo().isTLSSupported())) ||
- (VD->getStorageClass() == SC_Register && VD->hasAttr<AsmLabelAttr>() &&
- !VD->isLocalVarDecl())) {
+ (VD->getStorageClass() == StorageClass::Register &&
+ VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl())) {
Diag(ILoc, diag::err_omp_var_thread_local)
<< VD << ((VD->getTLSKind() != VarDecl::TLS_None) ? 0 : 1);
bool IsDecl =
@@ -3138,8 +3139,8 @@ Sema::DeclGroupPtrTy Sema::ActOnOpenMPAllocateDirective(
// Check if this is a TLS variable or global register.
if (VD->getTLSKind() != VarDecl::TLS_None ||
VD->hasAttr<OMPThreadPrivateDeclAttr>() ||
- (VD->getStorageClass() == SC_Register && VD->hasAttr<AsmLabelAttr>() &&
- !VD->isLocalVarDecl()))
+ (VD->getStorageClass() == StorageClass::Register &&
+ VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl()))
continue;
// If the used several times in the allocate directive, the same allocator
@@ -5984,9 +5985,10 @@ static void setPrototype(Sema &S, FunctionDecl *FD, FunctionDecl *FDWithProto,
FD->setType(NewType);
SmallVector<ParmVarDecl *, 16> Params;
for (const ParmVarDecl *P : FDWithProto->parameters()) {
- auto *Param = ParmVarDecl::Create(S.getASTContext(), FD, SourceLocation(),
- SourceLocation(), nullptr, P->getType(),
- /*TInfo=*/nullptr, SC_None, nullptr);
+ auto *Param =
+ ParmVarDecl::Create(S.getASTContext(), FD, SourceLocation(),
+ SourceLocation(), nullptr, P->getType(),
+ /*TInfo=*/nullptr, StorageClass::None, nullptr);
Param->setScopeInfo(0, Params.size());
Param->setImplicit();
Params.push_back(Param);
@@ -18378,7 +18380,7 @@ Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl(Scope *S, QualType MapperType,
Context.getTrivialTypeSourceInfo(MapperType, StartLoc);
auto *VD = VarDecl::Create(Context, Context.getTranslationUnitDecl(),
StartLoc, StartLoc, VN.getAsIdentifierInfo(),
- MapperType, TInfo, SC_None);
+ MapperType, TInfo, StorageClass::None);
if (S)
PushOnScopeChains(VD, S, /*AddToContext=*/false);
Expr *E = buildDeclRefExpr(*this, VD, MapperType, StartLoc);