| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
particular, we only add the implement object parameter type if only
one of the function templates is a non-static member function
template.
Moreover, since this DR differs from existing practice in C++98/03,
this commit implements the existing practice (which ignores the
first parameter of the function template that is not the non-static
member function template) in C++98/03 mode.
llvm-svn: 119145
|
|
|
|
|
|
|
|
|
| |
in the order they occur within the class template, delaying
out-of-line member template partial specializations until after the
class has been fully instantiated. This fixes a regression introduced
by r118454 (itself a fix for PR8001).
llvm-svn: 118704
|
|
|
|
|
|
|
| |
only keep deduction results for successful deductions, so that they
can be compared against each other. Fixes PR8462, from Richard Smith!
llvm-svn: 117983
|
|
|
|
|
|
|
|
| |
themselves have no template parameters. This is actually a restriction
due to the grammar of template template parameters, but we choose to
diagnose it in Sema to provide better recovery.
llvm-svn: 117032
|
|
|
|
|
|
|
| |
on a friend declaration, skip template-ids which do not depend on the
current parameter list.
llvm-svn: 116911
|
|
|
|
|
|
| |
we may need to complete the type before looking into it.
llvm-svn: 116795
|
|
|
|
| |
llvm-svn: 116789
|
|
|
|
| |
llvm-svn: 116787
|
|
|
|
|
|
|
| |
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527
llvm-svn: 116786
|
|
|
|
|
|
|
| |
actually walk the template argument type to find any unnamed/local
types within it. Fixes PR6784.
llvm-svn: 116382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.
This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.
llvm-svn: 116373
|
|
|
|
|
|
|
|
| |
of templated-scope friends by marking them invalid and white-listing all
accesses until such time as we implement them. Fixes a crash, this time
without a broken test case.
llvm-svn: 116364
|
|
|
|
|
|
|
|
|
|
| |
argument deduction, make sure to check the correctness of deduced template
type arguments (which we had previously skipped) along with other
kinds of template arguments. This fixes part of PR6784, but we're
still swallowing the extension warning about unnamed/local template
arguments.
llvm-svn: 116327
|
|
|
|
| |
llvm-svn: 116287
|
|
|
|
|
|
| |
extension warning.
llvm-svn: 113739
|
|
|
|
|
|
| |
members) with function type. Fixes PR8047.
llvm-svn: 113723
|
|
|
|
|
|
|
|
|
|
|
| |
error to a warning if we're in a case that would be allowed in
C++0x. This "fixes" PR8084 by making Clang accept more code than GCC
and (non-strict) EDG do.
Also, add the missing test case for the C++0x semantics, which should
have been in r113717.
llvm-svn: 113718
|
|
|
|
| |
llvm-svn: 113156
|
|
|
|
|
|
|
| |
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.
llvm-svn: 113090
|
|
|
|
|
|
| |
but this makes them work even as an extension in C++98. This resolves PR8077.
llvm-svn: 113011
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiating the parameters. In a perfect world, this wouldn't
matter, and compilers are free to instantiate in any order they
want. However, every other compiler seems to instantiate the return
type first, and some code (in this case, Boost.Polygon) depends on
this and SFINAE to avoid instantiating something that shouldn't be
instantiated.
We could fight this battle, and insist that Clang is allowed to do
what it does, but it's not beneficial: it's more predictable to
instantiate this way, in source order. When we implement
late-specified return types, we'll need to instantiate the return type
last when it was late-specified, hence the FIXME.
We now compile Boost.Polygon properly.
llvm-svn: 112561
|
|
|
|
|
|
|
|
|
| |
deduction where the parameter is a function reference, function
pointer, or member function pointer and the argument is an overloaded
function. Fixes <rdar://problem/8360106>, a template argument
deduction issue found by Boost.Filesystem.
llvm-svn: 112523
|
|
|
|
| |
llvm-svn: 112477
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates when only the declaration is in scope. This requires deferring the
instantiation to be lazy, and ensuring the definition is required for that
translation unit. We re-use the existing pending instantiation queue,
previously only used to track implicit instantiations which were required to be
lazy. Fixes PR7979.
A subsequent change will rename *PendingImplicitInstantiations to
*PendingInstatiations for clarity given its broader role.
llvm-svn: 112037
|
|
|
|
| |
llvm-svn: 111611
|
|
|
|
|
|
| |
Avoids a crash.
llvm-svn: 111609
|
|
|
|
|
|
|
| |
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.
llvm-svn: 110303
|
|
|
|
|
|
|
| |
arguments only resolves to a single specialization, make sure to look
through using declarations. Fixes PR7641.
llvm-svn: 108376
|
|
|
|
|
|
|
|
| |
at -O0. The only change from the previous patch is that we don't try
to generate virtual method thunks for an available_externally
function.
llvm-svn: 108230
|
|
|
|
| |
llvm-svn: 108194
|
|
|
|
|
|
|
|
|
|
| |
-O0, since we won't be using the definitions for anything anyway. For
lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4%
improvement in compile time (and suppresses 440 function bodies).
<rdar://problem/7987644>
llvm-svn: 108156
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.
This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.
The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.
llvm-svn: 106993
|
|
|
|
|
|
|
| |
of an explicit instantiation to an ExtWarn, since nobody else seems to
diagnose this problem.
llvm-svn: 106109
|
|
|
|
|
|
| |
type parameter pack is distinct from a template type parameter.
llvm-svn: 105464
|
|
|
|
|
|
| |
type-parameter within a template parameter list. Found by inspection.
llvm-svn: 105462
|
|
|
|
|
|
|
| |
class for UnresolvedLookupExprs, even when occuring on template
names" along with a fix for an Objective-C++ crasher it introduced.
llvm-svn: 104277
|
|
|
|
|
|
|
| |
occuring on..." which breaks some Objective-C code. Working on getting a test
case...
llvm-svn: 104150
|
|
|
|
|
|
|
|
|
|
|
| |
template names. We were completely missing naming classes for many unqualified
lookups, but this didn't trigger code paths that need it. This removes part of
an optimization that re-uses the template name lookup done by the parser to
determine if explicit template arguments actually form a template-id.
Unfortunately the technique for avoiding the duplicate lookup lost needed data
such as the class context in which the lookup succeeded.
llvm-svn: 104117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert much of the implementation of C++98/03 [temp.friend]p5 in
r103943 and its follow-ons r103948 and r103952. While our
implementation was technically correct, other compilers don't seem to
implement this paragraph (which forces the instantiation of friend
functions defined in a class template when a class template
specialization is instantiated), and doing so broke a bunch of Boost
libraries.
Since this behavior has changed in C++0x (which instantiates the
friend function definitions when they are used), we're going to skip
the nowhere-implemented C++98/03 semantics and go straight to the
C++0x semantics.
This commit is a band-aid to get Boost up and running again. It
doesn't really fix PR6952 (which this commit un-fixes), but it does
deal with the way Boost.Units abuses this particular paragraph.
llvm-svn: 104014
|
|
|
|
|
|
|
| |
functions defined inside a class template. Fixes PR6952, the last
Boost.Units failure.
llvm-svn: 103952
|
|
|
|
|
|
|
| |
class template conflicts with an existing (non-template)
definition. This is another part of PR6952.
llvm-svn: 103948
|
|
|
|
|
|
|
|
| |
within class templates be instantiated along with each class template
specialization, even if the functions are not used. Do so, as a baby
step toward PR6952.
llvm-svn: 103943
|
|
|
|
|
|
|
|
|
|
| |
explicit instantiations of template. C++0x clarifies the intent
(they're ill-formed in some cases; see [temp.explicit] for
details). However, one could squint at the C++98/03 standard and
conclude they are permitted, so reduce the error to a warning
(controlled by -Wc++0x-compat) in C++98/03 mode.
llvm-svn: 103482
|
|
|
|
|
|
|
|
|
|
|
| |
specific message that includes the template arguments, e.g.,
test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template
ignored: substitution failure [with T = int *]
typename T::type get_type(const T&); // expected-note{{candidate ...
^
llvm-svn: 103348
|
|
|
|
|
|
|
| |
many/too few arguments, use the same diagnostic we use for arity
mismatches in non-templates (but note that it's a function template).
llvm-svn: 103341
|
|
|
|
|
|
|
|
|
|
|
|
| |
conflicting deduced template argument values, give a more specific
reason along with those values, e.g.,
test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template
ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long')
const T& min(const T&, const T&);
^
llvm-svn: 103339
|
|
|
|
|
|
|
|
|
| |
specializations, substitute the deduced template arguments and check
the resulting substitution before concluding that template argument
deduction succeeds. This marvelous little fix makes a bunch of
Boost.Spirit tests start working.
llvm-svn: 102601
|
|
|
|
|
|
| |
two bugfixes which fix selfhost and (hopefully) the nightly tests.
llvm-svn: 102198
|
|
|
|
|
|
| |
same", which seems to break most C++ nightly test apps.
llvm-svn: 102174
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.
Fixes PR 6885 as well some spectrum of unfiled bugs.
llvm-svn: 102164
|