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

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 09:05:36 PST 2024


================
@@ -2249,7 +2249,7 @@ void fooF1(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) {
   f->a = 1;
 }
 
-void fooF2(Foo *f);
+void fooF2(Foo *f); // expected-warning {{attribute mismatch between function declarations of 'fooF2'}}
 void fooF2(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) {
----------------
tbaederr wrote:

@aaronpuchert Is the current order fine or do you want me to investigate the missing note?

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


More information about the cfe-commits mailing list