Skip to content
  1. Nov 03, 2009
    • Daniel Dunbar's avatar
      Switch XFAIL format to match LLVM. · a530841b
      Daniel Dunbar authored
      llvm-svn: 85880
      a530841b
    • Douglas Gregor's avatar
      Introduce a new class, UnqualifiedId, that provides a parsed · 7861a803
      Douglas Gregor authored
      representation of a C++ unqualified-id, along with a single parsing
      function (Parser::ParseUnqualifiedId) that will parse all of the
      various forms of unqualified-id in C++.
      
      Replace the representation of the declarator name in Declarator with
      the new UnqualifiedId class, simplifying declarator-id parsing
      considerably and providing more source-location information to
      Sema. In the future, I hope to migrate all of the other
      unqualified-id-parsing code over to this single representation, then
      begin to merge actions that are currently only different because we
      didn't have a unqualified notion of the name in the parser.
      
      llvm-svn: 85851
      7861a803
  2. Oct 30, 2009
  3. Oct 29, 2009
  4. Oct 28, 2009
    • Douglas Gregor's avatar
      Test · 19f3d701
      Douglas Gregor authored
      explicit-instantiation-declaration-after-explicit-instantiation-definition
      errors. This wraps up explicit template instantiation for now.
      
      llvm-svn: 85347
      19f3d701
    • Douglas Gregor's avatar
      Implement proper linkage for explicit instantiation declarations of · b7e5c847
      Douglas Gregor authored
      inlined functions. For example, given
      
        template<typename T>
        class string {
          unsigned Len;
      
        public:
          unsigned size() const { return Len; }
        };
      
        extern template class string<char>;
      
      we now give the instantiation of string<char>::size
      available_externally linkage (if it is ever instantiated!), as
      permitted by the C++0x standard.
            
      
      llvm-svn: 85340
      b7e5c847
  5. Oct 27, 2009
  6. Oct 25, 2009
  7. Oct 17, 2009
  8. Oct 15, 2009
  9. Oct 14, 2009
  10. Oct 13, 2009
    • Douglas Gregor's avatar
      Unify our diagnostic printing for errors of the form, "we didn't like · e40876a5
      Douglas Gregor authored
      what we found when we looked into <blah>", where <blah> is a
      DeclContext*. We can now format DeclContext*'s in nice ways, e.g.,
      "namespace N", "the global namespace", "'class Foo'".
      
      This is part of PR3990, but we're not quite there yet.
      
      llvm-svn: 84028
      e40876a5
    • Douglas Gregor's avatar
      Diagnose attempts to add default function arguments to a · 62e10f0b
      Douglas Gregor authored
      specialization. This completes C++ [temp.expl.spec]!
      
      llvm-svn: 83980
      62e10f0b
    • Douglas Gregor's avatar
      When explicitly specializing a member that is a template, mark the · cf91555c
      Douglas Gregor authored
      template as a specialization. For example, this occurs with:
      
        template<typename T>
        struct X {
          template<typename U> struct Inner { /* ... */ };
        };
      
        template<> template<typename T>
        struct X<int>::Inner {
          T member;
        };
      
      We need to treat templates that are member specializations as special
      in two contexts:
      
        - When looking for a definition of a member template, we look
          through the instantiation chain until we hit the primary template
          *or a member specialization*. This allows us to distinguish
          between the primary "Inner" definition and the X<int>::Inner
          definition, above.
        - When computing all of the levels of template arguments needed to
          instantiate a member template, don't add template arguments
          from contexts outside of the instantiation of a member
          specialization, since the user has already manually substituted
          those arguments.
      
      Fix up the existing test for p18, which was actually wrong (but we
      didn't diagnose it because of our poor handling of member
      specializations of templates), and add a new test for member
      specializations of templates.
      
      llvm-svn: 83974
      cf91555c
    • Douglas Gregor's avatar
      Improve the internal representation and semantic analysis of friend · 3a88c1d7
      Douglas Gregor authored
      function templates.
      
      This commit ensures that friend function templates are constructed as
      FunctionTemplateDecls rather than partial FunctionDecls (as they
      previously were). It then implements template instantiation for friend
      function templates, injecting the friend function template only when
      no previous declaration exists at the time of instantiation. 
      
      Oh, and make sure that explicit specialization declarations are not
      friends.
      
      llvm-svn: 83970
      3a88c1d7
    • Douglas Gregor's avatar
      When declaring a class template whose name is qualified, make sure · ef06ccf8
      Douglas Gregor authored
      that the scope in which it is being declared is complete. Also, when
      instantiating a member class template's ClassTemplateDecl, be sure to
      delay type creation so that the resulting type is dependent. Ick.
      
      llvm-svn: 83923
      ef06ccf8
    • Douglas Gregor's avatar
      775b8379
    • Douglas Gregor's avatar
      Permit explicit specialization of member functions of class templates · ca027af6
      Douglas Gregor authored
      that are declarations (rather than definitions). Also, be sure to set
      the access specifiers properly when instantiating the declarations of
      member function templates.
      
      llvm-svn: 83911
      ca027af6
  11. Oct 12, 2009
  12. Oct 10, 2009
  13. Oct 09, 2009
Loading