Skip to content

Commit c985e7b

Browse files
committed
Revert "[Concepts] Profile TypeConstraints in ProfileTemplateParameterList"
This temporarily reverts commit 0e3ae35 because of a potential bug.
1 parent 5a9ef6c commit c985e7b

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,7 @@ static void ProfileTemplateParameterList(ASTContext &C,
488488
if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(D)) {
489489
ID.AddInteger(1);
490490
ID.AddBoolean(TTP->isParameterPack());
491-
ID.AddBoolean(TTP->hasTypeConstraint());
492-
if (const TypeConstraint *TC = TTP->getTypeConstraint()) {
493-
ID.AddPointer(TC->getNamedConcept()->getCanonicalDecl());
494-
ID.AddBoolean(TC->hasExplicitTemplateArgs());
495-
if (TC->hasExplicitTemplateArgs()) {
496-
for (const auto &Arg : TC->getTemplateArgsAsWritten()->arguments())
497-
Arg.getArgument().Profile(ID, C);
498-
}
499-
}
491+
// TODO: Concepts: profile type-constraints.
500492
continue;
501493
}
502494
const auto *TTP = cast<TemplateTemplateParmDecl>(D);

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,6 @@ namespace class_templates
3131
// expected-note@-2{{during template argument deduction for class template partial specialization 'B<T *>' [with T = int *]}}
3232
// expected-note@-3{{during template argument deduction for class template partial specialization 'B<T **>' [with T = int]}}
3333
// expected-note@-4 2{{in instantiation of template class 'class_templates::B<int **>' requested here}}
34-
35-
template<typename T, typename U = double>
36-
concept same_as = is_same<T, U>::value;
37-
38-
template<same_as<bool> T> requires A<T>::type
39-
struct B<T*> {};
40-
// expected-note@-1{{previous}}
41-
42-
template<same_as<bool> T> requires A<T>::type
43-
struct B<T*> {};
44-
// expected-error@-1{{redefinition}}
45-
46-
template<same_as T> requires A<T>::type
47-
struct B<T*> {};
48-
49-
template<same_as<int> T> requires A<T>::type
50-
struct B<T*> {};
5134
}
5235

5336
namespace variable_templates

0 commit comments

Comments
 (0)