[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 00:40:40 PST 2024


================
@@ -1315,6 +1319,34 @@ with its corresponding `Wno-` option.
 Note that when combined with :option:`-w` (which disables all warnings),
 disabling all warnings wins.
 
+.. _warning_suppression_mappings:
+
+Controlling Diagnostics via Suppression Mappings
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabling enforcement of diagnostics in specific parts
+of the project, even if there are violations in some headers.
----------------
kadircet wrote:

> Reword: some headers -> some headers which cannot be modified.

But this covers headers even inside the project (i.e. the incremental cleanup of a new warning). So I feel like `which cannot be modified.` adds a non-existing limitation.

https://github.com/llvm/llvm-project/pull/112517


More information about the cfe-commits mailing list