aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorThorsten Schütt <schuett@gmail.com>2020-12-23 16:56:00 +0100
committerThorsten Schütt <schuett@gmail.com>2021-01-04 22:58:26 +0100
commitefc82c4ad2bcb256a4f4c20238d08cd3afba4d2d (patch)
tree9967045d388f16ffead61a0cfd57c5043d0efab1 /clang/lib/Sema/SemaTemplate.cpp
parentabbef2fd46d48a0d92d86f0c00fa2973f8ae2c85 (diff)
downloadllvm-efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d.zip
llvm-efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d.tar.gz
llvm-efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d.tar.bz2
[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)
Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D93765
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 6425976..9f5a004 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2218,9 +2218,10 @@ struct ConvertConstructorToDeductionGuideTransform {
// Build the parameters, needed during deduction / substitution.
SmallVector<ParmVarDecl*, 4> Params;
for (auto T : ParamTypes) {
- ParmVarDecl *NewParam = ParmVarDecl::Create(
- SemaRef.Context, DC, Loc, Loc, nullptr, T,
- SemaRef.Context.getTrivialTypeSourceInfo(T, Loc), SC_None, nullptr);
+ ParmVarDecl *NewParam =
+ ParmVarDecl::Create(SemaRef.Context, DC, Loc, Loc, nullptr, T,
+ SemaRef.Context.getTrivialTypeSourceInfo(T, Loc),
+ StorageClass::None, nullptr);
NewParam->setScopeInfo(0, Params.size());
FPTL.setParam(Params.size(), NewParam);
Params.push_back(NewParam);
@@ -4331,9 +4332,10 @@ DeclResult Sema::ActOnVarTemplateSpecialization(
// -- The argument list of the specialization shall not be identical
// to the implicit argument list of the primary template.
Diag(TemplateNameLoc, diag::err_partial_spec_args_match_primary_template)
- << /*variable template*/ 1
- << /*is definition*/(SC != SC_Extern && !CurContext->isRecord())
- << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));
+ << /*variable template*/ 1
+ << /*is definition*/ (SC != StorageClass::Extern &&
+ !CurContext->isRecord())
+ << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));
// FIXME: Recover from this by treating the declaration as a redeclaration
// of the primary template.
return true;