Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/67...@github.com>
================ @@ -5794,6 +5794,30 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, RequiresCapabilityAttr(S.Context, AL, Args.data(), Args.size()); D->addAttr(RCA); + + if (const auto *FD = dyn_cast<FunctionDecl>(D)) { + + auto collectExprs = [](const FunctionDecl *FuncDecl) { + std::set<const ValueDecl*> Args; + for (const auto *A : FuncDecl->specific_attrs<RequiresCapabilityAttr>()) { + for (const Expr *E : A->args()) { + if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) + Args.insert(DRE->getDecl()); ---------------- tbaederr wrote: All the `DeclRefExpr`s are different, so even passing `mu1, mu1` to the attribute results in two different expressions unfortunately. https://github.com/llvm/llvm-project/pull/67520 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits