custom garbage collector, uses global variables extensively, is not\r
reentrant or multi-threadable, etc. Clang has none of these problems.\r
</li>\r
- <li>GCC does not track information about macro instantiations when parsing\r
- source code, this makes it very difficult for static analysis and\r
- refactoring tools to work in the presense of (even simple) macros.</li>\r
- <li>GCC simplifies code as it parses it. As one simple example, if you\r
- write "x-x" in your source code, the GCC AST will contain "0", with no\r
- mention of x. This is extremely bad for a refactoring tool that wants\r
- to rename 'x'.</li>\r
+ <li>For every token, clang tracks information about where it was written and\r
+ where it was ultimately expanded into if was involved in a macro.\r
+ GCC does not track information about macro instantiations when parsing\r
+ source code. This makes it very difficult for static analysis and\r
+ refactoring tools to work in the presence of (even simple) macros.</li>\r
+ <li>Clang does not implicitly simplify code as it parses it like GCC does.\r
+ This causes many problems for source analysis tools: as one simple\r
+ example, if you write "x-x" in your source code, the GCC AST will\r
+ contain "0", with no mention of 'x'. This is extremely bad for a\r
+ refactoring tool that wants to rename 'x'.</li>\r
<li>GCC does not have a way to serialize the AST of a file out to disk and \r
read it back into another program. Its PCH mechanism is architecturally\r
only able to read the dump back into the exact same executable as the\r
<label>Clang Info</label>\r
<a href="index.html">About</a>\r
<a href="features.html">Features</a>\r
+ <a href="comparison.html">Comparisons</a>\r
<a href="get_involved.html">Get Involved</a>\r
<a href="http://clang.llvm.org/docs/InternalsManual.html">Manual</a>\r
</div>\r
\r
<div class="submenu">\r
<label>Quick Links</label>\r
- <!-- This section is for special links to areas that,\r
- organizationally, are deep within another section,\r
- but are still important enough to warrant a link.\r
- It's for those things that you have to do a lot, but don't\r
- want to have to wade through several pages to go there\r
- every time. -->\r
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>\r
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a>\r
<a href="http://llvm.org/bugs/">Bug Reports</a>\r