[clang] c985e7b - Revert "[Concepts] Profile TypeConstraints in ProfileTemplateParameterList"
Saar Raz via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 23:57:48 PST 2020
Author: Saar Raz
Date: 2020-01-23T09:57:20+02:00
New Revision: c985e7b07db2660b14508d3da45d55f3d4490019
URL: https://github.com/llvm/llvm-project/commit/c985e7b07db2660b14508d3da45d55f3d4490019
DIFF: https://github.com/llvm/llvm-project/commit/c985e7b07db2660b14508d3da45d55f3d4490019.diff
LOG: Revert "[Concepts] Profile TypeConstraints in ProfileTemplateParameterList"
This temporarily reverts commit 0e3ae353a47273825cd2f20f4777dcb5731cf8ec because
of a potential bug.
Added:
Modified:
clang/lib/AST/DeclTemplate.cpp
clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp
index 02296d8aea16..e750bb8b6af7 100755
--- a/clang/lib/AST/DeclTemplate.cpp
+++ b/clang/lib/AST/DeclTemplate.cpp
@@ -488,15 +488,7 @@ static void ProfileTemplateParameterList(ASTContext &C,
if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(D)) {
ID.AddInteger(1);
ID.AddBoolean(TTP->isParameterPack());
- ID.AddBoolean(TTP->hasTypeConstraint());
- if (const TypeConstraint *TC = TTP->getTypeConstraint()) {
- ID.AddPointer(TC->getNamedConcept()->getCanonicalDecl());
- ID.AddBoolean(TC->hasExplicitTemplateArgs());
- if (TC->hasExplicitTemplateArgs()) {
- for (const auto &Arg : TC->getTemplateArgsAsWritten()->arguments())
- Arg.getArgument().Profile(ID, C);
- }
- }
+ // TODO: Concepts: profile type-constraints.
continue;
}
const auto *TTP = cast<TemplateTemplateParmDecl>(D);
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..1ea4da29ee9f 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
@@ -31,23 +31,6 @@ namespace class_templates
// expected-note at -2{{during template argument deduction for class template partial specialization 'B<T *>' [with T = int *]}}
// expected-note at -3{{during template argument deduction for class template partial specialization 'B<T **>' [with T = int]}}
// expected-note at -4 2{{in instantiation of template class 'class_templates::B<int **>' requested here}}
-
- template<typename T, typename U = double>
- concept same_as = is_same<T, U>::value;
-
- template<same_as<bool> T> requires A<T>::type
- struct B<T*> {};
- // expected-note at -1{{previous}}
-
- template<same_as<bool> T> requires A<T>::type
- struct B<T*> {};
- // expected-error at -1{{redefinition}}
-
- template<same_as T> requires A<T>::type
- struct B<T*> {};
-
- template<same_as<int> T> requires A<T>::type
- struct B<T*> {};
}
namespace variable_templates
More information about the cfe-commits
mailing list