[PATCH] D136259: Fix crash in constraining partial specialization on nested template.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 08:41:31 PDT 2022
ilya-biryukov added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5807
bool TraverseTemplateName(TemplateName Template) {
- if (auto *TTP =
- dyn_cast<TemplateTemplateParmDecl>(Template.getAsTemplateDecl()))
- if (TTP->getDepth() == Depth)
- Used[TTP->getIndex()] = true;
+ if (TemplateDecl *TD = Template.getAsTemplateDecl())
+ if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(TD))
----------------
NIT: maybe keep a single if statement and use `dyn_cast_or_null`?
================
Comment at: clang/test/SemaTemplate/concepts-GH53354.cpp:19
+template <class T>
+requires C1<T> and true
+struct A<T> {};
----------------
why not `&& true`!?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136259/new/
https://reviews.llvm.org/D136259
More information about the cfe-commits
mailing list