[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 09:13:12 PST 2024


================
@@ -1613,8 +1613,8 @@ namespace {
 bool TemplateInstantiator::AlreadyTransformed(QualType T) {
   if (T.isNull())
     return true;
-
-  if (T->isInstantiationDependentType() || T->isVariablyModifiedType())
+  if (T->isInstantiationDependentType() || T->isVariablyModifiedType() ||
+      (SemaRef.getLangOpts().CPlusPlus20 && T->isDecltypeType()))
----------------
cor3ntin wrote:

Note that this would at best retransform all the `decltype` which does sound wrong?

I'd rather try to understand why `isInstantiationDependentType` gives a bogus result, although that might be involved.


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


More information about the cfe-commits mailing list