aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-01-14 19:12:17 +0000
committerJohn McCall <rjmccall@apple.com>2010-01-14 19:12:17 +0000
commit3a47e23471ea2edec6464bfe7fd6d54d9a04271f (patch)
tree3b139917e635b1ec12f02b739dc579c01d79613c
parentc781f9cd854f3d5d1c826f4a13382c6abca4cff7 (diff)
Document the extensions I made to the diagnostics-formatting system yesterday.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93439 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/InternalsManual.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html
index f39224f47d..5d75eaa453 100644
--- a/docs/InternalsManual.html
+++ b/docs/InternalsManual.html
@@ -289,7 +289,7 @@ Clang:</p>
<tr><td>Example:</td><td><tt>"must be a %select{unary|binary|unary or binary}2
operator"</tt></td></tr>
<tr><td>Class:</td><td>Integers</td></tr>
-<tr><td>Description:</td><td>This format specifier is used to merge multiple
+<tr><td>Description:</td><td><p>This format specifier is used to merge multiple
related diagnostics together into one common one, without requiring the
difference to be specified as an English string argument. Instead of
specifying the string, the diagnostic gets an integer argument and the
@@ -298,7 +298,8 @@ Clang:</p>
it is 1 it prints 'binary' if it is 2, it prints 'unary or binary'. This
allows other language translations to substitute reasonable words (or entire
phrases) based on the semantics of the diagnostic instead of having to do
- things textually.</td></tr>
+ things textually.</p>
+ <p>The selected string does undergo formatting.</p></td></tr>
<tr><td colspan="2"><b>"plural" format</b></td></tr>
<tr><td>Example:</td><td><tt>"you have %1 %plural{1:mouse|:mice}1 connected to
@@ -330,6 +331,15 @@ Clang:</p>
abort, as will a failure to match the argument against any
expression.</p></td></tr>
+<tr><td colspan="2"><b>"ordinal" format</b></td></tr>
+<tr><td>Example:</td><td><tt>"ambiguity in %ordinal0 argument"</tt></td></tr>
+<tr><td>Class:</td><td>Integers</td></tr>
+<tr><td>Description:</td><td><p>This is a formatter which represents the
+ argument number as an ordinal: the value <tt>1</tt> becomes <tt>1st</tt>,
+ <tt>3</tt> becomes <tt>3rd</tt>, and so on. Values less than <tt>1</tt>
+ are not supported.</p>
+ <p>This formatter is currently hard-coded to use English ordinals.</p></td></tr>
+
<tr><td colspan="2"><b>"objcclass" format</b></td></tr>
<tr><td>Example:</td><td><tt>"method %objcclass0 not found"</tt></td></tr>
<tr><td>Class:</td><td>DeclarationName</td></tr>