[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 17:40:48 PDT 2024
================
@@ -4026,12 +4030,13 @@ Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName,
// Reset possible inheritance
Style.InheritsParentConfig = false;
- auto dropDiagnosticHandler = [](const llvm::SMDiagnostic &, void *) {};
+ auto diagHandlerOrDropHandling =
+ DiagHandler ? DiagHandler : [](llvm::SMDiagnostic const &, void *) {};
----------------
owenca wrote:
Do you need to move the `const`?
https://github.com/llvm/llvm-project/pull/91317
More information about the cfe-commits
mailing list