| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
focusing on the scope- and qualifier-related semantic requirements in
C++ [temp.explicit]p2.
llvm-svn: 84154
|
|
|
|
|
|
| |
template that has no out-of-line definition.
llvm-svn: 84141
|
|
|
|
|
|
|
|
| |
class templates the proper linkage.
Daniel, please look over the CodeGenModule bits.
llvm-svn: 84140
|
|
|
|
| |
llvm-svn: 84129
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
specialization. This completes C++ [temp.expl.spec]!
llvm-svn: 83980
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 83914
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
not definitions
llvm-svn: 83904
|
|
|
|
| |
llvm-svn: 83901
|
|
|
|
| |
llvm-svn: 83896
|
|
|
|
| |
llvm-svn: 83893
|
|
|
|
|
|
|
| |
because of missing default constructor of a member.
Fixes pr5154.
llvm-svn: 83583
|
|
|
|
|
|
|
| |
Also, eliminate a redundant diagnostic by marking a variable declared
with incomplete type as an invalid declaration.
llvm-svn: 83553
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 83548
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 83473
|
|
|
|
|
|
|
|
|
|
| |
its definition may be defined, including in a class.
Also, put in an assertion when trying to instantiate a class template
partial specialization of a member template, which is not yet
implemented.
llvm-svn: 83469
|
|
|
|
| |
llvm-svn: 83440
|
|
|
|
|
|
|
|
|
| |
declarations and explicit template instantiations, improving
diagnostics and making the code usable for function template
specializations (as well as class template specializations and partial
specializations).
llvm-svn: 83436
|
|
|
|
|
|
|
| |
explicit specializations can occur. Also, fix a minor recovery bug
where we should allow declarations coming from the parser to be NULL.
llvm-svn: 83416
|
|
|
|
|
|
|
|
|
| |
type is a template-id (e.g., basic_ostream<CharT, Traits>) and the
argument type is a class that has a derived class matching the
parameter type. Previously, we were giving up on template argument
deduction too early.
llvm-svn: 83177
|
|
|
|
|
|
| |
pushed into scope. Fixes PR5056.
llvm-svn: 83003
|
|
|
|
|
|
|
|
|
| |
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.
llvm-svn: 82848
|
|
|
|
|
|
| |
same.
llvm-svn: 82088
|
|
|
|
|
|
|
| |
ordering, along with another test case for partial ordering of partial
specializations.
llvm-svn: 81869
|
|
|
|
| |
llvm-svn: 81801
|
|
|
|
|
|
|
|
| |
MarkUsedTemplateParameters, which is able to mark template parameters
used within non-deduced contexts as well as deduced contexts. Use this
to finish the implementation of [temp.deduct.partial]p11.
llvm-svn: 81794
|
|
|
|
|
|
|
|
|
| |
argument deduction. This fixes the new test case (since partial
ordering does not have a "verify the results of deduction" step), and
will allow failed template argument deductions to return more quickly
for, e.g., matching class template partial specializations.
llvm-svn: 81779
|
|
|
|
|
|
| |
(C++ [temp.func.order]).
llvm-svn: 81777
|
|
|
|
|
|
|
| |
partial specialization, make sure we look into non-dependent base
classes (but not dependent base classes). Fixes PR4951.
llvm-svn: 81584
|
|
|
|
| |
llvm-svn: 81233
|
|
|
|
|
|
|
|
| |
whether the current context is dependent.
Thanks to Anders for pointing this out.
llvm-svn: 80828
|
|
|
|
| |
llvm-svn: 80748
|
|
|
|
| |
llvm-svn: 80419
|
|
|
|
| |
llvm-svn: 80418
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
llvm-svn: 80353
|
|
|
|
|
|
| |
look at the primary contexts. Thanks to Eli for the test case
llvm-svn: 80212
|
|
|
|
|
|
|
|
|
|
|
|
| |
qualified name does not actually refer into a class/class
template/class template partial specialization.
Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.
llvm-svn: 80056
|
|
|
|
|
|
|
| |
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic. Thanks Eli!
llvm-svn: 79791
|
|
|
|
| |
llvm-svn: 79709
|
|
|
|
|
|
|
| |
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
|