================ @@ -1315,6 +1319,29 @@ 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 enables 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 dependencies or other parts of +the codebase. + +.. code-block:: console + + $ cat mappings.txt + [unused] + src:foo/* + + $ clang --warning-suppression-mappings=mapping.txt -Wunused foo/bar.cc ---------------- AaronBallman wrote:
Maybe it's worth putting multiple files on the command line here, in different directories, so it's more clear why you'd use this instead of doing `-Wno-unused` given that the only compilation unit you can see is in the `foo` directory? https://github.com/llvm/llvm-project/pull/112517 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits