| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:
- InitializationSequence now has a "C conversion sequence" category
and step kind, which falls back to
- Changed the diagnostics for returns to always have the result type
of the function first and the type of the expression second.
CheckSingleAssignmentConstraints to peform checking in C.
- Improved ASTs for initialization of return values. The ASTs now
capture all of the temporaries we need to create, but
intentionally do not bind the tempoary that is actually returned,
so that it won't get destroyed twice.
- Make sure to perform an (elidable!) copy of the class object that
is returned from a class.
- Fix copy elision in CodeGen to properly see through the
subexpressions that occur with elidable copies.
- Give "new" its own entity kind; as with return values and thrown
objects, we don't bind the expression so we don't call a
destructor for it.
Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.
llvm-svn: 91669
|
|
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
|
|
|
|
|
|
| |
their template parameter depth and position, so that we can match
redeclarations appropriately. Fixes PR5527 and PR5528.
llvm-svn: 89654
|
|
|
|
|
|
| |
definition of a member template (or a member thereof). Fixes PR5566.
llvm-svn: 89512
|
|
|
|
| |
llvm-svn: 85612
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
(C++ [temp.func.order]).
llvm-svn: 81777
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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: 76640
|
|
function templates. C++ [temp.over.link] paragraphs 4-8.
llvm-svn: 74079
|