[PATCH] D127923: [Diagnostics] Accept newline and format diag opts on first line

Vang Thao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 17:16:46 PDT 2022


vangthao created this revision.
Herald added a subscriber: martong.
Herald added a project: All.
vangthao requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Accept newlines when the diagnostic string is being given by an outside source
instead of ignoring newlines. I believe the other processing done in
`FormatDiagnostic()` does not ignore newlines so we should also not ignore it
here.

Also format diagnostic options on the first line when there are multiple lines.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127923

Files:
  clang/lib/Basic/Diagnostic.cpp
  clang/lib/Frontend/TextDiagnosticPrinter.cpp
  clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp
  clang/test/Analysis/padding_message.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127923.437406.patch
Type: text/x-patch
Size: 11730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220616/589e4f42/attachment-0001.bin>


More information about the cfe-commits mailing list