[PATCH] D91000: [clang-tidy] Add bugprone-unsafe-functions checker.

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 30 06:27:59 PST 2023


whisperity added a comment.

In D91000#4020891 <https://reviews.llvm.org/D91000#4020891>, @futogergely wrote:

> What we could do is:
>
> 1. add a new checker option to decide if we suggest replacements from AnnexK. We could avoid registering matchers this way, but I don't really like this, having an option for something we could decide from the defined macros.
> 2. As a TODO, we could make possible to register checkers AFTER the preprocessor is executed. I have not looked into this, so I don't really know if it is possible at all in the current architecture.

I think it's fine if we do not go a great length for changing the entire infrastructure around this. At least we looked, it's not possible.

@aaron.ballman said that we've likely did as much as we could. At least the matchers themselves aren't that expensive, it's a small string lookup (hopefully hashed or at least memoised) in a trivial search for a very specific node type only.

I'll try running at least one final grand CI test of this check just to make sure it's not crashing and such, but due to the C11 **and** //Annex K// requirement, I do not expect a lot of results...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91000/new/

https://reviews.llvm.org/D91000



More information about the cfe-commits mailing list