[clang] [clang] Warn on mismatched RequiresCapability attributes (PR #67520)

Aaron Puchert via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 15:10:25 PST 2024


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>


aaronpuchert wrote:

Maybe a single-pass algorithm would be better in the end: we find the first declaration, collect all attributes into a variety of of `CapExprSet`s, and then go through all successor declarations and check their attributes against these sets, emitting a warning if we can't find the capability expression.

We already have such a collection in `handleCall`, and we're going to add another one in #110523. We should probably factor that out, but that's not something I'd ask you to do in this change. You can just duplicate it for now.

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


More information about the cfe-commits mailing list