hanchenye-llvm-project/clang/lib
Douglas Gregor 2e0757f319 Give Type::getDesugaredType a "for-display" mode that can apply more
heuristics to determine when it's useful to desugar a type for display
to the user. Introduce two C++-specific heuristics:

  - For a qualified type (like "foo::bar"), only produce a new
    desugred type if desugaring the qualified type ("bar", in this
    case) produces something interesting. For example, if "foo::bar"
    refers to a class named "bar", don't desugar. However, if
    "foo::bar" refers to a typedef of something else, desugar to that
    something else. This gives some useful desugaring such as
    "foo::bar (aka 'int')".
  - Don't desugar class template specialization types like
    "basic_string<char>" down to their underlying "class
    basic_string<char, char_traits<char>, allocator<char>>, etc.";
    it's better just to leave such types alone. 

Update diagnostics.html with some discussion and examples of type
preservation in C++, showing qualified names and class template
specialization types.

llvm-svn: 68207
2009-04-01 15:47:24 +00:00
..
AST Give Type::getDesugaredType a "for-display" mode that can apply more 2009-04-01 15:47:24 +00:00
Analysis Fix: <rdar://problem/6740387>. Sending nil to an object that returns a struct 2009-04-01 06:52:48 +00:00
Basic Add Target hooks for IRgen of [cf]string literals. 2009-03-31 23:42:16 +00:00
CodeGen More "prep" work for handling UTF16 CFString. 2009-04-01 13:55:36 +00:00
Driver Remove a FIXME, use -emit-pth to drive PTH generation. 2009-04-01 03:28:10 +00:00
Frontend - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation 2009-04-01 06:13:56 +00:00
Headers add support for the LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX limits.h GNU extensions. 2009-04-01 00:44:37 +00:00
Lex ProcessUCNEscape(): Incorportate some feedback from Chris. 2009-04-01 11:09:15 +00:00
Parse Parsing, semantic analysis, and template instantiation for typename 2009-04-01 00:28:59 +00:00
Rewrite Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
Sema Give Type::getDesugaredType a "for-display" mode that can apply more 2009-04-01 15:47:24 +00:00
CMakeLists.txt Really fix cmake style builds. 2009-03-24 17:52:34 +00:00
Makefile Stub out some structure for C++ driver. 2009-03-02 19:59:07 +00:00