summaryrefslogtreecommitdiff
path: root/www/diagnostics.html
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-06-27 02:00:20 +0000
committerRichard Trieu <rtrieu@google.com>2012-06-27 02:00:20 +0000
commite59331ac3420d5028d986ada5c7ad826500d1e12 (patch)
tree0bb4daa38ba62653013b8392775d84a08e59d89c /www/diagnostics.html
parentdf438046c0e2ae38045c01a5becea64df2b1bf73 (diff)
downloadclang-e59331ac3420d5028d986ada5c7ad826500d1e12.tar.gz
Update documentation with regards to template type diffing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/diagnostics.html')
-rw-r--r--www/diagnostics.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/www/diagnostics.html b/www/diagnostics.html
index 45f69074bc..84c6f8bc32 100644
--- a/www/diagnostics.html
+++ b/www/diagnostics.html
@@ -263,6 +263,39 @@ diagnostic.<p>
<span class="snip">template&lt;&gt; </span>
</pre>
+<h2>Template Type Diffing</h2>
+
+<p>Templates types can be long and difficult to read. Moreso when part of an
+error message. Instead of just printing out the type name, Clang has enough
+information to remove the common elements and highlight the differences. To
+show the template structure more clearly, the templated type can also be
+printed as an indented text tree.</p>
+
+Default: template diff with type elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion from 'vector&lt;map&lt;[...], <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;[...], <span class="template-highlight">double</span>&gt;&gt;' for 1st argument;
+</pre>
+-fno-elide-type: template diff without elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion from 'vector&lt;map&lt;int, <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;int, <span class="template-highlight">double</span>&gt;&gt;' for 1st argument;
+</pre>
+-fdiagnostics-show-template-tree: template tree printing with elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion for 1st argument;
+ vector&lt;
+ map&lt;
+ [...],
+ [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&gt;&gt;
+</pre>
+-fdiagnostics-show-template-tree -fno-elide-type: template tree printing with no elision
+<pre>
+t.cc:4:5: <span class="note">note:M</span> candidate function not viable: no known conversion for 1st argument;
+ vector&lt;
+ map&lt;
+ int,
+ [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&gt;&gt;
+</pre>
+
<h2>Automatic Macro Expansion</h2>
<p>Many errors happen in macros that are sometimes deeply nested. With