[PATCH] D157188: [clang-tidy] Add bugprone-allocation-bool-conversion
Piotr Zegar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 6 08:06:53 PDT 2023
PiotrZSL added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/AllocationBoolConversionCheck.cpp:25
+ "malloc;calloc;realloc;strdup;fopen;fdopen;freopen;"
+ "opendir;fdopendir;popen;mmap;allocate"))) {}
+
----------------
Eugene.Zelenko wrote:
> POSIX `open`, `openat`, `creat`, `pthread_create` should be added too.
Those return integers, not pointers. Check is for pointers only, but probably could be extended to integers if we go into this direction.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157188/new/
https://reviews.llvm.org/D157188
More information about the cfe-commits
mailing list