[clang] Clarify use of contractions in diagnostic messages (PR #116803)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 19 05:53:52 PST 2024


https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/116803

This dissuades contributors from using contractions when writing diagnostic wording for Clang. Contractions should be avoided because of the potential for visual confusion with single quoting syntactic constructs and because they can be harder to understand for non-native English speakers.

>From 4a2673ab46fb77a554fd66d39c7faad2cce030d2 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron at aaronballman.com>
Date: Tue, 19 Nov 2024 08:49:22 -0500
Subject: [PATCH] Clarify use of contractions in diagnostic messages

This dissuades contributors from using contractions when writing
diagnostic wording for Clang. Contractions should be avoided because of
the potential for visual confusion with single quoting syntactic
constructs and because they can be harder to understand for non-native
English speakers.
---
 clang/docs/InternalsManual.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clang/docs/InternalsManual.rst b/clang/docs/InternalsManual.rst
index f189cb4e6a2ac3..39d389b816f129 100644
--- a/clang/docs/InternalsManual.rst
+++ b/clang/docs/InternalsManual.rst
@@ -160,6 +160,10 @@ wording a diagnostic.
   named in a diagnostic message. e.g., prefer wording like ``'this' pointer
   cannot be null in well-defined C++ code`` over wording like ``this pointer
   cannot be null in well-defined C++ code``.
+* Prefer diagnostic wording without contractions whenever possible. The single
+  quote in a contraction can be visually distracting due to its use with
+  syntactic constructs and contractions can be harder to understand for non-
+  native English speakers.
 
 The Format String
 ^^^^^^^^^^^^^^^^^



More information about the cfe-commits mailing list