CJ-Johnson marked an inline comment as done.
CJ-Johnson added a comment.

Thanks for the additional info, @aaron.ballman! I had not considered the issues 
with duplicate warnings. I agree that it would be annoying for users. That 
being the case, the second option ("remove the string_view nullptr checking 
functionality from bugprone-string-constructor so it only lives in the new 
check") sounds the most appealing to me, personally.



================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/bugprone-stringview-nullptr.cpp:84
+
+    (void)(std::string_view({nullptr})) /* a3 */;
+    // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: constructing 
basic_string_view from null is undefined; replace with the default constructor
----------------
aaron.ballman wrote:
> This (and many others) also generates `-Wbraced-scalar-init`, is that 
> intentional?
My goal was just to be thorough in the cases tested. It's not an endorsement of 
the source patterns. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113148

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to