[PATCH] D72018: [attributes] [analyzer] Add an attribute to prevent checkers from modeling a function
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 2 09:19:51 PST 2020
xazax.hun added a comment.
In D72018#1800018 <https://reviews.llvm.org/D72018#1800018>, @aaron.ballman wrote:
> This seems like a very specialized attribute for the static analyzer and I'm not certain how much utility it adds, but that may be because I don't understand the analyzer requirements sufficiently yet. It seems as though this attribute is intended to suppress diagnostics within a certain function for a certain check, much like `gsl::suppress` does for the C++ Core Guidelines. Is that correct? If so, perhaps we should just reuse that attribute (but with a different spelling)?
In some sense they are similar, but not entirely. When I annotate a function with `gsl::suppress`, I would expect to suppress diagnostics inside the function. When I annotate a function with `analyzer_checker_ignore`, that would suppress diagnostics in the callers of the function. So while the `gsl::suppress` is merely a way to suppress diagnostics, this attribute does change how the analysis is carried out.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72018/new/
https://reviews.llvm.org/D72018
More information about the cfe-commits
mailing list