Skip to content

Commit 67c608a

Browse files
committed
[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.
1 parent fcaf5f6 commit 67c608a

File tree

57 files changed

+72
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+72
-77
lines changed

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def err_fe_invalid_wchar_type
105105
: Error<"invalid wchar_t type '%0'; must be one of 'char', 'short', 'int'">;
106106
def err_fe_invalid_exception_model
107107
: Error<"invalid exception model '%0' for target '%1'">;
108+
def warn_fe_concepts_ts_flag : Warning<
109+
"-fconcepts-ts is deprecated - use '-std=c++2a' for Concepts support">,
110+
InGroup<Deprecated>;
108111

109112
def warn_fe_serialized_diag_merge_failure : Warning<
110113
"unable to merge a subprocess's serialized diagnostics">,

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ LANGOPT(SizedDeallocation , 1, 0, "sized deallocation")
237237
LANGOPT(AlignedAllocation , 1, 0, "aligned allocation")
238238
LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable")
239239
LANGOPT(NewAlignOverride , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'")
240-
LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts")
241240
LANGOPT(ConceptSatisfactionCaching , 1, 1, "enable satisfaction caching for C++2a Concepts")
242241
BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation")
243242
BENIGN_LANGOPT(ModulesDebugInfo , 1, 0, "Modules debug info")

clang/include/clang/Basic/TokenKinds.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ CXX11_KEYWORD(nullptr , 0)
373373
CXX11_KEYWORD(static_assert , KEYMSCOMPAT)
374374
CXX11_KEYWORD(thread_local , 0)
375375

376-
// C++2a / concepts TS keywords
376+
// C++2a keywords
377377
CONCEPTS_KEYWORD(concept)
378378
CONCEPTS_KEYWORD(requires)
379379

clang/include/clang/Driver/CC1Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def ftest_module_file_extension_EQ :
556556
HelpText<"introduce a module file extension for testing purposes. "
557557
"The argument is parsed as blockname:major:minor:hashed:user info">;
558558
def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
559-
HelpText<"Enable C++ Extensions for Concepts.">;
559+
HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
560560
def fno_concept_satisfaction_caching : Flag<["-"],
561561
"fno-concept-satisfaction-caching">,
562562
HelpText<"Disable satisfaction caching for C++2a Concepts.">;

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ NonTypeTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
693693
QualType T, bool ParameterPack,
694694
TypeSourceInfo *TInfo) {
695695
AutoType *AT =
696-
C.getLangOpts().ConceptsTS ? T->getContainedAutoType() : nullptr;
696+
C.getLangOpts().CPlusPlus2a ? T->getContainedAutoType() : nullptr;
697697
return new (C, DC,
698698
additionalSizeToAlloc<std::pair<QualType, TypeSourceInfo *>,
699699
Expr *>(0,

clang/lib/Basic/IdentifierTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,
142142
// We treat bridge casts as objective-C keywords so we can warn on them
143143
// in non-arc mode.
144144
if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled;
145-
if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled;
145+
if (LangOpts.CPlusPlus2a && (Flags & KEYCONCEPTS)) return KS_Enabled;
146146
if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled;
147147
if (LangOpts.ModulesTS && (Flags & KEYMODULES)) return KS_Enabled;
148148
if (LangOpts.CPlusPlus && (Flags & KEYALLCXX)) return KS_Future;

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2858,9 +2858,10 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
28582858
<< A->getValue();
28592859
Opts.NewAlignOverride = 0;
28602860
}
2861-
Opts.ConceptsTS = Args.hasArg(OPT_fconcepts_ts);
28622861
Opts.ConceptSatisfactionCaching =
28632862
!Args.hasArg(OPT_fno_concept_satisfaction_caching);
2863+
if (Args.hasArg(OPT_fconcepts_ts))
2864+
Diags.Report(diag::warn_fe_concepts_ts_flag);
28642865
Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
28652866
Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
28662867
Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,6 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
385385
else
386386
Builder.defineMacro("__cplusplus", "199711L");
387387

388-
if (LangOpts.ConceptsTS)
389-
Builder.defineMacro("__cpp_concepts", "201707L");
390-
391388
// C++1z [cpp.predefined]p1:
392389
// An integer literal of type std::size_t whose value is the alignment
393390
// guaranteed by a call to operator new(std::size_t)
@@ -551,7 +548,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
551548
// C++20 features.
552549
if (LangOpts.CPlusPlus2a) {
553550
//Builder.defineMacro("__cpp_aggregate_paren_init", "201902L");
554-
//Builder.defineMacro("__cpp_concepts", "201907L");
551+
Builder.defineMacro("__cpp_concepts", "201907L");
555552
Builder.defineMacro("__cpp_conditional_explicit", "201806L");
556553
//Builder.defineMacro("__cpp_consteval", "201811L");
557554
Builder.defineMacro("__cpp_constexpr_dynamic_alloc", "201907L");
@@ -567,8 +564,6 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
567564
Builder.defineMacro("__cpp_impl_destroying_delete", "201806L");
568565

569566
// TS features.
570-
if (LangOpts.ConceptsTS)
571-
Builder.defineMacro("__cpp_experimental_concepts", "1L");
572567
if (LangOpts.Coroutines)
573568
Builder.defineMacro("__cpp_coroutines", "201703L");
574569
}

clang/lib/Parse/ParseTemplate.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ bool Parser::isTypeConstraintAnnotation() {
678678
///
679679
/// \returns true if an error occurred, and false otherwise.
680680
bool Parser::TryAnnotateTypeConstraint() {
681-
if (!getLangOpts().ConceptsTS)
681+
if (!getLangOpts().CPlusPlus2a)
682682
return false;
683683
CXXScopeSpec SS;
684684
bool WasScopeAnnotation = Tok.is(tok::annot_cxxscope);
@@ -711,9 +711,8 @@ bool Parser::TryAnnotateTypeConstraint() {
711711
/*EnteringContext=*/false,
712712
PossibleConcept,
713713
MemberOfUnknownSpecialization);
714-
assert(!MemberOfUnknownSpecialization
715-
&& "Member when we only allowed namespace scope qualifiers??");
716-
if (!PossibleConcept || TNK != TNK_Concept_template) {
714+
if (MemberOfUnknownSpecialization || !PossibleConcept ||
715+
TNK != TNK_Concept_template) {
717716
if (SS.isNotEmpty())
718717
AnnotateScopeToken(SS, !WasScopeAnnotation);
719718
return false;

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4101,7 +4101,7 @@ DeclResult Sema::ActOnVarTemplateSpecialization(
41014101

41024102
if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(),
41034103
Converted) &&
4104-
(!Context.getLangOpts().ConceptsTS ||
4104+
(!Context.getLangOpts().CPlusPlus2a ||
41054105
!TemplateParams->hasAssociatedConstraints())) {
41064106
// C++ [temp.class.spec]p9b3:
41074107
//
@@ -8113,7 +8113,7 @@ DeclResult Sema::ActOnClassTemplateSpecialization(
81138113

81148114
if (Context.hasSameType(CanonType,
81158115
ClassTemplate->getInjectedClassNameSpecialization()) &&
8116-
(!Context.getLangOpts().ConceptsTS ||
8116+
(!Context.getLangOpts().CPlusPlus2a ||
81178117
!TemplateParams->hasAssociatedConstraints())) {
81188118
// C++ [temp.class.spec]p9b3:
81198119
//

clang/lib/Sema/SemaType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,7 +3115,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state,
31153115
InventedTemplateParameterInfo *Info = nullptr;
31163116
if (D.getContext() == DeclaratorContext::PrototypeContext) {
31173117
// With concepts we allow 'auto' in function parameters.
3118-
if (!SemaRef.getLangOpts().ConceptsTS || !Auto ||
3118+
if (!SemaRef.getLangOpts().CPlusPlus2a || !Auto ||
31193119
Auto->getKeyword() != AutoTypeKeyword::Auto) {
31203120
Error = 0;
31213121
break;
@@ -4730,7 +4730,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
47304730
// An error occurred parsing the trailing return type.
47314731
T = Context.IntTy;
47324732
D.setInvalidType(true);
4733-
} else if (S.getLangOpts().ConceptsTS)
4733+
} else if (S.getLangOpts().CPlusPlus2a)
47344734
// Handle cases like: `auto f() -> auto` or `auto f() -> C auto`.
47354735
if (AutoType *Auto = T->getContainedAutoType())
47364736
if (S.getCurScope()->isFunctionDeclarationScope())
@@ -5356,7 +5356,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
53565356
// We represent function parameter packs as function parameters whose
53575357
// type is a pack expansion.
53585358
if (!T->containsUnexpandedParameterPack() &&
5359-
(!LangOpts.ConceptsTS || !T->getContainedAutoType())) {
5359+
(!LangOpts.CPlusPlus2a || !T->getContainedAutoType())) {
53605360
S.Diag(D.getEllipsisLoc(),
53615361
diag::err_function_parameter_pack_without_parameter_packs)
53625362
<< T << D.getSourceRange();

clang/test/CXX/class.derived/class.virtual/p6.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T>
44
class A {

clang/test/CXX/class/class.compare/class.spaceship/p2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ namespace BadDeducedType {
118118

119119
template<typename T> concept CmpCat = true;
120120
struct D {
121-
// FIXME: Once we support P1141R2, we should give a better diagnostic here:
122-
// {{deduced return type for defaulted three-way comparison operator must be 'auto', not 'CmpCat auto'}}
123-
friend CmpCat auto operator<=>(const D&, const D&) = default; // expected-error {{unknown type name 'CmpCat'}}
121+
// expected-error@+1 {{deduced return type for defaulted three-way comparison operator must be 'auto', not 'CmpCat auto'}}
122+
friend CmpCat auto operator<=>(const D&, const D&) = default;
124123
};
125124
}

clang/test/CXX/dcl/dcl.decl/p3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T, typename U>
44
constexpr bool is_same_v = false;

clang/test/CXX/dcl/dcl.fct/p17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22
template<typename T, typename U> constexpr bool is_same_v = false;
33
template<typename T> constexpr bool is_same_v<T, T> = true;
44

clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T, unsigned size>
44
concept LargerThan = sizeof(T) > size;

clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T> requires (sizeof(T) >= 4 && sizeof(T) <= 10)
44
// expected-note@-1{{because 'sizeof(char [20]) <= 10' (20 <= 10) evaluated to false}}

clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
namespace functions
44
{

clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
auto l1 = [] (auto x) requires (sizeof(decltype(x)) == 1) { return x; };
44
// expected-note@-1{{candidate template ignored: constraints not satisfied [with x:auto = int]}}

clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
static_assert(requires { { 0 }; });
44
static_assert(requires { { "aaaa" }; });

clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
template<typename T, typename U> constexpr bool is_same_v = false;
44
template<typename T> constexpr bool is_same_v<T, T> = true;

clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
static_assert(requires { requires true; });
44

clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
// Examples from standard
44

clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
using A = int;
44

clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 %s -I%S -std=c++2a -fconcepts-ts -verify
1+
// RUN: %clang_cc1 %s -I%S -std=c++2a -verify
22

33
namespace std { struct type_info; }
44

clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify
1+
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
22

33
using A = int;
44

clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T, typename U>
44
constexpr static bool is_same_v = false;

clang/test/CXX/over/over.match/over.match.viable/p3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
struct S2 {};
44
// expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'S1' to 'const S2' for 1st argument}}

clang/test/CXX/over/over.over/p4-2a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -verify %s
22

33
template<typename T, typename U>
44
constexpr static bool is_same_v = false;

clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -frelaxed-template-template-args -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -frelaxed-template-template-args -verify %s
22

33
template<typename T> concept C = T::f();
44
// expected-note@-1{{similar constraint}}

clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T>
44
constexpr bool is_ptr_v = false;

clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T> requires (sizeof(T) >= 2) // expected-note{{because 'sizeof(char) >= 2' (1 >= 2) evaluated to false}}
44
struct A {

clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
namespace class_templates
44
{

clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
namespace nodiag {
44

clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T>
44
struct X {

clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T> concept True = true;
44
template<typename T> concept Foo = True<T*>;

clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T> requires (sizeof(T) >= 4)
44
// expected-note@-1{{similar constraint expressions not considered equivalen}}

clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T> requires (sizeof(T) >= 4)
44
// expected-note@-1{{similar constraint expressions not considered equivalent}}

clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T> requires (sizeof(T) >= 4)
44
// expected-note@-1{{similar constraint expressions not considered equivalent}}

clang/test/CXX/temp/temp.explicit/p8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T, typename S = char> requires (sizeof(T) + sizeof(S) < 10)
44
// expected-note@-1{{because 'sizeof(char [100]) + sizeof(char) < 10' (101 < 10) evaluated to false}}

clang/test/CXX/temp/temp.param/p10-2a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s
1+
// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
22

33
template<typename T>
44
concept C1 = sizeof(T) == 1;

clang/test/CodeGenCXX/mangle-concept.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -fconcepts-ts -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
22
// expected-no-diagnostics
33

44
namespace test1 {

clang/test/Lexer/cxx-features.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %clang_cc1 -std=c++2a -fcxx-exceptions -fsized-deallocation -verify %s
66
//
77
// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s
8-
// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
8+
// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -DCONCEPTS_TS=1 -verify %s
99
// RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation
1010
// RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s
1111
// RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s
@@ -68,6 +68,10 @@
6868

6969
// init_captures checked below
7070

71+
#if check(concepts, 0, 0, 0, 0, 201907)
72+
#error "wrong value for __cpp_concepts"
73+
#endif
74+
7175
// --- C++17 features ---
7276

7377
#if check(hex_float, 0, 0, 0, 201603, 201603)
@@ -297,10 +301,6 @@
297301

298302
// --- TS features --
299303

300-
#if check(experimental_concepts, 0, 0, CONCEPTS_TS, CONCEPTS_TS, CONCEPTS_TS)
301-
#error "wrong value for __cpp_experimental_concepts"
302-
#endif
303-
304304
#if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0, 201703L)
305305
#error "wrong value for __cpp_coroutines"
306306
#endif

0 commit comments

Comments
 (0)