[all-commits] [llvm/llvm-project] 981686: [-Wunsafe-buffer-usage] Add a new warning for uses...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Fri Jan 26 15:43:58 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9816863dd439cd60c96d5764c4c21ca1a7f3d8da
https://github.com/llvm/llvm-project/commit/9816863dd439cd60c96d5764c4c21ca1a7f3d8da
Author: Ziqing Luo <ziqing at udel.edu>
Date: 2024-01-26 (Fri, 26 Jan 2024)
Changed paths:
M clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
M clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Analysis/UnsafeBufferUsage.cpp
M clang/lib/Sema/AnalysisBasedWarnings.cpp
A clang/test/SemaCXX/warn-unsafe-buffer-usage-in-container-span-construct.cpp
M clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp
Log Message:
-----------
[-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (#77148)
Constructing `std::span` objects with the two parameter constructors
could introduce mismatched bounds information, which defeats the
purpose of using `std::span`. Therefore, we warn every use of such
constructors.
rdar://115817781
More information about the All-commits
mailing list