[PATCH] D154838: [analyzer] Add check for null pointer passed to the %p of printf family

2023-08-29 Thread Georgiy Lebedev via Phabricator via cfe-commits
CuriousGeorgiy added a comment. @steakhal Thanks for the review comments! > This line should be just as long, as the line above. Fixed. > Our docs aren't great, but we should have a brief description what the > checker detects, basically here it would be "Find null pointers being passed > to

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-08-29 Thread Georgiy Lebedev via Phabricator via cfe-commits
CuriousGeorgiy updated this revision to Diff 554259. CuriousGeorgiy marked 2 inline comments as done. CuriousGeorgiy added a comment. Herald added a subscriber: ormris. [analyzer] Add check for null pointer passed to the %p of printf family The result of passing a null pointer to the pointer conv

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-08-10 Thread Georgiy Lebedev via Phabricator via cfe-commits
CuriousGeorgiy added a comment. @NoQ thank you for the feedback too! > So if you want to support non-standard functions, and you know that they have > the same portability issues, totally go for it! AFAIC, the functions I listed are very exotic, so I would rather skip them. > Probably a separa

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-08-10 Thread Georgiy Lebedev via Phabricator via cfe-commits
CuriousGeorgiy added a comment. @MitalAshok > Instead of checking for hard-coded names, you can check functions with the > format(printf, x, y) attribute @NoQ pointed out this is too generic, and we should go for a case-by-case approach. > You also have to check for pointer types first. This

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-07-10 Thread Georgiy Lebedev via Phabricator via cfe-commits
CuriousGeorgiy added a comment. Hi! This is my first time contributing to the LLVM project and particularly the clang static analyzer. This patch is based off https://reviews.llvm.org/D139604?id=481154. I have several questions regarding the reviewers comments (most of which I tried to address)