| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this compound literal expression (a GNU extension in C++):
(AggregateWithDtor){1, 2}
resulted in this AST:
`-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...])
`-CompoundLiteralExpr [...] 'struct AggregateWithDtor'
`-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...])
`-InitListExpr [...] 'struct AggregateWithDtor'
|-IntegerLiteral [...] 'int' 1
`-IntegerLiteral [...] 'int' 2
Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the
CompoundLiteralExpr, not an object in its own right. By introducing a new
entity initialization kind in Sema specifically for compound literals, we
avoid the treatment of the inner InitListExpr as a temporary.
`-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...])
`-CompoundLiteralExpr [...] 'struct AggregateWithDtor'
`-InitListExpr [...] 'struct AggregateWithDtor'
|-IntegerLiteral [...] 'int' 1
`-IntegerLiteral [...] 'int' 2
llvm-svn: 181212
|
| |
|
|
|
|
|
|
|
|
|
|
| |
__alignof__ of a field.
This problem can only happen in C++11.
Also do some petty optimizations.
rdar://13784901
llvm-svn: 181185
|
| |
|
|
|
|
| |
array from a string literal.
llvm-svn: 181174
|
| |
|
|
| |
llvm-svn: 181166
|
| |
|
|
|
|
|
| |
I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have.
llvm-svn: 181165
|
| |
|
|
|
|
| |
Patch by Robert Wilhelm.
llvm-svn: 181164
|
| |
|
|
|
|
|
| |
This fixes pr14958. I will audit other calls to isExternCContext to see
if there are any similar bugs left.
llvm-svn: 181163
|
| |
|
|
| |
llvm-svn: 181159
|
| |
|
|
| |
llvm-svn: 181158
|
| |
|
|
|
|
|
|
| |
constructor from None
Patch by Robert Wilhelm.
llvm-svn: 181139
|
| |
|
|
| |
llvm-svn: 181113
|
| |
|
|
|
|
|
| |
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.
llvm-svn: 181108
|
| |
|
|
|
|
|
|
|
| |
to use. This makes very little difference right now (other than suppressing
follow-on errors in some cases), but will matter more once we support deduced
return types (we don't want expressions with undeduced return types in the
AST).
llvm-svn: 181107
|
| |
|
|
|
|
| |
diagnostic.
llvm-svn: 181103
|
| |
|
|
|
|
|
|
| |
- Sema tests added and CodeGen tests are pending
Differential Revision: http://llvm-reviews.chandlerc.com/D728
llvm-svn: 181101
|
| |
|
|
| |
llvm-svn: 181092
|
| |
|
|
|
|
|
| |
conversion-type-id, in preparation for this becoming valid in c++1y mode.
No functionality change; small diagnostic improvement.
llvm-svn: 181089
|
| |
|
|
| |
llvm-svn: 181077
|
| |
|
|
|
|
| |
Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag.
llvm-svn: 181073
|
| |
|
|
| |
llvm-svn: 181057
|
| |
|
|
|
|
| |
it when visiting such subexpressions.
llvm-svn: 181046
|
| |
|
|
|
|
|
|
|
|
|
| |
Move the creation of CapturedStmt parameters out of CodeGen and into
Sema, making it easier to customize the outlined function. The
ImplicitParamDecls are stored in the CapturedDecl using an
ASTContext-allocated array.
Differential Revision: http://llvm-reviews.chandlerc.com/D722
llvm-svn: 181043
|
| |
|
|
|
|
| |
provided.
llvm-svn: 181039
|
| |
|
|
|
|
|
|
| |
InitializationSequence::Diagnose()
Patch by Robert Wilhelm.
llvm-svn: 181022
|
| |
|
|
|
|
| |
Patch by Ismail Pazarbasi.
llvm-svn: 181011
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a lambda.
Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.
Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.
rdar://13800041
llvm-svn: 181000
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the actual parser and support arbitrary id-expressions.
We're actually basically set up to do arbitrary expressions here
if we wanted to.
Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.
I've also fixed the serialization of MS asm statements.
This commit depends on an LLVM commit.
llvm-svn: 180976
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180973
|
| |
|
|
| |
llvm-svn: 180972
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180970
|
| |
|
|
|
|
|
|
| |
initializer.
Fixes <rdar://problem/13712739>.
llvm-svn: 180937
|
| |
|
|
|
|
|
|
| |
temporary to an lvalue before taking its address. This removes a weird special
case from the AST representation, and allows the constant expression evaluator
to deal with it without (broken) hacks.
llvm-svn: 180866
|
| |
|
|
|
|
|
|
|
|
|
|
| |
message, to the selector location.
Previously it would point to the left bracket or the receiver, which can be particularly
problematic if the receiver is a block literal and we end up point the diagnostic far away
for the selector that is complaining about.
rdar://13620447
llvm-svn: 180833
|
| |
|
|
| |
llvm-svn: 180822
|
| |
|
|
| |
llvm-svn: 180808
|
| |
|
|
|
|
|
|
| |
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.
llvm-svn: 180789
|
| |
|
|
|
|
|
| |
This came up during my Euro LLVM 2013 talk on clang-format and I was
asked to submit it :-).
llvm-svn: 180772
|
| |
|
|
|
|
|
| |
in the diagnostics. Remove them when reporting incompatible
Objective-C pointer types. // rdar://13752880.
llvm-svn: 180765
|
| |
|
|
|
|
|
|
| |
in the parameter of a function definition. Currently,
it crashes in irgen if it is on other than the 1st dimension.
// rdar://13705391
llvm-svn: 180732
|
| |
|
|
|
|
| |
Patch by Robert Wilhelm!
llvm-svn: 180724
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get
to the CapturedRegionKind enum. This also allows codegen to access this enum
without including Sema/ScopeInfo.h.
Also removes some duplicated code for capturing 'this' between CapturedStmt and
Lambda.
Differential Revision: http://llvm-reviews.chandlerc.com/D712
llvm-svn: 180710
|
| |
|
|
| |
llvm-svn: 180709
|
| |
|
|
|
|
| |
performed within the context of that class template. Patch by Ismail Pazarbasi!
llvm-svn: 180707
|
| |
|
|
|
|
|
|
|
| |
a dependent-scope id expression when a templated member function of a
non-templated class references an unknown identifier, since instantiation won't
rebuild it (and we can tell at parse time that it'll never work). Based on a
patch by Faisal Vali!
llvm-svn: 180701
|
| |
|
|
|
|
| |
Patch by Robert Wilhelm.
llvm-svn: 180682
|
| |
|
|
| |
llvm-svn: 180673
|
| |
|
|
| |
llvm-svn: 180651
|
| |
|
|
| |
llvm-svn: 180610
|
| |
|
|
| |
llvm-svn: 180603
|
| |
|
|
|
|
|
|
| |
Original commit message:
Fix a case in linkage computation that should check for single line extern "C".
llvm-svn: 180591
|