Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>,
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>


================
@@ -2282,6 +2306,9 @@ void 
ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
   const NamedDecl *D = walker.getDecl();
   CurrentFunction = dyn_cast<FunctionDecl>(D);
 
+  if (CurrentFunction)
+    checkMismatchedFunctionAttrs(CurrentFunction);
----------------
aaronpuchert wrote:

We also analyze `ObjCMethodDecl`. You might want to do the same check for them. 
In fact I don't think your check needs a `FunctionDecl`, it seems like it only 
checks for attributes which can be done for any `Decl`.

However, in #110523 we add support for attributes on parameters. So we might 
also turn `checkMismatchedFunctionAttrs` into a template that can handle both 
kinds of declarations.

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

Reply via email to