[PATCH] D79437: [clang-tidy] Add fsetpos argument checker

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 30 10:03:10 PDT 2020


aaron.ballman added a comment.

In D79437#2052704 <https://reviews.llvm.org/D79437#2052704>, @DerWaschbar wrote:

> In D79437#2052109 <https://reviews.llvm.org/D79437#2052109>, @aaron.ballman wrote:
>
> > Have you considered writing a static analyzer check so you can do data and control flow analysis to catch issues like these?
>
>
> I have noticed those issues too, but most likely the getter/setter will be in the same function body and we could measure fast how common is that issue in the wild.


That doesn't match my intuition, but if you have data, that would be excellent for helping to make a decision.

> Also, this was my first introductory project for Clang and with that, I can rewrite this as a Static Analyzer project or start working on another Clang-Tidy project.

Welcome! I think this functionality is likely useful in here as a clang-tidy check, but I'd be curious to see data on whether it finds true or false positives in the wild to help judge that. My gut instinct is that to do this properly, we'll want it in the static analyzer, but perhaps the tidy check is good enough. I'd be curious to know if others have different thoughts though (pinging @alexfh for visibility).


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D79437





More information about the cfe-commits mailing list