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

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 1 05:30:32 PDT 2024


================
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor,
       setSeverity(Diag, Map, Loc);
 }
 
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
----------------
kadircet wrote:

because we don't have any visibility restrictions, if this utility class is available in a header, people can start depending on certain characteristics and moreover decide to add more features without keeping other users/owners of this class in the loop (as we don't have stricter visibility/owners enforcement here).

So i'd much rather keep this tight, and lift it up to a more generic place if people see the need and we agree that this class can accommodate those use cases without changing drastically.

There's also https://llvm.org/docs/CodingStandards.html#keep-internal-headers-private, which is discouraging this, and suggesting to do that only if necessary for communicating between different internal components.

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


More information about the cfe-commits mailing list