[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.
This commit is contained in:
Saar Raz 2020-01-24 00:43:22 +02:00
parent fcaf5f6c01
commit 67c608a969
57 changed files with 72 additions and 77 deletions

View File

@ -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">,

View File

@ -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")

View File

@ -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)

View File

@ -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.">;

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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");
}

View File

@ -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;

View File

@ -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:
//

View File

@ -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();

View File

@ -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 {

View File

@ -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;
};
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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}}

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -std=c++2a -fconcepts-ts -verify %s
// RUN: %clang_cc1 -std=c++2a -verify %s
namespace functions
{

View File

@ -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]}}

View File

@ -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" }; });

View File

@ -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;

View File

@ -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; });

View File

@ -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

View File

@ -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;

View File

@ -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; }

View File

@ -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;

View File

@ -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;

View File

@ -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}}

View File

@ -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;

View File

@ -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}}

View File

@ -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;

View File

@ -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 {

View File

@ -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
{

View File

@ -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 {

View File

@ -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 {

View File

@ -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*>;

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -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}}

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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.

View File

@ -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}}

View File

@ -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}}

View File

@ -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;

View File

@ -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
{

View File

@ -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;

View File

@ -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>

View File

@ -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;

View File

@ -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}}

View File

@ -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;