[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

Kirill Dmitrenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 09:43:09 PDT 2020


dmikis added a comment.

@thakis We've stumbled upon this problem when tried to format in-place a read-only file. `clang-format` tries to report this problem via `DiagnosticEngine`, and that fails on assert <https://github.com/llvm/llvm-project/blob/d5a75e7738d0ca2955b3b10a7d4631110f930b67/clang/lib/Basic/Diagnostic.cpp#L495>. `clang-format` crashes. We use perforce and source files being read only is a common occurrence for us.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90121/new/

https://reviews.llvm.org/D90121



More information about the cfe-commits mailing list