[Lldb-commits] [lldb] [lldb] Assert lack of trailing period or newlines in diagnostics (PR #191447)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 10 09:11:04 PDT 2026
================
@@ -33,6 +33,12 @@ static llvm::raw_ostream ¬e(Stream &strm) {
<< "note: ";
}
+static llvm::StringRef validate(llvm::StringRef diagnostic) {
+ assert(!diagnostic.ends_with('\n') && !diagnostic.ends_with('.') &&
+ "diagnostics should end without a period/newline");
+ return diagnostic.trim("\n.");
----------------
Michael137 wrote:
Should we add a comment saying why we still trim the characters (and why `\n`/`.` specifically)?
https://github.com/llvm/llvm-project/pull/191447
More information about the lldb-commits
mailing list