| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 196518
|
| |
|
|
| |
llvm-svn: 196510
|
| |
|
|
|
|
|
| |
delete on a class which has no array cookie and has no class-specific operator
new.
llvm-svn: 196488
|
| |
|
|
|
|
|
|
|
|
| |
within their namespace, and such a redeclaration isn't required to be a
definition any more.
Update DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5
category (but keep Clang 3.4 yellow for now).
llvm-svn: 196481
|
| |
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
| |
|
|
|
|
|
| |
name from the enclosing namespace set if the name is specified as a
qualified-id.
llvm-svn: 196464
|
| |
|
|
| |
llvm-svn: 196459
|
| |
|
|
|
|
|
|
| |
Use FunctionTypeUnwrapper like we do in AttributedType to try to keep
some sugar. We can actually do one better here in the future by
avoiding the AdjustedType node altogether when no sugar would be lost.
llvm-svn: 196455
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For an init capture, process the initialization expression
right away. For lambda init-captures such as the following:
const int x = 10;
auto L = [i = x+1](int a) {
return [j = x+2,
&k = x](char b) { };
};
keep in mind that each lambda init-capture has to have:
- its initialization expression executed in the context
of the enclosing/parent decl-context.
- but the variable itself has to be 'injected' into the
decl-context of its lambda's call-operator (which has
not yet been created).
Each init-expression is a full-expression that has to get
Sema-analyzed (for capturing etc.) before its lambda's
call-operator's decl-context, scope & scopeinfo are pushed on their
respective stacks. Thus if any variable is odr-used in the init-capture
it will correctly get captured in the enclosing lambda, if one exists.
The init-variables above are created later once the lambdascope and
call-operators decl-context is pushed onto its respective stack.
Since the lambda init-capture's initializer expression occurs in the
context of the enclosing function or lambda, therefore we can not wait
till a lambda scope has been pushed on before deciding whether the
variable needs to be captured. We also need to process all
lvalue-to-rvalue conversions and discarded-value conversions,
so that we can avoid capturing certain constant variables.
For e.g.,
void test() {
const int x = 10;
auto L = [&z = x](char a) { <-- don't capture by the current lambda
return [y = x](int i) { <-- don't capture by enclosing lambda
return y;
}
};
If x was not const, the second use would require 'L' to capture, and
that would be an error.
Make sure TranformLambdaExpr is also aware of this.
Patch approved by Richard (Thanks!!)
http://llvm-reviews.chandlerc.com/D2092
llvm-svn: 196454
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In general, this type node can be used to represent any type adjustment
that occurs implicitly without losing type sugar. The immediate use of
this is to adjust the calling conventions of member function pointer
types without breaking template instantiation.
Fixes PR17996.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2332
llvm-svn: 196451
|
| |
|
|
|
|
|
|
|
| |
nested-name-specifier, rather than crashing. (In fact, reject all
literal-operator-ids that have a non-namespace nested-name-specifier). The
grammar doesn't allow these in some cases, and in other cases does allow them
but instantiation will always fail.
llvm-svn: 196443
|
| |
|
|
|
|
| |
semantic handling. The same cannot be done for DllImport, and so comments were left explaining why.
llvm-svn: 196429
|
| |
|
|
|
|
| |
does not need to be re-checked for each target.
llvm-svn: 196428
|
| |
|
|
|
|
| |
Fixes the relevant FIXME about copy-pasted code.
llvm-svn: 196425
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes.
Clang currently croaks on the following:
struct X1 {
struct X2 {
int L = ([] (int i) { return i; })(2);
};
};
asserting that the containing lexical context of the lambda is not Sema's cur context, when pushing the lambda's decl context on.
This occurs because (prior to this patch) getContainingDC always returns the non-nested class for functions at class scope (even for inline member functions of nested classes (to account for delayed parsing of their bodies)). The patch addresses this by having getContainingDC always return the lexical DC for a lambda's call operator.
Link to the bug: http://llvm.org/bugs/show_bug.cgi?id=18052
Link to Richard Smith's feedback on phabricator: http://llvm-reviews.chandlerc.com/D2331
Thanks!
llvm-svn: 196423
|
| |
|
|
|
|
| |
TargetAttributesSema). Added a FIXME about the attribute being nameless when it really does have a valid name, and a comment explaining why we're using the name instead of the attribute kind.
llvm-svn: 196420
|
| |
|
|
|
|
| |
though some test cases needed to be updated for attribute names becoming quoted.
llvm-svn: 196417
|
| |
|
|
| |
llvm-svn: 196415
|
| |
|
|
|
|
|
|
| |
which specifies couple of (optional) method selectors
for bridging a CFobject to or from an ObjectiveC
object. This is wip. // rdsr://15499111
llvm-svn: 196408
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MSVC destroys arguments in the callee from left to right. Because C++
objects have to be destroyed in the reverse order of construction, Clang
has to construct arguments from right to left and destroy arguments from
left to right.
This patch fixes the ordering by reversing the order of evaluation of
all call arguments under the MS C++ ABI.
Fixes PR18035.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2275
llvm-svn: 196402
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would lose track of the mangling number assigned to the original
declaration which would cause us to create manglings that didn't match
the Itanium C++ specification.
e.g. Two static fields with the same name inside of a function template
would receive the same mangling with LLVM fixing up the second field so
they wouldn't collide. This would create an incompatibility with other
compilers following the Itanium ABI.
I've confirmed that the new mangling is identical to the ones generated
by icc and gcc.
N.B. This was uncovered while working on Microsoft mangler.
llvm-svn: 196368
|
| |
|
|
|
|
| |
to a variable template specialization.
llvm-svn: 196337
|
| |
|
|
|
|
| |
nested-name-specifier.
llvm-svn: 196335
|
| |
|
|
|
|
| |
simple-template-ids (eg, 'operator+<int>') in weird places.
llvm-svn: 196333
|
| |
|
|
|
|
|
|
| |
does not
override all of the designated initializers of its superclass.
llvm-svn: 196319
|
| |
|
|
|
|
|
|
|
|
|
| |
super another initializer and when the implementation does not delegate to
another initializer via a call on 'self'.
A secondary initializer is an initializer method not marked as a designated
initializer within a class that has at least one initializer marked as a
designated initializer.
llvm-svn: 196318
|
| |
|
|
|
|
|
|
| |
calls on
super an initializer that is not a designated one or any initializer on self.
llvm-svn: 196317
|
| |
|
|
|
|
|
|
| |
does not chain to
an init method that is a designated initializer for the superclass.
llvm-svn: 196316
|
| |
|
|
|
|
|
|
|
|
| |
designated initializers of an interface.
If the interface declaration does not have methods marked as designated
initializers then the interface inherits the designated initializers of
its super class.
llvm-svn: 196315
|
| |
|
|
|
|
| |
It only applies to methods of init family in an interface declaration.
llvm-svn: 196314
|
| |
|
|
|
|
|
| |
return void expression. // rdar://15366494
pr17759.
llvm-svn: 196296
|
| |
|
|
|
|
| |
reduces the amount of duplicate code in the handler. No functional change intended.
llvm-svn: 196165
|
| |
|
|
|
|
| |
attribute kind test were superfluous. No functional change intended.
llvm-svn: 196162
|
| |
|
|
|
|
| |
attribute arguments (the common attribute handler already does this). Switching to use the simple attribute handler. No functional change intended.
llvm-svn: 196155
|
| |
|
|
|
|
| |
options to test in tablegen.
llvm-svn: 196138
|
| |
|
|
|
|
| |
cf_audited_transfer and cf_unknown_transfer attributes into separate helper methods for simplicity. No functional changes intended.
llvm-svn: 196126
|
| |
|
|
|
|
| |
diagnostic involved to be more accurate -- for C++ code, it will now report that weak applies to variables, functions or classes. Added additional test case for this.
llvm-svn: 196120
|
| |
|
|
|
|
| |
__w64 specifically. Renamed and removed some unused code. No functional change intended.
llvm-svn: 196116
|
| |
|
|
| |
llvm-svn: 196110
|
| |
|
|
|
|
| |
functional change intended.
llvm-svn: 196107
|
| |
|
|
|
|
| |
Affects: guarded_var, pt_guarded_var, guarded_by, pt_guarded_by, acquired_after and acquired_before. No functional change intended.
llvm-svn: 196105
|
| |
|
|
| |
llvm-svn: 196061
|
| |
|
|
|
|
|
|
| |
Before we were considering them only when instantiating templates.
This fixes pr18033.
llvm-svn: 196050
|
| |
|
|
|
|
| |
functional change intended.
llvm-svn: 195964
|
| |
|
|
|
|
| |
attribute. No functional change intended.
llvm-svn: 195963
|
| |
|
|
|
|
| |
the custom subject for the ibaction attribute.
llvm-svn: 195960
|
| |
|
|
|
|
|
|
|
|
|
| |
We wouldn't properly save and restore the pending local instantiations
we had built up prior to instantiation of a variable definition. This
would lead to us instantiating too much causing crashes and other
general badness.
This fixes PR14374.
llvm-svn: 195887
|
| |
|
|
|
|
| |
the semantic checking was already automated.
llvm-svn: 195866
|
| |
|
|
|
|
| |
diagnostic for attribute subjects. In turn, this allows the Subjects to be enabled for some more attributes and improves diagnostics. Updated a test case based on the improved diagnostic.
llvm-svn: 195864
|
| |
|
|
|
|
| |
test cases to be updated because the original diagnostic was about applying to methods as well as functions, but the semantic checking disallowed methods.
llvm-svn: 195862
|