Skip to content

Commit 4123b95

Browse files
authored
[-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`.
1 parent 363f708 commit 4123b95

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
@@ -1488,4 +1488,5 @@ def DXILValidation : DiagGroup<"dxil-validation">;
14881488
def ReadOnlyPlacementChecks : DiagGroup<"read-only-types">;
14891489

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

0 commit comments

Comments
 (0)