[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 23:22:00 PDT 2024
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/67520 at github.com>
tbaederr wrote:
> So the semantics here are: if there is any `requires_capability` attribute on a function, it needs to exactly match the set of `requires_capability` attributes on every previous declaration? Or in other words: the attributes are either inherited or need to be exactly repeated? To me that sounds fine, just wanted to clarify it.
Yes, I think that makes sense. The attributes should match for all (visible) declarations. _If_ the definiton has an attribute too, it should also match.
https://github.com/llvm/llvm-project/pull/67520
More information about the cfe-commits
mailing list