[PATCH] D115121: Update bugprone-stringview-nullptr to support return statements and constructors for any T which accepts basic_string_view

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 12 13:38:32 PST 2022


ymandel accepted this revision.
ymandel added a comment.
This revision is now accepted and ready to land.

Bravo!  This is an impressively thorough job. Thanks for pushing through to completion!



================
Comment at: clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.cpp:263
+  auto HandleConstructorInvocation =
+      makeRule(cxxConstructExpr(hasAnyArgument(ignoringImpCasts(
+                                    BasicStringViewConstructingFromNullExpr)),
----------------
precede with `argumentCountIs(1)`? Also, please comment on choice of `hasAnyArgument` (copying what you wrote in the patch description is fine).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115121



More information about the cfe-commits mailing list