================
@@ -2610,6 +2610,9 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings(
 
   // The Callback function that performs analyses:
   auto CallAnalyzers = [&](const Decl *Node) -> void {
+    if (isa<FunctionDecl>(Node) && Node->hasAttr<UnsafeBufferUsageAttr>())
----------------
Fznamznon wrote:

The attribute can be applied to a `FunctionDecl` or a `FieldDecl`.
Is the check `isa<FunctionDecl>(Node)` necessary? It seems the 
`CallableVisitor` won't do anything for `FieldDecl`s anyway.

https://github.com/llvm/llvm-project/pull/125671
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to