[Lldb-commits] [lldb] [lldb] Assert lack of trailing period or newlines in diagnostics (PR #191447)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 10 09:04:26 PDT 2026


================
@@ -33,6 +33,12 @@ static llvm::raw_ostream &note(Stream &strm) {
          << "note: ";
 }
 
+static llvm::StringRef validate(llvm::StringRef diagnostic) {
+  assert(!diagnostic.ends_with('\n') && !diagnostic.ends_with('.') &&
----------------
DavidSpickett wrote:

Should we check that when the first character is `[a-zA-Z]`, it is one of `[a-z]`?

In llvm/include/llvm/ADT/StringExtras.h there is an isupper.


https://github.com/llvm/llvm-project/pull/191447


More information about the lldb-commits mailing list