Commit Graph

7 Commits

Author SHA1 Message Date
John McCall 85f9055955 When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Douglas Gregor 975e6d0ccd Print the context of tag types as part of pretty-printing, e.g.,
struct N::M::foo

llvm-svn: 67284
2009-03-19 04:25:59 +00:00
Douglas Gregor 65b2c4c381 Add pretty-printing for class template specializations, e.g.,
'struct A<double, int>'

In the "template instantiation depth exceeded" message, print
"-ftemplate-depth-N" rather than "-ftemplate-depth=N".

An unnamed tag type that is declared with a typedef, e.g., 

  typedef struct { int x, y; } Point;

can be used as a template argument. Allow this, and check that we get
sensible pretty-printing for such things.

llvm-svn: 66560
2009-03-10 18:33:27 +00:00
Douglas Gregor 463421deb1 Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.

Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow. 

Also, instantiate the types of non-type template parameters before
checking them,  allowing, e.g., 

  template<typename T, T Value> struct Constant; 
 
to work properly.

llvm-svn: 65924
2009-03-03 04:44:36 +00:00
Douglas Gregor d54dfb8718 Implementing parsing of template-ids as class-names, so that we can
derive from a class template specialization, e.g.,

  class B : public A<int> { };

llvm-svn: 65488
2009-02-25 23:52:28 +00:00