[clang] [Clang][Sema] Use StructuralValues to model dependent NTTP arguments (PR #93556)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 07:52:39 PDT 2024
================
@@ -221,8 +221,13 @@ static const ValueDecl *getAsSimpleValueDeclRef(const ASTContext &Ctx,
// We model class non-type template parameters as their template parameter
// object declaration.
- if (V.isStruct() || V.isUnion())
+ if (V.isStruct() || V.isUnion()) {
+ // Dependent types are not supposed to be described as
+ // TemplateParamObjectDecls.
+ if (T->isDependentType() || T->isInstantiationDependentType())
+ return nullptr;
----------------
erichkeane wrote:
Ah! Thanks! That explains it.
https://github.com/llvm/llvm-project/pull/93556
More information about the cfe-commits
mailing list