[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 01:23:46 PDT 2024
================
@@ -2882,7 +2899,8 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F,
// We add the outer template arguments which is [int] to the multi-level arg
// list to ensure that the occurrence U in `C<U>` will be replaced with int
// during the substitution.
- if (F->getInstantiatedFromMemberTemplate()) {
+ if (F->getLexicalDeclContext()->getDeclKind() ==
+ clang::Decl::ClassTemplateSpecialization) {
----------------
hokein wrote:
Not needed. The F here is an instantiated template (either from an explicit deduction guide within a class or a constructor), so its DeclContext cannot be ClassTemplatePartialSpecialization. I made a code comment to clarify it.
https://github.com/llvm/llvm-project/pull/93533
More information about the cfe-commits
mailing list