| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
derived-to-base cast that also casts away constness (one of the cases
for static_cast followed by const_cast) would be treated as a bit-cast
rather than a derived-to-base class, causing miscompiles and
heartburn.
Fixes <rdar://problem/8913298>.
llvm-svn: 124340
|
|
|
|
|
|
|
| |
the restrictions on .* and ->* for ref-qualified pointer-to-member
functions.
llvm-svn: 124294
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
authors to write
class __attribute__((forbid_temporaries)) Name { ... };
when they want to force users to name all variables of the type. This protects
people from doing things like creating a scoped_lock that only lives for a
single statement instead of an entire scope.
The warning produced by this attribute can be disabled by
-Wno-forbid-temporaries.
llvm-svn: 124217
|
|
|
|
|
|
|
| |
as an rvalue per C++0x [class.copy]p33. If that fails, try again with
the original subexpression.
llvm-svn: 124002
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NRVO candidate for a return statement, to
Sema::getCopyElisionCandidate(), and teach it enough to also determine
the NRVO candidate for a throw expression. We still don't use the
latter information, however.
Along the way, implement core issue 1148, which eliminates copy
elision from catch parameters and clarifies that copy elision cannot
occur from function parameters (which we already implemented).
llvm-svn: 123982
|
|
|
|
|
|
|
| |
declaration that name lookup actually found, so that we can use it for
access checking later on. Fixes <rdar://problem/8876150>.
llvm-svn: 123867
|
|
|
|
|
|
|
| |
so allow it to propagate the failure outward. Fixes the crashing part
of <rdar://problem/8876150>.
llvm-svn: 123863
|
|
|
|
|
|
| |
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
|
|
|
|
|
|
| |
-Wint-to-pointer-cast.
llvm-svn: 123719
|
|
|
|
|
|
|
| |
1. Do not validate for uuid attribute if the type is template dependent.
2. Search every class declaration and definition for the uuid attribute.
llvm-svn: 122578
|
|
|
|
| |
llvm-svn: 122230
|
|
|
|
|
|
| |
GUID.
llvm-svn: 122226
|
|
|
|
| |
llvm-svn: 122162
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether the expression contains an unexpanded parameter pack, in the
same vein as the changes to the Type hierarchy. Compute this bit
within all of the Expr subclasses.
This change required a bunch of reshuffling of dependency
calculations, mainly to consolidate them inside the constructors and
to fuse multiple loops that iterate over arguments to determine type
dependence, value dependence, and (now) containment of unexpanded
parameter packs.
Again, testing is painfully sparse, because all of the diagnostics
will change and it is more important to test the to-be-written visitor
that collects unexpanded parameter packs.
llvm-svn: 121831
|
|
|
|
| |
llvm-svn: 121763
|
|
|
|
| |
llvm-svn: 121759
|
|
|
|
|
|
|
| |
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
llvm-svn: 121752
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.
This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.
llvm-svn: 121724
|
|
|
|
|
|
| |
BinaryTypeTraitExpr.
llvm-svn: 121298
|
|
|
|
|
|
| |
the failed compile in PR8751.
llvm-svn: 121192
|
|
|
|
|
|
|
| |
I'm not opposed to the idea in concept, but there's no point in preserving
abortive experiments.
llvm-svn: 121083
|
|
|
|
|
|
| |
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.
llvm-svn: 121074
|
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
| |
llvm-svn: 120904
|
|
|
|
| |
llvm-svn: 120902
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.
In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.
This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.
Ted Kremenek kindly contributed the analyzer workarounds in this patch.
llvm-svn: 120890
|
|
|
|
|
|
|
|
|
| |
about deprecated Objective-C pointer conversions. Plus, make sure to
actually set an appropriate AssignmentAction when performing an
implicit conversion from an InitializationSequence. Fixes regressions
in the GCC DejaGNU testsuite.
llvm-svn: 120744
|
|
|
|
| |
llvm-svn: 120646
|
|
|
|
| |
llvm-svn: 120084
|
|
|
|
|
|
| |
out because there are still bugs left.
llvm-svn: 119722
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
llvm-svn: 119685
|
|
|
|
| |
llvm-svn: 119138
|
|
|
|
| |
llvm-svn: 118966
|
|
|
|
|
|
| |
Previously the temporaries would get destroyed before the asm call.
llvm-svn: 118001
|
|
|
|
| |
llvm-svn: 117954
|
|
|
|
|
|
| |
anymore.
llvm-svn: 117357
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.
Patch originally by Samuel Benzaquen.
llvm-svn: 117254
|
|
|
|
|
|
|
|
|
| |
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.
llvm-svn: 116429
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 116336
|
|
|
|
|
|
| |
bit by me).
llvm-svn: 116122
|
|
|
|
|
|
| |
to white-list conversions required by system headers. rdar://problem/8232669
llvm-svn: 116029
|
|
|
|
|
|
|
|
| |
expressions. Fixes PR8209 in the narrowest way possible. I'm still
considering whether I want to implement the extension that permits the
use of VLA types in a 'new' expression.
llvm-svn: 115790
|
|
|
|
|
|
|
| |
for property reference expression (of c++ object type)
in the conditional expression. Fixes // rdar://8291337
llvm-svn: 114783
|
|
|
|
|
|
| |
vla. Implements pr7827.
llvm-svn: 114737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LHS and when conditional expression is an array. Since
it will be decayed, saved expression must be saved with
decayed expression. This is necessary to preserve semantics
of this extension (and prevent an IRGen crash which expects
an array to always be decayed). I am sure there will be other
cases in c++ (aggregate conditionals for example) when saving of the
expression must happen after some transformation on conditional
expression has happened.
Doug, please review. Fixes // rdar://8446940
llvm-svn: 114296
|
|
|
|
| |
llvm-svn: 113897
|
|
|
|
|
|
|
| |
placement 'operator delete', even if there are no placement args (i.e.
overload resolution selected an operator new with default arguments).
llvm-svn: 113861
|
|
|
|
| |
llvm-svn: 113796
|
|
|
|
|
|
| |
due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed.
llvm-svn: 113794
|