================
@@ -220,6 +220,14 @@ static ExprResult EvaluateAtomicConstraint(
     if (Inst.isInvalid())
       return ExprError();
 
+    if (const TemplateTypeParmType *TTPT =
+        
dyn_cast<TemplateTypeParmType>(AtomicExpr->getType().getDesugaredType(S.Context)))
 {
+      TemplateTypeParmDecl *TTPD = TTPT->getDecl();
+      if (TTPD->isInvalidDecl()) {
+        return ExprError();
+      }
+    }
+
----------------
mizvekov wrote:

Hello, I missed the earlier notification for your message, and now I will be 
unavailable for the next couple of weeks, sorry about that.

Using a TreeTransform to fix things up post facto is certainly possible, but I 
think it should still be possible to detect we are getting into a struct 
definition from within an alias template.

I think whenever we get into an alias template, we push it into an evaluation 
context, and you might be able to look there.

I will take a better look at this in a couple of weeks.

https://github.com/llvm/llvm-project/pull/142278
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to