On Mar 12, 2008, at 5:07 PM, Manuel López-Ibáñez wrote:
On 08/03/2008, Chris Lattner <[EMAIL PROTECTED]> wrote:
clang points into the original input buffer that was lexed from.
This
requires keeping the original files mapped into the address space of
the compiler. However, clang only produces diagnostics from the
front-
end, not from the middle-end.
So no warnings for uninitialized variables?
The clang front-end generates these warnings. This means that the set
of warnings produced by the compiler doesn't change as the optimizer
evolves, are generally less mystifying to the user, and have perfect
location info as a side effect. People who use -Werror tend to prefer
when they don't get new random warnings due to a compiler upgrade.
This approach is similar to what Java compilers do and frontends like
EDG do (afaik).
The Clang project is also growing a static analysis engine which is
very adept at solving path sensitive versions of these problems, which
is useful for finding deeper bugs.
-Chris