Skip to content

Commit a8f5d1e

Browse files
committed
[-Wunsafe-buffer-usage] Add a subgroup -Wunsafe-buffer-usage-in-container (llvm#75665)
Add a sub diagnostic group under `-Wunsafe-buffer-usage` controlled by `-Wunsafe-buffer-usage-in-container`. The subgroup will include warnings on misuses of `std::span`, `std::vector`, and `std::array`. (cherry picked from commit 4123b95)
1 parent 9c33060 commit a8f5d1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,4 +1453,5 @@ def DXILValidation : DiagGroup<"dxil-validation">;
14531453
def ReadOnlyPlacementChecks : DiagGroup<"read-only-types">;
14541454

14551455
// Warnings and fixes to support the "safe buffers" programming model.
1456-
def UnsafeBufferUsage : DiagGroup<"unsafe-buffer-usage">;
1456+
def UnsafeBufferUsageInContainer : DiagGroup<"unsafe-buffer-usage-in-container">;
1457+
def UnsafeBufferUsage : DiagGroup<"unsafe-buffer-usage", [UnsafeBufferUsageInContainer]>;

0 commit comments

Comments
 (0)