Author: Saar Raz Date: 2020-01-24T00:48:59+02:00 New Revision: 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df
URL: https://github.com/llvm/llvm-project/commit/67c608a9695496cfc9d3fdf9d0b12b554ac6b4df DIFF: https://github.com/llvm/llvm-project/commit/67c608a9695496cfc9d3fdf9d0b12b554ac6b4df.diff LOG: [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. Added: Modified: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/include/clang/Basic/LangOptions.def clang/include/clang/Basic/TokenKinds.def clang/include/clang/Driver/CC1Options.td clang/lib/AST/DeclTemplate.cpp clang/lib/Basic/IdentifierTable.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Frontend/InitPreprocessor.cpp clang/lib/Parse/ParseTemplate.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaType.cpp clang/test/CXX/class.derived/class.virtual/p6.cpp clang/test/CXX/class/class.compare/class.spaceship/p2.cpp clang/test/CXX/dcl/dcl.decl/p3.cpp clang/test/CXX/dcl/dcl.fct/p17.cpp clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp clang/test/CXX/over/over.match/over.match.viable/p3.cpp clang/test/CXX/over/over.over/p4-2a.cpp clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp clang/test/CXX/temp/temp.explicit/p8.cpp clang/test/CXX/temp/temp.param/p10-2a.cpp clang/test/CodeGenCXX/mangle-concept.cpp clang/test/Lexer/cxx-features.cpp clang/test/Lexer/keywords_test.cpp clang/test/PCH/cxx2a-requires-expr.cpp clang/test/Parser/cxx-concept-declaration.cpp clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp clang/test/Parser/cxx-concepts-requires-clause.cpp clang/test/Parser/cxx2a-concept-declaration.cpp clang/test/Parser/cxx2a-concepts-requires-expr.cpp clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp clang/test/Parser/cxx2a-constrained-template-param.cpp clang/test/Parser/cxx2a-placeholder-type-constraint.cpp clang/test/SemaTemplate/cxx2a-constraint-caching.cpp clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp clang/test/SemaTemplate/instantiate-requires-clause.cpp clang/test/SemaTemplate/instantiate-requires-expr.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td index a798b498d4e9..ed2092fb4c84 100644 --- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td @@ -105,6 +105,9 @@ def err_fe_invalid_wchar_type : Error<"invalid wchar_t type '%0'; must be one of 'char', 'short', 'int'">; def err_fe_invalid_exception_model : Error<"invalid exception model '%0' for target '%1'">; +def warn_fe_concepts_ts_flag : Warning< + "-fconcepts-ts is deprecated - use '-std=c++2a' for Concepts support">, + InGroup<Deprecated>; def warn_fe_serialized_diag_merge_failure : Warning< "unable to merge a subprocess's serialized diagnostics">, diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index b8112eb26913..3319a3123976 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -237,7 +237,6 @@ LANGOPT(SizedDeallocation , 1, 0, "sized deallocation") LANGOPT(AlignedAllocation , 1, 0, "aligned allocation") LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable") LANGOPT(NewAlignOverride , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'") -LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts") LANGOPT(ConceptSatisfactionCaching , 1, 1, "enable satisfaction caching for C++2a Concepts") BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation") BENIGN_LANGOPT(ModulesDebugInfo , 1, 0, "Modules debug info") diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def index d58b0d987d71..fec029ae995e 100644 --- a/clang/include/clang/Basic/TokenKinds.def +++ b/clang/include/clang/Basic/TokenKinds.def @@ -373,7 +373,7 @@ CXX11_KEYWORD(nullptr , 0) CXX11_KEYWORD(static_assert , KEYMSCOMPAT) CXX11_KEYWORD(thread_local , 0) -// C++2a / concepts TS keywords +// C++2a keywords CONCEPTS_KEYWORD(concept) CONCEPTS_KEYWORD(requires) diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 9d6b381a32a1..e5a4b0078a87 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -556,7 +556,7 @@ def ftest_module_file_extension_EQ : HelpText<"introduce a module file extension for testing purposes. " "The argument is parsed as blockname:major:minor:hashed:user info">; def fconcepts_ts : Flag<["-"], "fconcepts-ts">, - HelpText<"Enable C++ Extensions for Concepts.">; + HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">; def fno_concept_satisfaction_caching : Flag<["-"], "fno-concept-satisfaction-caching">, HelpText<"Disable satisfaction caching for C++2a Concepts.">; diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 9bd3b64feb4e..b5e4ec2d7f43 100755 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -693,7 +693,7 @@ NonTypeTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC, QualType T, bool ParameterPack, TypeSourceInfo *TInfo) { AutoType *AT = - C.getLangOpts().ConceptsTS ? T->getContainedAutoType() : nullptr; + C.getLangOpts().CPlusPlus2a ? T->getContainedAutoType() : nullptr; return new (C, DC, additionalSizeToAlloc<std::pair<QualType, TypeSourceInfo *>, Expr *>(0, diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 4aebea19924f..ee25bd883caf 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -142,7 +142,7 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, // We treat bridge casts as objective-C keywords so we can warn on them // in non-arc mode. if (LangOpts.ObjC && (Flags & KEYOBJC)) return KS_Enabled; - if (LangOpts.ConceptsTS && (Flags & KEYCONCEPTS)) return KS_Enabled; + if (LangOpts.CPlusPlus2a && (Flags & KEYCONCEPTS)) return KS_Enabled; if (LangOpts.Coroutines && (Flags & KEYCOROUTINES)) return KS_Enabled; if (LangOpts.ModulesTS && (Flags & KEYMODULES)) return KS_Enabled; if (LangOpts.CPlusPlus && (Flags & KEYALLCXX)) return KS_Future; diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 398f960294b3..44abcc3843a2 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2858,9 +2858,10 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, << A->getValue(); Opts.NewAlignOverride = 0; } - Opts.ConceptsTS = Args.hasArg(OPT_fconcepts_ts); Opts.ConceptSatisfactionCaching = !Args.hasArg(OPT_fno_concept_satisfaction_caching); + if (Args.hasArg(OPT_fconcepts_ts)) + Diags.Report(diag::warn_fe_concepts_ts_flag); Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); Opts.AccessControl = !Args.hasArg(OPT_fno_access_control); Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 42e6fd88515a..8a0ff55e44fc 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -385,9 +385,6 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, else Builder.defineMacro("__cplusplus", "199711L"); - if (LangOpts.ConceptsTS) - Builder.defineMacro("__cpp_concepts", "201707L"); - // C++1z [cpp.predefined]p1: // An integer literal of type std::size_t whose value is the alignment // guaranteed by a call to operator new(std::size_t) @@ -551,7 +548,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, // C++20 features. if (LangOpts.CPlusPlus2a) { //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); - //Builder.defineMacro("__cpp_concepts", "201907L"); + Builder.defineMacro("__cpp_concepts", "201907L"); Builder.defineMacro("__cpp_conditional_explicit", "201806L"); //Builder.defineMacro("__cpp_consteval", "201811L"); Builder.defineMacro("__cpp_constexpr_dynamic_alloc", "201907L"); @@ -567,8 +564,6 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, Builder.defineMacro("__cpp_impl_destroying_delete", "201806L"); // TS features. - if (LangOpts.ConceptsTS) - Builder.defineMacro("__cpp_experimental_concepts", "1L"); if (LangOpts.Coroutines) Builder.defineMacro("__cpp_coroutines", "201703L"); } diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index e96baec0780a..3bc4e3596f12 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -678,7 +678,7 @@ bool Parser::isTypeConstraintAnnotation() { /// /// \returns true if an error occurred, and false otherwise. bool Parser::TryAnnotateTypeConstraint() { - if (!getLangOpts().ConceptsTS) + if (!getLangOpts().CPlusPlus2a) return false; CXXScopeSpec SS; bool WasScopeAnnotation = Tok.is(tok::annot_cxxscope); @@ -711,9 +711,8 @@ bool Parser::TryAnnotateTypeConstraint() { /*EnteringContext=*/false, PossibleConcept, MemberOfUnknownSpecialization); - assert(!MemberOfUnknownSpecialization - && "Member when we only allowed namespace scope qualifiers??"); - if (!PossibleConcept || TNK != TNK_Concept_template) { + if (MemberOfUnknownSpecialization || !PossibleConcept || + TNK != TNK_Concept_template) { if (SS.isNotEmpty()) AnnotateScopeToken(SS, !WasScopeAnnotation); return false; diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 05dde46fffd3..ba4cd7632f3c 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 a2034fd3f70d..2d4263170740 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(); diff --git a/clang/test/CXX/class.derived/class.virtual/p6.cpp b/clang/test/CXX/class.derived/class.virtual/p6.cpp index 63a4313de554..f0243a776b6b 100644 --- a/clang/test/CXX/class.derived/class.virtual/p6.cpp +++ b/clang/test/CXX/class.derived/class.virtual/p6.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T> class A { diff --git a/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp b/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp index 1290a063e794..a912384ccf76 100644 --- a/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp +++ b/clang/test/CXX/class/class.compare/class.spaceship/p2.cpp @@ -118,8 +118,7 @@ namespace BadDeducedType { template<typename T> concept CmpCat = true; struct D { - // FIXME: Once we support P1141R2, we should give a better diagnostic here: - // {{deduced return type for defaulted three-way comparison operator must be 'auto', not 'CmpCat auto'}} - friend CmpCat auto operator<=>(const D&, const D&) = default; // expected-error {{unknown type name 'CmpCat'}} + // expected-error@+1 {{deduced return type for defaulted three-way comparison operator must be 'auto', not 'CmpCat auto'}} + friend CmpCat auto operator<=>(const D&, const D&) = default; }; } diff --git a/clang/test/CXX/dcl/dcl.decl/p3.cpp b/clang/test/CXX/dcl/dcl.decl/p3.cpp index eec0aa2043a2..5bfec8a22da2 100644 --- a/clang/test/CXX/dcl/dcl.decl/p3.cpp +++ b/clang/test/CXX/dcl/dcl.decl/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, typename U> constexpr bool is_same_v = false; diff --git a/clang/test/CXX/dcl/dcl.fct/p17.cpp b/clang/test/CXX/dcl/dcl.fct/p17.cpp index bf19e57e7964..10e52570d946 100644 --- a/clang/test/CXX/dcl/dcl.fct/p17.cpp +++ b/clang/test/CXX/dcl/dcl.fct/p17.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, typename U> constexpr bool is_same_v = false; template<typename T> constexpr bool is_same_v<T, T> = true; diff --git a/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp b/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp index a4e71d341cd7..ae194670954c 100644 --- a/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp +++ b/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, unsigned size> concept LargerThan = sizeof(T) > size; diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp index fafb3f7b35d9..6add2c5d10a4 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/mixed-constraints.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T> requires (sizeof(T) >= 4 && sizeof(T) <= 10) // expected-note@-1{{because 'sizeof(char [20]) <= 10' (20 <= 10) evaluated to false}} diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp index f13ab279da33..f4c38c73d255 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/p4.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s namespace functions { diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp index 0c0f820d1689..9c5765b06b85 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s auto l1 = [] (auto x) requires (sizeof(decltype(x)) == 1) { return x; }; // expected-note@-1{{candidate template ignored: constraints not satisfied [with x:auto = int]}} diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp index 578efb5b24ea..19b794ba29ad 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify static_assert(requires { { 0 }; }); static_assert(requires { { "aaaa" }; }); diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp index ea3453201902..8a36d7a520a8 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/equivalence.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify template<typename T, typename U> constexpr bool is_same_v = false; template<typename T> constexpr bool is_same_v<T, T> = true; diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp index f8776832d33f..bc093a0fc50e 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify static_assert(requires { requires true; }); diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp index a1a745253dd4..d2c8cd4fc219 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify // Examples from standard diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp index f9d8c3eed111..90a38292d15d 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/requires-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify using A = int; diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp index a5e6c3057fe6..39e882b8fa5f 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -I%S -std=c++2a -fconcepts-ts -verify +// RUN: %clang_cc1 %s -I%S -std=c++2a -verify namespace std { struct type_info; } diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp index 8e402a88c403..71c87ffff8bc 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify using A = int; diff --git a/clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp b/clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp index 36c68071448c..dff06308a98e 100644 --- a/clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp +++ b/clang/test/CXX/over/over.match/over.match.best/p1-2a.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, typename U> constexpr static bool is_same_v = false; diff --git a/clang/test/CXX/over/over.match/over.match.viable/p3.cpp b/clang/test/CXX/over/over.match/over.match.viable/p3.cpp index ef752d76ec23..c6f992222677 100644 --- a/clang/test/CXX/over/over.match/over.match.viable/p3.cpp +++ b/clang/test/CXX/over/over.match/over.match.viable/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s struct S2 {}; // expected-note@-1 {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'S1' to 'const S2' for 1st argument}} diff --git a/clang/test/CXX/over/over.over/p4-2a.cpp b/clang/test/CXX/over/over.over/p4-2a.cpp index a5d7a110992c..669620360f88 100644 --- a/clang/test/CXX/over/over.over/p4-2a.cpp +++ b/clang/test/CXX/over/over.over/p4-2a.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, typename U> constexpr static bool is_same_v = false; diff --git a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp index e7feae31889e..8e69f134a3d1 100644 --- a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp +++ b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -frelaxed-template-template-args -verify %s +// RUN: %clang_cc1 -std=c++2a -frelaxed-template-template-args -verify %s template<typename T> concept C = T::f(); // expected-note@-1{{similar constraint}} diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp index 99de7261a81c..ea761b20388a 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> constexpr bool is_ptr_v = false; diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp index a25b22a9a154..7d4d858b286f 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> requires (sizeof(T) >= 2) // expected-note{{because 'sizeof(char) >= 2' (1 >= 2) evaluated to false}} struct A { diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp index 9f3c21f99174..4372aab591eb 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s namespace class_templates { diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp index 2a1a4e1b7ff7..abda86983820 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.decl/class-template-decl.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s namespace nodiag { diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp index c6fe82d8de45..749ec1ce13e6 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> struct X { diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp index 387b75c4ef09..95fe35b45914 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> concept True = true; template<typename T> concept Foo = True<T*>; diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp index 5d41035aa88d..ceb5af87b8f0 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> requires (sizeof(T) >= 4) // expected-note@-1{{similar constraint expressions not considered equivalen}} diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp index 7f68369d5284..8ae630871445 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> requires (sizeof(T) >= 4) // expected-note@-1{{similar constraint expressions not considered equivalent}} diff --git a/clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp b/clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp index cf88e34036dc..98bfaead773a 100644 --- a/clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp +++ b/clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> requires (sizeof(T) >= 4) // expected-note@-1{{similar constraint expressions not considered equivalent}} diff --git a/clang/test/CXX/temp/temp.explicit/p8.cpp b/clang/test/CXX/temp/temp.explicit/p8.cpp index 72d225578996..1f09be04afb9 100644 --- a/clang/test/CXX/temp/temp.explicit/p8.cpp +++ b/clang/test/CXX/temp/temp.explicit/p8.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T, typename S = char> requires (sizeof(T) + sizeof(S) < 10) // expected-note@-1{{because 'sizeof(char [100]) + sizeof(char) < 10' (101 < 10) evaluated to false}} diff --git a/clang/test/CXX/temp/temp.param/p10-2a.cpp b/clang/test/CXX/temp/temp.param/p10-2a.cpp index 3d2be1a92be1..f9398de9e440 100644 --- a/clang/test/CXX/temp/temp.param/p10-2a.cpp +++ b/clang/test/CXX/temp/temp.param/p10-2a.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template<typename T> concept C1 = sizeof(T) == 1; diff --git a/clang/test/CodeGenCXX/mangle-concept.cpp b/clang/test/CodeGenCXX/mangle-concept.cpp index 7e9fb1b15e1a..b0fcd586727e 100644 --- a/clang/test/CodeGenCXX/mangle-concept.cpp +++ b/clang/test/CodeGenCXX/mangle-concept.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -fconcepts-ts -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s +// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++2a -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s // expected-no-diagnostics namespace test1 { diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp index 05f77991fa34..8b9cb5434730 100644 --- a/clang/test/Lexer/cxx-features.cpp +++ b/clang/test/Lexer/cxx-features.cpp @@ -5,7 +5,7 @@ // RUN: %clang_cc1 -std=c++2a -fcxx-exceptions -fsized-deallocation -verify %s // // RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -frelaxed-template-template-args -DRELAXED_TEMPLATE_TEMPLATE_ARGS=1 -verify %s -// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s +// RUN: %clang_cc1 -std=c++17 -fcxx-exceptions -fsized-deallocation -DCONCEPTS_TS=1 -verify %s // RUN: %clang_cc1 -std=c++14 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS -fsized-deallocation // RUN: %clang_cc1 -std=c++14 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify -fsized-deallocation %s // RUN: %clang_cc1 -std=c++14 -fchar8_t -DNO_EXCEPTIONS -DCHAR8_T -verify -fsized-deallocation %s @@ -68,6 +68,10 @@ // init_captures checked below +#if check(concepts, 0, 0, 0, 0, 201907) +#error "wrong value for __cpp_concepts" +#endif + // --- C++17 features --- #if check(hex_float, 0, 0, 0, 201603, 201603) @@ -297,10 +301,6 @@ // --- TS features -- -#if check(experimental_concepts, 0, 0, CONCEPTS_TS, CONCEPTS_TS, CONCEPTS_TS) -#error "wrong value for __cpp_experimental_concepts" -#endif - #if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0, 201703L) #error "wrong value for __cpp_coroutines" #endif diff --git a/clang/test/Lexer/keywords_test.cpp b/clang/test/Lexer/keywords_test.cpp index 4c6ccca3f7e4..952d7041fdc2 100644 --- a/clang/test/Lexer/keywords_test.cpp +++ b/clang/test/Lexer/keywords_test.cpp @@ -1,6 +1,5 @@ // RUN: %clang_cc1 -std=c++03 -fsyntax-only %s // RUN: %clang_cc1 -std=c++11 -DCXX11 -fsyntax-only %s -// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -DCXX11 -DCONCEPTS -fsyntax-only %s // RUN: %clang_cc1 -std=c++2a -DCXX11 -DCXX2A -fsyntax-only %s // RUN: %clang_cc1 -std=c++03 -fdeclspec -DDECLSPEC -fsyntax-only %s // RUN: %clang_cc1 -std=c++03 -fms-extensions -DDECLSPEC -fsyntax-only %s @@ -20,7 +19,7 @@ #define NOT_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME) #define IS_TYPE(NAME) void is_##NAME##_type() { int f(NAME); } -#if defined(CONCEPTS) || defined(CXX2A) +#if defined(CXX2A) #define CONCEPTS_KEYWORD(NAME) IS_KEYWORD(NAME) #else #define CONCEPTS_KEYWORD(NAME) NOT_KEYWORD(NAME) @@ -59,7 +58,7 @@ IS_KEYWORD(static_assert); #endif CXX11_KEYWORD(thread_local); -// Concepts TS keywords +// Concepts keywords CONCEPTS_KEYWORD(concept); CONCEPTS_KEYWORD(requires); diff --git a/clang/test/PCH/cxx2a-requires-expr.cpp b/clang/test/PCH/cxx2a-requires-expr.cpp index d52d451c2d68..5548db4ccf92 100644 --- a/clang/test/PCH/cxx2a-requires-expr.cpp +++ b/clang/test/PCH/cxx2a-requires-expr.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -emit-pch -std=c++2a -fconcepts-ts -o %t %s -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x ast -ast-print %t | FileCheck %s +// RUN: %clang_cc1 -emit-pch -std=c++2a -o %t %s +// RUN: %clang_cc1 -std=c++2a -x ast -ast-print %t | FileCheck %s template<typename T> concept C = true; diff --git a/clang/test/Parser/cxx-concept-declaration.cpp b/clang/test/Parser/cxx-concept-declaration.cpp index 2e9d1ac2fc38..41bf53aed36e 100644 --- a/clang/test/Parser/cxx-concept-declaration.cpp +++ b/clang/test/Parser/cxx-concept-declaration.cpp @@ -3,5 +3,5 @@ // Disabled for now. // expected-no-diagnostics -// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s +// RUN: %clang_cc1 -std=c++14 -x c++ -verify %s // template<typename T> concept C1 = true; diff --git a/clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp b/clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp index 1cd2605ce055..f85cfcee5a20 100644 --- a/clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp +++ b/clang/test/Parser/cxx-concepts-ambig-constraint-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify // Test parsing of constraint-expressions in cases where the grammar is // ambiguous with the expectation that the longest token sequence which matches diff --git a/clang/test/Parser/cxx-concepts-requires-clause.cpp b/clang/test/Parser/cxx-concepts-requires-clause.cpp index 60e7004e0818..9cef4c64ee96 100644 --- a/clang/test/Parser/cxx-concepts-requires-clause.cpp +++ b/clang/test/Parser/cxx-concepts-requires-clause.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify // Test parsing of the optional requires-clause in a template-declaration. diff --git a/clang/test/Parser/cxx2a-concept-declaration.cpp b/clang/test/Parser/cxx2a-concept-declaration.cpp index a2362526a286..ed88fce17c76 100644 --- a/clang/test/Parser/cxx2a-concept-declaration.cpp +++ b/clang/test/Parser/cxx2a-concept-declaration.cpp @@ -1,6 +1,6 @@ // Support parsing of concepts -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T> concept C1 = true; // expected-note 2{{previous}} template<typename T> concept C1 = true; // expected-error{{redefinition}} diff --git a/clang/test/Parser/cxx2a-concepts-requires-expr.cpp b/clang/test/Parser/cxx2a-concepts-requires-expr.cpp index a53189caa5f7..6b4a5d62b407 100644 --- a/clang/test/Parser/cxx2a-concepts-requires-expr.cpp +++ b/clang/test/Parser/cxx2a-concepts-requires-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify bool r1 = requires () {}; // expected-error@-1 {{a requires expression must contain at least one requirement}} diff --git a/clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp b/clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp index 2d80475e1ebf..0afe1e6f2b6e 100644 --- a/clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp +++ b/clang/test/Parser/cxx2a-constrained-template-param-with-partial-id.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify template<typename T, int a> concept C1 = true; diff --git a/clang/test/Parser/cxx2a-constrained-template-param.cpp b/clang/test/Parser/cxx2a-constrained-template-param.cpp index 2ee544e970bd..6f14b66419c4 100644 --- a/clang/test/Parser/cxx2a-constrained-template-param.cpp +++ b/clang/test/Parser/cxx2a-constrained-template-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify namespace type { diff --git a/clang/test/Parser/cxx2a-placeholder-type-constraint.cpp b/clang/test/Parser/cxx2a-placeholder-type-constraint.cpp index a1bd08827b93..7c94cd526340 100644 --- a/clang/test/Parser/cxx2a-placeholder-type-constraint.cpp +++ b/clang/test/Parser/cxx2a-placeholder-type-constraint.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify template<typename T, typename U=void> concept C = true; diff --git a/clang/test/SemaTemplate/cxx2a-constraint-caching.cpp b/clang/test/SemaTemplate/cxx2a-constraint-caching.cpp index fd95c80ff61e..aa0ad94bef72 100644 --- a/clang/test/SemaTemplate/cxx2a-constraint-caching.cpp +++ b/clang/test/SemaTemplate/cxx2a-constraint-caching.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s -fno-concept-satisfaction-caching -DNO_CACHE +// RUN: %clang_cc1 -std=c++2a -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s -fno-concept-satisfaction-caching -DNO_CACHE // expected-no-diagnostics template<typename T> diff --git a/clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp b/clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp index 4daf31a292c2..73fef87b9782 100644 --- a/clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp +++ b/clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s +// RUN: %clang_cc1 -std=c++2a -verify %s template<typename T, typename U> constexpr bool is_same_v = false; diff --git a/clang/test/SemaTemplate/instantiate-requires-clause.cpp b/clang/test/SemaTemplate/instantiate-requires-clause.cpp index 3b7dc3ddd740..31cf484d564c 100644 --- a/clang/test/SemaTemplate/instantiate-requires-clause.cpp +++ b/clang/test/SemaTemplate/instantiate-requires-clause.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify template <typename... Args> requires ((sizeof(Args) == 1), ...) // expected-note@-1 {{because '(sizeof(int) == 1) , (sizeof(char) == 1) , (sizeof(int) == 1)' evaluated to false}} diff --git a/clang/test/SemaTemplate/instantiate-requires-expr.cpp b/clang/test/SemaTemplate/instantiate-requires-expr.cpp index 3304fd25cdc9..927bc1bf8f12 100644 --- a/clang/test/SemaTemplate/instantiate-requires-expr.cpp +++ b/clang/test/SemaTemplate/instantiate-requires-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -x c++ %s -verify -Wno-unused-value +// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify -Wno-unused-value template<typename T, typename U> constexpr bool is_same_v = false; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits