[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)
gehry via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 4 07:43:55 PDT 2021
Sockke added subscribers: whisperity, aaron.ballman.
Sockke added a comment.
In D113148#3108705 <https://reviews.llvm.org/D113148#3108705>, @CJ-Johnson wrote:
> In D113148#3107897 <https://reviews.llvm.org/D113148#3107897>, @Sockke wrote:
>
>> This seems to be an existing check. Have you compared it with **bugprone-string-constructor**?
>
> Thanks for the suggestion! From what I can tell, bugprone-string-constructor check only has warnings and does not provide fixes in most cases. The goal of bugprone-stringview-nullptr is to robustly enumerate the many cases that it cares about and provide fixes. For that reason, I think making it a separate check is best.
Yes, But i think that improving existing check is the best way. Because improving bugprone-string-construct in a new check may make developers confused and cause redundant overlap.
Let's see if @aaron.ballman or @whisperity has any comments?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113148/new/
https://reviews.llvm.org/D113148
More information about the cfe-commits
mailing list