================
@@ -2125,6 +2126,19 @@ 
TemplateInstantiator::TransformTemplateParmRefExpr(DeclRefExpr *E,
                                          Arg, PackIndex);
 }
 
+const AnnotateAttr *
+TemplateInstantiator::TransformAnnotateAttr(const AnnotateAttr *AA) {
+  SmallVector<Expr *> Args;
+  for (Expr *Arg : AA->args()) {
+    ExprResult Res = getDerived().TransformExpr(Arg);
+    if (!Res.isUsable())
+      return AA;
----------------
erichkeane wrote:

Hmm... I see this elsewhere, and I'm not thrilled that this is our behavior 
(returning the uninstantiated version of the attribute).

For Annotate, I wonder if instead we should just continue and NOT add this 
argument (so if you have one that fails all its args, we continue, but you get 
an annotate with no args, if 1/2 transform, you get 1/2)? 

WDYT?

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

Reply via email to