================ @@ -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:
In our case, we want adopters to always enable -Wunsafe-buffer-usage (as this is how to achieve full protection) and use other flags to temporarily suppress specific kinds of warnings during transition. But it's good to know that using different combinations of those separate flags is helpful in your cases, and I think we should support that. To that end, we need to improve this part in a separate PR: https://github.com/llvm/llvm-project/blob/7513fbd660082b4538fafaae6714edafe8f0e0f8/clang/lib/Sema/AnalysisBasedWarnings.cpp#L3075C1-L3086C6, to ensure the analysis can be enabled by any of these flags. https://github.com/llvm/llvm-project/pull/180471 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
