summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorSaar Raz <saar@raz.email>2020-01-24 00:43:22 +0200
committerSaar Raz <saar@raz.email>2020-01-24 02:28:33 +0200
commit2ec65e229314d468006998eaef7074b86ef7482d (patch)
treeb40b8f4c158de29132f5c6ff17d804273a68e3c9 /clang/lib/Sema
parent29f14c1df25992db8c908e441c69e1fd4d4e4010 (diff)
downloadbcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.tar.gz
bcm5719-llvm-2ec65e229314d468006998eaef7074b86ef7482d.zip
[Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a
Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts. (cherry picked from commit 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df)
Diffstat (limited to 'clang/lib/Sema')
-rwxr-xr-xclang/lib/Sema/SemaTemplate.cpp4
-rw-r--r--clang/lib/Sema/SemaType.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index c05a08f59ac..f961244da07 100755
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -4101,7 +4101,7 @@ DeclResult Sema::ActOnVarTemplateSpecialization(
if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(),
Converted) &&
- (!Context.getLangOpts().ConceptsTS ||
+ (!Context.getLangOpts().CPlusPlus2a ||
!TemplateParams->hasAssociatedConstraints())) {
// C++ [temp.class.spec]p9b3:
//
@@ -8113,7 +8113,7 @@ DeclResult Sema::ActOnClassTemplateSpecialization(
if (Context.hasSameType(CanonType,
ClassTemplate->getInjectedClassNameSpecialization()) &&
- (!Context.getLangOpts().ConceptsTS ||
+ (!Context.getLangOpts().CPlusPlus2a ||
!TemplateParams->hasAssociatedConstraints())) {
// C++ [temp.class.spec]p9b3:
//
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 632dc51c951..93ddd047e09 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -3115,7 +3115,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state,
InventedTemplateParameterInfo *Info = nullptr;
if (D.getContext() == DeclaratorContext::PrototypeContext) {
// With concepts we allow 'auto' in function parameters.
- if (!SemaRef.getLangOpts().ConceptsTS || !Auto ||
+ if (!SemaRef.getLangOpts().CPlusPlus2a || !Auto ||
Auto->getKeyword() != AutoTypeKeyword::Auto) {
Error = 0;
break;
@@ -4730,7 +4730,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
// An error occurred parsing the trailing return type.
T = Context.IntTy;
D.setInvalidType(true);
- } else if (S.getLangOpts().ConceptsTS)
+ } else if (S.getLangOpts().CPlusPlus2a)
// Handle cases like: `auto f() -> auto` or `auto f() -> C auto`.
if (AutoType *Auto = T->getContainedAutoType())
if (S.getCurScope()->isFunctionDeclarationScope())
@@ -5356,7 +5356,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
// We represent function parameter packs as function parameters whose
// type is a pack expansion.
if (!T->containsUnexpandedParameterPack() &&
- (!LangOpts.ConceptsTS || !T->getContainedAutoType())) {
+ (!LangOpts.CPlusPlus2a || !T->getContainedAutoType())) {
S.Diag(D.getEllipsisLoc(),
diag::err_function_parameter_pack_without_parameter_packs)
<< T << D.getSourceRange();
OpenPOWER on IntegriCloud