================
@@ -13559,6 +13549,9 @@ def note_safe_buffer_usage_suggestions_disabled : Note<
 def warn_unsafe_buffer_usage_in_container : Warning<
   "the two-parameter std::span construction is unsafe as it can introduce 
mismatch between buffer size and the bound information">,
   InGroup<UnsafeBufferUsageInContainer>, DefaultIgnore;
+def warn_unsafe_buffer_usage_in_string_view : Warning<
----------------
ziqingluo-90 wrote:

Consider this a nitpick coming from personal preference that you don't have to 
follow.  And, we do need `warn_unsafe_buffer_usage_in_string_view` for 
temporary suppression anyway.

I think it is good for developers to implement the warnings separately so that, 
like you said, we can tailor the warnings and patterns for each. From the 
user's point of view, these two warnings are common enough that they may want 
to categorize them together. Based on our experience, users who adopt the 
warnings are not necessarily experts in memory safety or even C++, so a simpler 
"interface" sometimes helps.

https://github.com/llvm/llvm-project/pull/180471
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to