[PATCH] D114823: Filter string_view from the nullptr diagnosis of bugprone-string-constructor to prevent duplicate warnings with bugprone-stringview-nullptr

CJ Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 12 10:22:12 PST 2022


CJ-Johnson added a comment.

In D114823#3229990 <https://reviews.llvm.org/D114823#3229990>, @njames93 wrote:

> I'm in 2 minds about this. This diagnostic is a good fit for this warning and shouldn't be removed. Likewise duplicate diagnostics from different checks is annoying. Maybe a better path forward would be to suppress the diagnostic if the `bugprone-stringview-nullptr` check is enabled. These kinds of intercheck dependencies are found in modernize-prefer-member-init check IIRC. You can just copy the impl from there.

Great suggestion! I've updated this diff to do exactly that. Thanks! :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114823/new/

https://reviews.llvm.org/D114823



More information about the cfe-commits mailing list