Lines Matching full:clang
6 <title>Clang - Expressive Diagnostics</title>
31 <p>In addition to being fast and functional, we aim to make Clang extremely user
36 Clang output to GCC 4.9's output in some cases.
41 <p>First, all diagnostics produced by clang include full column number
42 information. The clang command-line compiler driver uses this information
60 $ <span class="cmd">clang -fsyntax-only format-strings.c</span>
66 <p>Note that modern versions of GCC have followed Clang's lead, and are
68 text in the result. However, Clang's column number is much more accurate,
71 Also, Clang's diagnostic is colored by default, making it easier to
76 <p>Clang captures and accurately tracks range information for expressions,
80 understand what is wrong based on the Clang error. Because clang prints a
93 $ <span class="cmd">clang -fsyntax-only t.c</span>
102 out of clang contain exactly the pertinent information about what is wrong and
119 $ <span class="cmd">clang -fsyntax-only t.c</span>
132 is going on. Clang aims to handle both cases well.<p>
138 $ <span class="cmd">clang -fsyntax-only t.c</span>
146 system "pid_t" typedef is defined, Clang helpfully displays it with "aka".</p>
149 $ <span class="cmd">clang -fsyntax-only t.c</span>
175 <p>and then compile it, we see that Clang is both providing accurate information and is retaining the types as written by the user (e.g., "servers::Server", "::services::WebService"):
178 $ <span class="cmd">clang -fsyntax-only t.cpp</span>
184 <p>Naturally, type preservation extends to uses of templates, and Clang retains information about how a particular template specialization (like <code>std::vector<Real></code>) was spelled within the source code. For example:</p>
187 $ <span class="cmd">clang -fsyntax-only t.cpp</span>
196 in source code. When Clang produces a diagnostic about a particular
200 problem. In the following example, Clang warns about the use of a GCC
206 $ <span class="cmd">clang t.c</span>
221 Clang provides the fix--add <code>template<></code>--as part of the
225 $ <span class="cmd">clang t.cpp</span>
235 error message. Instead of just printing out the type name, Clang has enough
270 Clang helps you out by automatically printing instantiation information and
275 $ <span class="cmd">clang -fsyntax-only t.c</span>
288 $ <span class="cmd">clang -fsyntax-only t.c</span>
300 <p>In practice, we've found that Clang's treatment of macros is actually more useful in multiply nested
321 $ <span class="cmd">clang t.cc</span>
352 $ <span class="cmd">clang t.cc</span>