================ @@ -70,6 +169,14 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, else Diags.setExtensionHandlingBehavior(diag::Severity::Ignored); + if (!Opts.SuppressionMappingsFile.empty()) { + if (auto Buf = VFS.getBufferForFile(Opts.SuppressionMappingsFile)) { + parseSuppressionMappings(**Buf, Diags); ---------------- ilya-biryukov wrote:
NIT: maybe make this return suppression mappings rather then setting them? It would make the function interface more explicit (memory buffer as input, mapping as output) and would allow to move error handling to the client (no need to pass `Diags` as parameter). NIT2: we could name the type for the lambda that we return (via typedef or through a real struct) to make these changes easier. I feel that right now the fact that the type is anonymous stops us from writing things like `Expected<ParsedMapping>`. 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