diff options
author | Richard Trieu <rtrieu@google.com> | 2012-06-27 02:00:20 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-06-27 02:00:20 +0000 |
commit | e59331ac3420d5028d986ada5c7ad826500d1e12 (patch) | |
tree | 0bb4daa38ba62653013b8392775d84a08e59d89c /www/diagnostics.html | |
parent | df438046c0e2ae38045c01a5becea64df2b1bf73 (diff) | |
download | clang-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.html | 33 |
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<> </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<map<[...], <span class="template-highlight">float</span>>>' to 'vector<map<[...], <span class="template-highlight">double</span>>>' 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<map<int, <span class="template-highlight">float</span>>>' to 'vector<map<int, <span class="template-highlight">double</span>>>' 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< + map< + [...], + [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]>> +</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< + map< + int, + [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]>> +</pre> + <h2>Automatic Macro Expansion</h2> <p>Many errors happen in macros that are sometimes deeply nested. With |