[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)
Qizhi Hu via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 25 03:52:37 PDT 2024
================
@@ -7706,7 +7706,7 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
// FIXME: The language rules don't say what happens in this case.
// FIXME: We get an opaque dependent type out of decltype(auto) if the
// expression is merely instantiation-dependent; is this enough?
- if (CTAK == CTAK_Deduced && Arg->isTypeDependent()) {
+ if (Arg->isTypeDependent()) {
----------------
jcsxky wrote:
After looking into the code a bit more, I think this won't happen since the type of `Arg` can't be dependent if the condition `CTAK == CTAK_DeducedFromArrayBound` holds. Because it has been deduced as a certain expression at the moment.
https://github.com/llvm/llvm-project/pull/89862
More information about the cfe-commits
mailing list