[PATCH] D72018: [attributes] [analyzer] Add an attribute to prevent checkers from modeling a function

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 3 07:37:03 PST 2020


aaron.ballman added a comment.

In D72018#1802636 <https://reviews.llvm.org/D72018#1802636>, @NoQ wrote:

> Would changing the literal in the attribute have the same effect? I.e., `acquire_handle("Fuchsia_But_Please_Ignore_Me")`.


It should, but doesn't currently because we don't have any checking that the string literal matches a name in the static analyzer or clang-tidy for that attribute.

In D72018#1801739 <https://reviews.llvm.org/D72018#1801739>, @xazax.hun wrote:

> I think if there are many problems with this concept, I will fall back to hard code this information in the checker instead of using an annotation.


How much hard coded information would this remove? How often do you find that users want to add to the list of hard coded functions themselves but can't? Maybe the benefits to the attribute outweigh the downside and it is worth exploring ways to resolve some of these concerns -- I don't have a good feeling for the problem space though.


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