[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/106387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: Let's just close this one. https://github.com/llvm/llvm-project/pull/106387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread via cfe-commits
fawdlstty wrote: @steakhal Sorry, I didn't know there was a static checker. I think it should be noted in the documentation for functions whose arguments cannot be 0. May I should check these two functions in the static checker or if I should turn off the pr? https://github.com/llvm/llvm-proj

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI the compiler explorer link you shared does not invoke the static analyzer. https://github.com/llvm/llvm-project/pull/106387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: In the gcc's stadlib, strdup is already marked as `__attribute__ ((__nonnull__ (1))`, which is checked by `core.NonNullParamChecker`. The bug is [caught](https://godbolt.org/z/3fbrx4jT1), as of today. I don't think there is anything to be done here. https://github.com/llvm/llv