- Nov 03, 2009
-
-
Daniel Dunbar authored
llvm-svn: 85880
-
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
-
- Oct 30, 2009
-
-
Douglas Gregor authored
partial specializations and explicit instantiations of non-templates. llvm-svn: 85620
-
Douglas Gregor authored
template<> struct foo<int> { ... }; where "foo" does not refer to a template. Fixes PR3844. llvm-svn: 85616
-
Douglas Gregor authored
llvm-svn: 85612
-
- Oct 29, 2009
-
-
Douglas Gregor authored
class template partial specializations of member templates. Also, fixes a silly little bug in the marking of "used" template parameters in member templates. Fixes PR5236. llvm-svn: 85447
-
- Oct 28, 2009
-
-
Douglas Gregor authored
explicit-instantiation-declaration-after-explicit-instantiation-definition errors. This wraps up explicit template instantiation for now. llvm-svn: 85347
-
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
-
- Oct 27, 2009
-
-
Douglas Gregor authored
function template specializations and member functions of class template specializations. llvm-svn: 85300
-
Douglas Gregor authored
members that have a definition. Also, use CheckSpecializationInstantiationRedecl as part of this instantiation to make sure that we diagnose the various kinds of problems that can occur with explicit instantiations. llvm-svn: 85270
-
Douglas Gregor authored
llvm-svn: 85244
-
Douglas Gregor authored
llvm-svn: 85243
-
Douglas Gregor authored
instantiation once we have committed to performing the instantiation. As part of this, make our makeshift template-instantiation location information suck slightly less. Fixes PR5264. llvm-svn: 85209
-
- Oct 15, 2009
-
-
Douglas Gregor authored
llvm-svn: 84189
-
Douglas Gregor authored
specializations. Work in progress; there's more cleanup required to actually use the new CheckSpecializationInstantiationRedecl checker uniformly. llvm-svn: 84185
-
Douglas Gregor authored
functions/static data members of class template specializations that do not have definitions. This is the latter part of [temp.explicit]p4; the former part still needs more testing. llvm-svn: 84182
-
Douglas Gregor authored
cases where an explicit instantiation requires a definition; the remainder of these checks will come with the implementation of paragraph 4 of [temp.explicit]. llvm-svn: 84181
-
Douglas Gregor authored
focusing on the scope- and qualifier-related semantic requirements in C++ [temp.explicit]p2. llvm-svn: 84154
-
- Oct 14, 2009
-
-
Douglas Gregor authored
template that has no out-of-line definition. llvm-svn: 84141
-
Douglas Gregor authored
class templates the proper linkage. Daniel, please look over the CodeGenModule bits. llvm-svn: 84140
-
Douglas Gregor authored
llvm-svn: 84129
-
- Oct 13, 2009
-
-
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
-
Douglas Gregor authored
specialization. This completes C++ [temp.expl.spec]! llvm-svn: 83980
-
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
-
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
-
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
-
Douglas Gregor authored
llvm-svn: 83914
-
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
-
- Oct 12, 2009
-
-
Douglas Gregor authored
llvm-svn: 83904
-
Douglas Gregor authored
llvm-svn: 83901
-
Douglas Gregor authored
llvm-svn: 83896
-
Douglas Gregor authored
llvm-svn: 83893
-
- Oct 09, 2009
-
-
Fariborz Jahanian authored
because of missing default constructor of a member. Fixes pr5154. llvm-svn: 83583
-
- Oct 08, 2009
-
-
Douglas Gregor authored
Also, eliminate a redundant diagnostic by marking a variable declared with incomplete type as an invalid declaration. llvm-svn: 83553
-
Douglas Gregor authored
function and member function templates that are not definitions. Add more tests to ensure that explicit specializations of member function templates prevent instantiation. llvm-svn: 83550
-
Douglas Gregor authored
llvm-svn: 83548
-
Douglas Gregor authored
templates, and keep track of how those member classes were instantiated or specialized. Make sure that we don't try to instantiate an explicitly-specialized member class of a class template, when that explicit specialization was a declaration rather than a definition. llvm-svn: 83547
-
Douglas Gregor authored
track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. llvm-svn: 83533
-
Douglas Gregor authored
specialization kind is TSK_ImplicitInstantiation. Previously, we would end up implicitly instantiating functions that had explicit specialization declarations or explicit instantiation declarations (with no corresponding definitions). llvm-svn: 83511
-
Douglas Gregor authored
templates. Previously, these weren't handled as specializations at all. The AST for representing these as specializations is still a work in progress. llvm-svn: 83498
-