| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
default constructor of a union if it has a const member with no user-provided
default constructor.
llvm-svn: 151516
|
| |
|
|
|
|
| |
non-trivial.
llvm-svn: 151486
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- variant members with nontrivial destructors make the containing class's
destructor deleted
- check for a virtual destructor after checking for overridden methods in the
base class(es)
- check for an inaccessible operator delete for a class with a virtual
destructor.
Do not try to call an anonymous union field's destructor from the destructor of
the containing class.
llvm-svn: 151483
|
| |
|
|
| |
llvm-svn: 151478
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
trivial if the implicit declaration would be. Don't forget to set the Trivial
flag on the special member as well as on the class. It doesn't seem ideal that
we have two separate mechanisms for storing this information, but this patch
does not attempt to address that.
This leaves us in an interesting position where the has_trivial_X trait for a
class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'.
This seems to be what the standard requires.
llvm-svn: 151465
|
| |
|
|
| |
llvm-svn: 151447
|
| |
|
|
|
|
| |
likewise for __has_extension). Patch by Jonathan Sauer!
llvm-svn: 151445
|
| |
|
|
|
|
|
| |
in cases where we would otherwise disallow the access, and add a -Wc++98-compat
diagnostic for this C++11 feature.
llvm-svn: 151444
|
| |
|
|
|
|
| |
unevaluated operands applies within member functions, too.
llvm-svn: 151443
|
| |
|
|
| |
llvm-svn: 151442
|
| |
|
|
|
|
|
|
| |
associated classes, since it can find friend functions declared within them,
but overload resolution does not otherwise require argument types to be
complete.
llvm-svn: 151434
|
| |
|
|
|
|
| |
implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure).
llvm-svn: 151428
|
| |
|
|
|
|
| |
type and void* is used. <rdar://problem/10486347>.
llvm-svn: 151416
|
| |
|
|
|
|
|
| |
when a class is forward declared, and the reference to the data
member in question does not occur within a method body.
llvm-svn: 151413
|
| |
|
|
|
|
|
|
|
|
|
| |
explicit conversion functions to initialize the argument to a
copy/move constructor that itself is the subject of direct
initialization. Since we don't have that much context in overload
resolution, we end up threading more flags :(.
Fixes <rdar://problem/10903741> / PR10456.
llvm-svn: 151409
|
| |
|
|
| |
llvm-svn: 151400
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A defaulted default constructor for a class X is defined as deleted if [...]
- X is a union and all of its variant members are of const-qualified type.
A pedantic reading therefore says that
union X { };
has a deleted default constructor, which is both silly and almost
certainly unintended. Pretend as if this this read
- X is a union with one or more variant members, and all of its
variant members are of const-qualified type.
llvm-svn: 151394
|
| |
|
|
| |
llvm-svn: 151389
|
| |
|
|
| |
llvm-svn: 151377
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Make sure that the block expression is instantiation-dependent if the
block is in a dependent context
- Make sure that the C++ 'this' expression gets captured even if we
don't rebuild the AST node during template instantiation. This would
also have manifested as a bug for lambdas.
Fixes <rdar://problem/10832617>.
llvm-svn: 151372
|
| |
|
|
| |
llvm-svn: 151356
|
| |
|
|
| |
llvm-svn: 151353
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.
Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.
Fixes the Clang side of <rdar://problem/10895483> / PR12038.
llvm-svn: 151352
|
| |
|
|
|
|
| |
functional change.
llvm-svn: 151298
|
| |
|
|
|
|
| |
// rdar://10907410
llvm-svn: 151296
|
| |
|
|
|
|
| |
MS compatibility mode.
llvm-svn: 151295
|
| |
|
|
|
|
| |
that we can correctly compute value-dependence of the OVE.
llvm-svn: 151291
|
| |
|
|
|
|
|
|
| |
marked as such.
Previously we missed tag declarations; fixes rdar://10902015
llvm-svn: 151283
|
| |
|
|
|
|
|
| |
must still auto synthesize those propeties which have been redeclared
in the class. // rdar://10907410
llvm-svn: 151268
|
| |
|
|
|
|
| |
optimization, the current implementation is also a denser.
llvm-svn: 151257
|
| |
|
|
|
|
| |
malloc thrashing.
llvm-svn: 151254
|
| |
|
|
|
|
|
| |
compiler support for the std::is_trivially_assignable library type
trait.
llvm-svn: 151240
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Handle some situations where we should never make a decl more visible,
even when merging in an explicit visibility.
* Handle attributes in members of classes that are explicitly specialized.
Thanks Nico for the report and testing, Eric for the initial review, and dgregor
for the awesome test27 :-)
llvm-svn: 151236
|
| |
|
|
|
|
|
|
| |
<rdar://problem/10907510>, and makes the ASTs a bit more self-consistent.
(I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.)
llvm-svn: 151229
|
| |
|
|
| |
llvm-svn: 151225
|
| |
|
|
| |
llvm-svn: 151173
|
| |
|
|
|
|
|
|
|
|
| |
lambda closure type's function pointer conversion over user-defined
conversion via a lambda closure type's block pointer conversion,
always. This is a preference for more-standard code (since blocks
are an extension) and a nod to efficiency, since function pointers
don't require any memory management. Fixes PR12063.
llvm-svn: 151170
|
| |
|
|
|
|
| |
direct member initializers.
llvm-svn: 151155
|
| |
|
|
|
|
|
|
|
| |
This adds the -Wformat-non-standard flag (off by default,
enabled by -pedantic), which warns about non-standard
things in format strings (such as the 'q' length modifier,
the 'S' conversion specifier, etc.)
llvm-svn: 151154
|
| |
|
|
| |
llvm-svn: 151152
|
| |
|
|
| |
llvm-svn: 151151
|
| |
|
|
|
|
| |
I think there's a deeper problem here in the way TransformCXXConstructExpr works, but I won't tackle it now.
llvm-svn: 151146
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are left
unspecified, namely the capture variable (which doesn't actually
exist) and the body (which will be filled in by IRgen because it can't
be written as an AST).
Because we're switching to this model, this patch also eliminates
tracking the copy-initialization expression for the block capture of
the conversion function, since that information is now embedded in the
synthesized block literal. -1 side tables FTW.
llvm-svn: 151131
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.
This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.
Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.
llvm-svn: 151117
|
| |
|
|
|
|
| |
rdar://problem/10904479
llvm-svn: 151089
|
| |
|
|
|
|
|
|
|
| |
expression after we've finished the function body of the corresponding
function call operator. Otherwise, ActOnFinishFunctionBody() will see
the (unfinished) evaluation context of the lambda expression
itself. Fixes PR12031.
llvm-svn: 151082
|
| |
|
|
|
|
| |
warn if the format string argument is a parameter that is not itself declared as a format string with compatible format.
llvm-svn: 151080
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments. There are two aspects to this:
- Make sure that when marking the declarations referenced in a
default argument, we don't try to mark local variables, both because
it's a waste of time and because the semantics are wrong: we're not
in a place where we could capture these variables again even if it
did make sense.
- When a lambda expression occurs in a default argument of a
function template, make sure that the corresponding closure type is
considered dependent, so that it will get properly instantiated. The
second bit is a bit of a hack; to fix it properly, we may have to
rearchitect our handling of default arguments, parsing them only
after creating the function definition. However, I'd like to
separate that work from the lambdas work.
llvm-svn: 151076
|
| |
|
|
| |
llvm-svn: 151036
|
| |
|
|
|
|
|
|
|
| |
stable mangling, since these lambdas can end up in multiple
translation units. Sema is responsible for deciding when this is the
case, because it's already responsible for choosing the mangling
number.
llvm-svn: 151029
|