[clang] [analyzer] Modernize FuchsiaHandleChecker (PR #111588)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 14 06:48:37 PDT 2024
Xazax-hun wrote:
> The problem in our code is that function that releases a handle calls a syscall via macro, so it's not possible to directly annotate it.
Ah, I see! Thanks for sharing! I think there are a couple potential workarounds here if you cannot change the macros:
* Use something like APINotes to inject annotations when parsing
* Make the check recognize the syscalls and consider them annotated.
* Make the check recognize the MACROs
I think in this particular case maybe the APINotes solution would make the most sense. See https://clang.llvm.org/docs/APINotes.html for details.
https://github.com/llvm/llvm-project/pull/111588
More information about the cfe-commits
mailing list