| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
|
|
|
|
|
|
|
|
|
|
|
| |
code, fixing a problem where instantiations of out-of-line destructor
definitions would had the wrong lexical context.
Introduce tests for out-of-line definitions of the constructors,
destructors, and conversion functions of a class template partial
specialization.
llvm-svn: 79682
|
|
|
|
| |
llvm-svn: 79679
|
|
|
|
|
|
| |
destructors of class templates.
llvm-svn: 79678
|
|
|
|
| |
llvm-svn: 79504
|
|
|
|
|
|
| |
still works.
llvm-svn: 78979
|
|
|
|
|
|
|
|
|
|
|
|
| |
FriendFunctionDecl, and create instances as appropriate.
The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.
llvm-svn: 78653
|
|
|
|
|
|
|
| |
Permit a class to friend its class members in C++ 98, as long as extensions
are enabled (and even when they aren't, only give an extwarn about it).
llvm-svn: 78332
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we were going to enter into the scope of a class template or class
template partial specialization, rebuild that type so that it can
refer to members of the current instantiation, as in code like
template<typename T>
struct X {
typedef T* pointer;
pointer data();
};
template<typename T>
typename X<T>::pointer X<T>::data() { ... }
Without rebuilding the return type of this out-of-line definition, the
canonical return type of the out-of-line definition (a TypenameType)
will not match the canonical return type of the declaration (the
canonical type of T*).
llvm-svn: 78316
|
|
|
|
| |
llvm-svn: 78274
|
|
|
|
|
|
| |
make a note of it in the test case.
llvm-svn: 78266
|
|
|
|
|
|
| |
because I was thinking about it.
llvm-svn: 78262
|
|
|
|
|
|
| |
trickier
llvm-svn: 77707
|
|
|
|
|
|
| |
partial specializations.
llvm-svn: 77606
|
|
|
|
|
|
|
|
| |
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.
llvm-svn: 77462
|
|
|
|
| |
llvm-svn: 77325
|
|
|
|
| |
llvm-svn: 77249
|
|
|
|
|
|
|
| |
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.
llvm-svn: 77070
|
|
|
|
|
|
|
| |
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
|
|
|
|
|
|
|
|
| |
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
llvm-svn: 77002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates, e.g.,
template<typename T>
struct Outer {
struct Inner;
};
template<typename T>
struct Outer<T>::Inner {
// ...
};
Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.
There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.
llvm-svn: 76820
|
|
|
|
| |
llvm-svn: 76772
|
|
|
|
|
|
| |
[class.union]p1", from John McCall!
llvm-svn: 76766
|
|
|
|
|
|
|
| |
data members of class templates. We don't instantiate the definitions yet,
however.
llvm-svn: 76756
|
|
|
|
|
|
| |
out of line.
llvm-svn: 76740
|
|
|
|
|
|
|
| |
cannot match that nested-name-specifier to a class template or class template
partial specialization.
llvm-svn: 76704
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
member functions of class templates, e.g.,
template<typename T>
struct X {
void f(T);
};
template<typename T> X<T>::f(T) { /* ... */ }
llvm-svn: 76692
|
|
|
|
| |
llvm-svn: 76687
|
|
|
|
| |
llvm-svn: 76685
|
|
|
|
| |
llvm-svn: 76640
|
|
|
|
| |
llvm-svn: 76628
|
|
|
|
| |
llvm-svn: 76627
|
|
|
|
| |
llvm-svn: 75381
|
|
|
|
| |
llvm-svn: 75324
|
|
|
|
|
|
| |
have an initializer. Also, move some tests around to match the C++0x draft better.
llvm-svn: 75322
|
|
|
|
| |
llvm-svn: 75151
|
|
|
|
|
|
| |
address of an overloaded function.
llvm-svn: 75146
|
|
|
|
|
|
| |
pass it when instantiating the expr. Fixes another member pointer bug.
llvm-svn: 75075
|
|
|
|
|
|
|
| |
address of an overloaded function (which may involve both functions
and function templates).
llvm-svn: 75069
|
|
|
|
|
|
| |
type. Add a test for this and the rest of [dcl.mptr]p3.
llvm-svn: 75054
|
|
|
|
|
|
|
|
| |
function template. Most of the change here is in factoring out the
common bits used for template argument deduction from a function call
and when taking the address of a function template.
llvm-svn: 75044
|
|
|
|
| |
llvm-svn: 74999
|
|
|
|
|
|
|
| |
namespaces based on the template arguments of a class template
specialization type.
llvm-svn: 74993
|
|
|
|
| |
llvm-svn: 74971
|
|
|
|
|
|
|
|
| |
implement C++ [temp.deduct.call]p3b3, which allows a template-id
parameter to match a derived class of the argument, while deducing
template arguments.
llvm-svn: 74965
|
|
|
|
| |
llvm-svn: 74719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by distinguishing between substitution that occurs for template
argument deduction vs. explicitly-specifiad template arguments. This
is used both to improve diagnostics and to make sure we only provide
SFINAE in those cases where SFINAE should apply.
In addition, deal with the sticky issue where SFINAE only considers
substitution of template arguments into the *type* of a function
template; we need to issue hard errors beyond this point, as
test/SemaTemplate/operator-template.cpp illustrates.
llvm-svn: 74651
|
|
|
|
|
|
|
| |
are fewer template arguments than there are template parameters for
that function.
llvm-svn: 74578
|
|
|
|
|
|
|
|
|
| |
substitute those template arguments into the function parameter types
prior to template argument deduction. There's still a bit of work to
do to make this work properly when only some of the template arguments
are specified.
llvm-svn: 74576
|
|
|
|
|
|
|
| |
templates, such as make<int&>. These template-ids are only barely
functional for function calls; much more to come.
llvm-svn: 74563
|