[cfe-commits] r65081 - in /cfe/trunk: lib/Basic/Diagnostic.cpp lib/Sema/Sema.cpp test/Sema/declspec.c test/Sema/exprs.c test/Sema/types.c test/SemaCXX/const-cast.cpp test/SemaCXX/constructor-initializer.cpp test/SemaCXX/destructor.cpp test/SemaCXX/inherit.cpp test/SemaCXX/overloaded-operator-decl.cpp test/SemaCXX/typedef-redecl.cpp test/SemaTemplate/class-template-decl.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sun Feb 22 11:29:53 PST 2009


Chris Lattner wrote:
> Author: lattner
> Date: Thu Feb 19 17:45:49 2009
> New Revision: 65081
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65081&view=rev
> Log:
> Fix a long standard problem with clang retaining "too much" sugar 
> information about types.  We often print diagnostics where we say 
> "foo_t" is bad, but the user doesn't know how foo_t is declared 
> (because it is a typedef).  Fix this by expanding sugar when present
> in a diagnostic (and not one of a few special cases, like vectors).
>   
Hmm ... this worries me when I think about C++ templates. Printing the
unsugared typename would make template diagnostics completely
unreadable, e.g. print the dreaded std::basic_string<char,
std::allocator<char>, std::char_traits<char> > instead of (or in
addition to) std::string.

Sebastian



More information about the cfe-commits mailing list