[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 02:19:36 PDT 2024


================
@@ -4027,12 +4031,10 @@ Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName,
   // Reset possible inheritance
   Style.InheritsParentConfig = false;
 
-  auto dropDiagnosticHandler = [](const llvm::SMDiagnostic &, void *) {};
-
   auto applyChildFormatTexts = [&](FormatStyle *Style) {
     for (const auto &MemBuf : llvm::reverse(ChildFormatTextToApply)) {
       auto EC = parseConfiguration(*MemBuf, Style, AllowUnknownOptions,
-                                   dropDiagnosticHandler);
+                                   DiagHandler);
----------------
pointhex wrote:

Done

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


More information about the cfe-commits mailing list