| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for copy-constructor closures. These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.
Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.
Differential Revision: http://reviews.llvm.org/D8225
llvm-svn: 231952
|
|
|
|
|
|
|
| |
We didn't create type info based on the unqualified pointee type,
causing RTTI mismatches.
llvm-svn: 231533
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find all unambiguous public classes of the exception object's class type
and reference all of their copy constructors. Yes, this is not
conforming but it is necessary in order to implement their ABI. This is
because the copy constructor is actually referenced by the metadata
describing which catch handlers are eligible to handle the exception
object.
N.B. This doesn't yet handle the copy constructor closure case yet,
that work is ongoing.
Differential Revision: http://reviews.llvm.org/D8101
llvm-svn: 231499
|
|
|
|
|
|
|
|
| |
arithmetic type to a vector so that the arithmatic type
matches the vector element type. Without which it crashes
in Code Gen. rdar://20000762
llvm-svn: 231419
|
|
|
|
|
|
|
| |
We would create the exception object with the wrong qualifiers, ensuring
that the wrong copy constructor would get called.
llvm-svn: 231049
|
|
|
|
| |
llvm-svn: 230590
|
|
|
|
|
|
| |
Do not declare sized deallocation functions dependently on whether it is found in global scope. Instead, enforce the branching in emitted code by (1) declaring the functions extern_weak and (2) emitting sized delete expressions as a branching between both forms delete.
llvm-svn: 230580
|
|
|
|
|
|
|
|
|
| |
We would wrongfully reject (a.~A)() in both the destructor and
pseudo-destructor cases.
This fixes PR22668.
llvm-svn: 230512
|
|
|
|
|
|
|
| |
wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what
we do in other places.
llvm-svn: 230384
|
|
|
|
|
|
| |
implicitly construct a temporary in a reference binding.
llvm-svn: 230381
|
|
|
|
|
|
| |
if sized delete is not provided in global scope, and -fdefine-sized-deallocation option is disabled.
llvm-svn: 230160
|
|
|
|
|
|
|
| |
results. No-one was ever modifying a lookup result, and it would not be
reasonable to do so.
llvm-svn: 230123
|
|
|
|
| |
llvm-svn: 229450
|
|
|
|
|
|
|
|
|
|
| |
__declspec(restrict) and __attribute(malloc) are both handled
identically by clang: they are allowed to the noalias LLVM attribute.
Seeing as how noalias models the C99 notion of 'restrict', rename the
internal clang attribute to Restrict from Malloc.
llvm-svn: 228120
|
|
|
|
|
|
| |
visibility.
llvm-svn: 228107
|
|
|
|
|
|
|
|
|
| |
list-initialization that gets converted to some form other than an
InitListExpr. CXXTemporaryObjectExpr is a special case here, because it
represents a fused CXXFunctionalCastExpr + CXXConstructExpr. That, in
itself, is probably a design error...
llvm-svn: 227377
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
infinite recursion.
Also guard against said infinite recursion by adding an assert that will
trigger if CorrectDelayedTyposInExpr is called before a previous call to
CorrectDelayedTyposInExpr returns (i.e. if the TreeTransform run by
CorrectDelayedTyposInExpr calls a sequence of methods that
end up calling CorrectDelayedTyposInExpr, as the new test case had done
prior to this commit). Fixes PR22292.
llvm-svn: 227368
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under certain circumstances, the identifier mentioned in the diagnostic
won't match the intended correction even though the replacement
expression and the note pointing to the decl are both correct.
Basically, the TreeTransform assumes the TypoExpr's Consumer points to
the correct TypoCorrection, but the handling of typos that appear to be
ambiguous from the point of view of TransformTypoExpr would cause that
assumption to be violated by altering the Consumer's correction stream.
This fix allows the Consumer's correction stream to be reset to the
right TypoCorrection after successfully resolving the percieved ambiguity.
Included is a fix to suppress correcting the RHS of an assignment to the
LHS of that assignment for non-C++ code, to prevent a regression in
test/SemaObjC/provisional-ivar-lookup.m.
This fixes PR22297.
llvm-svn: 227251
|
|
|
|
|
|
|
|
|
|
| |
In particular, remove the OpaqueExpr transformation from r225389 and
move the correction of the conditional from CheckConditionalOperands to
ActOnConditionalOp before the OpaqueExpr is created. This fixes the
typo correction behavior in C code that uses the GNU extension for a
binary ?: (without an expression between the "?" and the ":").
llvm-svn: 227220
|
|
|
|
| |
llvm-svn: 226067
|
|
|
|
| |
llvm-svn: 225513
|
|
|
|
|
|
|
|
|
|
|
|
| |
transform.
Also diagnose typos in the initializer of an invalid C++ declaration.
Both issues were hit using the same line of test code, depending on
whether the code was treated as C or C++.
Fixes PR22092.
llvm-svn: 225389
|
|
|
|
|
|
|
|
|
| |
We forgot a conversion step when initializing an atomic type with an
rvalue of the same type.
This fixes PR22043.
llvm-svn: 224902
|
|
|
|
|
|
| |
unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.
llvm-svn: 224465
|
|
|
|
|
|
|
|
| |
at the number of uncorrected typos before and after. Correcting one typo may produce an expression with another TypoExpr in it, leading to matching counts even though a typo was corrected.
Fixes PR21925!
llvm-svn: 224380
|
|
|
|
| |
llvm-svn: 224377
|
|
|
|
|
|
|
|
|
|
|
| |
Turning our _Atomic L-value into an R-value removes its _Atomic-ness.
However, we didn't update our 'FromType' which made
ScalarTypeToBooleanCastKind think we were trying to pass it a
non-scalar.
This fixes PR21836.
llvm-svn: 224322
|
|
|
|
|
|
|
|
| |
expressions because the lookup finds a different name than the original, fixed by updating the LookupResult's name with the name of the found decl. Second is that we also diagnose delayed typo exprs in the index of an array subscript expression.
The testcase shows a third bug with a FIXME in it.
llvm-svn: 224183
|
|
|
|
|
|
| |
Based on suggestions from Kaelyn.
llvm-svn: 224173
|
|
|
|
|
|
|
|
| |
Transformation of a CallExpr doesn't always result in a new CallExpr.
Fixes PR21899.
llvm-svn: 224172
|
|
|
|
|
|
|
| |
Also have CorrectDelayedTyposInExpr check that the Expr* isn't null
before trying to access its members. Fixes PR21679.
llvm-svn: 223162
|
|
|
|
|
|
|
|
|
| |
arguments).
We don't yet support pointer-to-member template arguments that have undergone
pointer-to-member conversions, mostly because we don't have a mangling for them yet.
llvm-svn: 222807
|
|
|
|
|
|
|
|
|
|
| |
GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.
This fixes PR21632.
llvm-svn: 222569
|
|
|
|
|
|
| |
candidates.
llvm-svn: 222549
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there is more than one TypoExpr within the expr being transformed and
any but the last TypoExpr seen don't have any viable candidates, the
tree transform will be aborted early and the remaining TypoExprs are
never seen and hence never diagnosed. This adds a simple
RecursiveASTVisitor to find all of the TypoExprs to be diagnosed in the
case where typo correction of the entire expr fails (and the result of
the tree transform is an ExprError).
llvm-svn: 222465
|
|
|
|
| |
llvm-svn: 222463
|
|
|
|
|
|
|
|
|
|
|
| |
The default handling is extended to properly create member expressions
and Objective-C ivar references.
Also detect and reject cases where multiple corrections have identical
correction distances and are valid, instead of suggesting the first one
that is found.
llvm-svn: 222462
|
|
|
|
|
|
| |
pair<iterator, bool> as per the C++ standard's associative container concept.
llvm-svn: 222335
|
|
|
|
| |
llvm-svn: 222317
|
|
|
|
| |
llvm-svn: 222315
|
|
|
|
|
|
| |
for a typedef before arithmetic conversion in all rare corner cases.
llvm-svn: 222049
|
|
|
|
| |
llvm-svn: 222047
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular:
1. We need to extract the typedef'ed type for proper diagnostics
2. We need to walk over paren expressions as well
Reviewers: chandlerc, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6256
llvm-svn: 222044
|
|
|
|
|
|
| |
with objc stuff will be resolved.
llvm-svn: 221829
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Consider the following nifty 1 liner: (0 ? csqrtl(2.0f) : sqrtl(2.0f)). One can easily obtain such code from e.g. tgmath. Right now it produces an assertion because we fail to do the promotion real => _Complex real.
The case was properly handled previously (old handleOtherComplexFloatConversion routine), but was forgotten in the current version. This seems to be about fallout from r219557
Reviewers: chandlerc, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6217
llvm-svn: 221821
|
|
|
|
|
|
| |
that was preventing pass-by-value from working correctly.
llvm-svn: 221803
|
|
|
|
|
|
| |
Fixes PR21221. Patch by Axel Naumann, test by me.
llvm-svn: 221771
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One takes an Expr* and the other is a simple wrapper that takes an
ExprResult instead, and handles checking whether the ExprResult is
invalid.
Additionally, allow an optional callback that is run on the full result
of the tree transform, for filtering potential corrections based on the
characteristics of the resulting expression once all of the typos have
been replaced.
llvm-svn: 221735
|
|
|
|
|
|
|
|
| |
This includes adding the new TypoExpr-based lazy typo correction to
LookupMemberExprInRecord as an alternative to the existing eager typo
correction.
llvm-svn: 220698
|
|
|
|
|
|
|
| |
Also keep track of the stack of Exprs visited during the tree transform
so the callback can be passed the parent of the TypoExpr.
llvm-svn: 220697
|