| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 188989
|
|
|
|
| |
llvm-svn: 186647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).
This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.
llvm-svn: 183872
|
|
|
|
|
|
| |
Patch by Will Wilson.
llvm-svn: 182651
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a FieldDecl from it, and propagate both into the closure type and the
LambdaExpr.
You can't do much useful with them yet -- you can't use them within the body
of the lambda, because we don't have a representation for "the this of the
lambda, not the this of the enclosing context". We also don't have support or a
representation for a nested capture of an init-capture yet, which was intended
to work despite not being allowed by the current standard wording.
llvm-svn: 181985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
builtins. Patch by Joe Sprowes!
llvm-svn: 180867
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.
There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.
llvm-svn: 179958
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.
TODO: templates
Author: Ben Langmuir <ben.langmuir@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D433
llvm-svn: 179618
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CapturedStmt can be used to implement generic function outlining as described in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.
CapturedStmt is not exposed to the C api.
Serialization and template support are pending.
Author: Wei Pan <wei.pan@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D370
llvm-svn: 179615
|
|
|
|
|
|
|
|
| |
references thereto.
Patch by Tong Shen!
llvm-svn: 179585
|
|
|
|
|
|
|
|
| |
<type_traits>.
Patch by me and Ryan Molden.
llvm-svn: 178111
|
|
|
|
|
|
| |
PrintTemplateArgumentList.
llvm-svn: 175894
|
|
|
|
|
|
| |
through getAsString.
llvm-svn: 175891
|
|
|
|
|
|
|
|
|
| |
This may not always be valid, but we were previously just
emitting them raw.
While here, s/isprint/isPrintable/ (using the new CharInfo).
llvm-svn: 174766
|
|
|
|
|
|
| |
which is wrong here.
llvm-svn: 170721
|
|
|
|
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D52
Patch by Philip Craig!
llvm-svn: 170634
|
|
|
|
|
|
| |
single attribute in the future.
llvm-svn: 170500
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy-list-initialization (and doesn't add an additional copy step):
Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it
when instantiating initializers in order to correctly handle instantiation of
copy-list-initialization. Teach TreeTransform that function arguments are
initializations, and so need this special treatment too. Finally, remove some
hacks which were working around SubstInitializer's shortcomings.
llvm-svn: 170489
|
|
|
|
|
|
|
|
| |
<declaration> tag of Comment XML and fixed a
missing block literal printout as result of the testing.
// rdar://12378714
llvm-svn: 169307
|
|
|
|
|
|
|
|
|
| |
pull in all the generated Attr code.
Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.
llvm-svn: 169092
|
|
|
|
|
|
| |
Post-commit review feedback by Eli Friedman.
llvm-svn: 167739
|
|
|
|
|
|
| |
Patch by Florent Bruneau!
llvm-svn: 167736
|
|
|
|
| |
llvm-svn: 166500
|
|
|
|
|
|
| |
Grzegorz Jablonski.
llvm-svn: 166237
|
|
|
|
|
|
|
|
| |
with default values.
Based on patch by Grzegorz Jablonski.
llvm-svn: 166226
|
|
|
|
|
|
| |
Grzegorz Jablonski.
llvm-svn: 166073
|
|
|
|
|
|
| |
Patch by Grzegorz Jablonski.
llvm-svn: 165832
|
|
|
|
|
|
| |
Patch by Andy Gibbs!
llvm-svn: 164591
|
|
|
|
|
|
|
|
| |
disambiguate them from integers.
Based on a patch by Olaf Krzikalla, UDL fixes by me.
llvm-svn: 164303
|
|
|
|
|
|
|
| |
parameter packs where the reference is not being expanded but the pack has
been. Previously, Clang would segfault in such cases.
llvm-svn: 163672
|
|
|
|
| |
llvm-svn: 163149
|
|
|
|
|
|
| |
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.
llvm-svn: 163083
|
|
|
|
|
|
| |
change intended.
llvm-svn: 162710
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 162632
|
|
|
|
|
|
|
|
|
| |
and remove ASTContext reference (which was frequently bound to a dereferenced
null pointer) from the recursive lump of printPretty functions. In so doing,
fix (at least) one case where we intended to use the 'dump' mode, but that
failed because a null ASTContext reference had been passed in.
llvm-svn: 162011
|
|
|
|
|
|
| |
potential crasher -- Context is sometimes a null reference (!!) here.
llvm-svn: 162007
|
|
|
|
|
|
| |
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.
llvm-svn: 161958
|
|
|
|
| |
llvm-svn: 159925
|
|
|
|
| |
llvm-svn: 159723
|
|
|
|
|
|
|
| |
This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.
llvm-svn: 159494
|
|
|
|
|
|
|
|
|
|
| |
Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.
I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.
llvm-svn: 159060
|
|
|
|
|
|
|
| |
class and have StmtPrinter and StmtDumper refer to it. This fixes an
assertion failure when dumping wchar string literals.
llvm-svn: 158417
|
|
|
|
| |
llvm-svn: 158325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.
Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.
llvm-svn: 158150
|
|
|
|
| |
llvm-svn: 155282
|
|
|
|
| |
llvm-svn: 155082
|
|
|
|
|
|
|
|
|
| |
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not quite sufficient for libstdc++'s <atomic>: we still need
__atomic_test_and_set and __atomic_clear, and may need a more complete
__atomic_is_lock_free implementation.
We are also missing an implementation of __atomic_always_lock_free,
__atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed
for libstdc++.
llvm-svn: 154579
|
|
|
|
|
|
|
|
|
| |
<stdatomic.h> header.
In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.
llvm-svn: 154513
|