[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:09:50 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");
----------------
Michael137 wrote:
Should this also check that it doesn't start with `warning:`/`error:`/`note:`?
https://github.com/llvm/llvm-project/pull/191447
More information about the lldb-commits
mailing list