• Home
  • Raw
  • Download

Lines Matching +full:source +full:- +full:highlight

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
5 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6 <title>Clang - Expressive Diagnostics</title>
10 .loc { font-weight: bold; }
11 .err { color:red; font-weight: bold; }
12 .warn { color:magenta; font-weight: bold; }
13 .note { color:gray; font-weight: bold; }
14 .msg { font-weight: bold; }
15 .cmd { font-style: italic; }
17 .point { color:green; font-weight: bold; }
22 <!--#include virtual="menu.html.incl"-->
27 <!--=======================================================================-->
29 <!--=======================================================================-->
32 friendly. As far as a command-line compiler goes, this basically boils down to
42 information. The clang command-line compiler driver uses this information
44 (IDEs can use the information to display in-line error markup.)
54 $ <span class="cmd">gcc-4.9 -fsyntax-only -Wformat format-strings.c</span>
55 format-strings.c: In function 'void f()':
56 …format-strings.c:91:16: warning: field precision specifier '.*' expects a matching 'int' argument …
59 format-strings.c:91:16: warning: format '%d' expects a matching 'int' argument [-Wformat=]
60 $ <span class="cmd">clang -fsyntax-only format-strings.c</span>
61 …<span class="loc">format-strings.c:91:13:</span> <span class="warn">warning:</span> <span class="m…
67 now able to give a column for a diagnostic, and include a snippet of source
78 diagnostics highlight related information. In the following somewhat
79 nonsensical example you can see that you don't even need to see the original source code to
88 $ <span class="cmd">gcc-4.9 -fsyntax-only t.c</span>
93 $ <span class="cmd">clang -fsyntax-only t.c</span>
115 $ <span class="cmd">gcc-4.9 -fsyntax-only t.c</span>
119 $ <span class="cmd">clang -fsyntax-only t.c</span>
127 <p>Many programmers use high-level user defined types, typedefs, and other
138 $ <span class="cmd">clang -fsyntax-only t.c</span>
149 $ <span class="cmd">clang -fsyntax-only t.c</span>
178 $ <span class="cmd">clang -fsyntax-only t.cpp</span>
184 …ation (like <code>std::vector&lt;Real&gt;</code>) was spelled within the source code. For example:…
187 $ <span class="cmd">clang -fsyntax-only t.cpp</span>
193 <h2>Fix-it Hints</h2>
195 <p>"Fix-it" hints provide advice for fixing small, localized problems
196 in source code. When Clang produces a diagnostic about a particular
197 problem that it can work around (e.g., non-standard or redundant
207 …:</span> <span class="warn">warning:</span> <span class="msg">use of GNU old-style field designato…
211 …:</span> <span class="warn">warning:</span> <span class="msg">use of GNU old-style field designato…
217 <p>"Fix-it" hints are most useful for
221 Clang provides the fix--add <code>template&lt;&gt;</code>--as part of the
236 information to remove the common elements and highlight the differences. To
242 …t;[...], <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;[...], <span …
244 -fno-elide-type: template diff without elision
246 …p&lt;int, <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;int, <span c…
248 -fdiagnostics-show-template-tree: template tree printing with elision
254 …[<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&…
256 -fdiagnostics-show-template-tree -fno-elide-type: template tree printing with no elision
262 …[<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&…
275 $ <span class="cmd">clang -fsyntax-only t.c</span>
288 $ <span class="cmd">clang -fsyntax-only t.c</span>
293 <span class="snip">#define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */</span>
317 $ <span class="cmd">gcc-4.9 t.cc</span>
341 $ <span class="cmd">gcc-4.9 t.cc</span>
349 t.cc:6:8: error: expected primary-expression before '>' token