[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


================
@@ -70,6 +76,16 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags,
   else
     Diags.setExtensionHandlingBehavior(diag::Severity::Ignored);
 
+  if (!Opts.DiagnosticSuppressionMappingsFile.empty()) {
+    if (auto Buf =
----------------
kadircet wrote:

i think [Buf](https://github.com/search?type=code&auto_enroll=true&q=repo%3Allvm%2Fllvm-project+%2Fbuf.*%3D.*%5Cn%3F.*getBufferForFile%2F) version is more common than anything involving [File](https://github.com/search?type=code&auto_enroll=true&q=repo%3Allvm%2Fllvm-project+%2Ffile.*%3D.*%5Cn%3F.*getBufferForFile%2F).

Moreover, this is really a memory-buffer object, that doesn't have ties to any file anymore. So I'd argue that conceptually calling it `Buf` also makes more sense.

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


More information about the cfe-commits mailing list