[clang] 4123b95 - [-Wunsafe-buffer-usage] Add a subgroup `-Wunsafe-buffer-usage-in-container` (#75665)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 10:39:20 PST 2023
Author: Ziqing Luo
Date: 2023-12-18T10:39:15-08:00
New Revision: 4123b95949727cb171bfcac6fcec89ea8cb76ef2
URL: https://github.com/llvm/llvm-project/commit/4123b95949727cb171bfcac6fcec89ea8cb76ef2
DIFF: https://github.com/llvm/llvm-project/commit/4123b95949727cb171bfcac6fcec89ea8cb76ef2.diff
LOG: [-Wunsafe-buffer-usage] Add a subgroup `-Wunsafe-buffer-usage-in-container` (#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`.
Added:
Modified:
clang/include/clang/Basic/DiagnosticGroups.td
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 80b5680b94f6ca..7cf347e92d9972 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -1488,4 +1488,5 @@ def DXILValidation : DiagGroup<"dxil-validation">;
def ReadOnlyPlacementChecks : DiagGroup<"read-only-types">;
// Warnings and fixes to support the "safe buffers" programming model.
-def UnsafeBufferUsage : DiagGroup<"unsafe-buffer-usage">;
+def UnsafeBufferUsageInContainer : DiagGroup<"unsafe-buffer-usage-in-container">;
+def UnsafeBufferUsage : DiagGroup<"unsafe-buffer-usage", [UnsafeBufferUsageInContainer]>;
More information about the cfe-commits
mailing list