[clang-tools-extra] [clang-tidy] Disable bugprone-multi-level-pointer-conversion in C code (PR #141209)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Sat May 24 03:38:28 PDT 2025
PiotrZSL wrote:
Ok, but that is for "some projects". If you search internet you may find examples when people omit those casts and were people add those casts.
For example: https://www.tutorialspoint.com/c_standard_library/c_function_malloc.htm
And with multi level pointer conversion it's easy to make mistake later.
This is why I don't like disabling permanently check for C, as for some projects it could be hiding potential issues.
But adding option "EnableInC" and even set it to "false" by default would be fine, as it would still allow projects that want such conversions be explicit to enable it.
https://github.com/llvm/llvm-project/pull/141209
More information about the cfe-commits
mailing list