[clang] [Sema] Fix assertion error in Sema::FindInstantiatedDecl (PR #96509)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 03:40:55 PDT 2024


Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?=,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/96509 at github.com>


================
@@ -6300,7 +6300,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
                   getTrivialTemplateArgumentLoc(UnpackedArg, QualType(), Loc));
           }
           QualType T = CheckTemplateIdType(TemplateName(TD), Loc, Args);
-          if (T.isNull())
+          if (T.isNull() || T->containsErrors())
----------------
Sirraide wrote:

Hmm, yeah, if every other place where this is used can already deal with a type that contains errors, then that makes sense.

https://github.com/llvm/llvm-project/pull/96509


More information about the cfe-commits mailing list