| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange
in CXXConstructExpr nodes.
Added testcase.
llvm-svn: 190239
|
|
|
|
|
|
| |
threadprivate_messages.cpp)
llvm-svn: 190183
|
|
|
|
|
|
|
|
| |
This reverts commit r189795.
threadprivate_messages.cpp is faling on windows.
llvm-svn: 189811
|
|
|
|
| |
llvm-svn: 189795
|
|
|
|
|
|
|
|
|
|
| |
In addition to storing more useful information in the AST, this
fixes a semantic check in template instantiation which checks whether
the l-paren location is valid.
Fixes PR16903.
llvm-svn: 188495
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Source-centric tools need access to the location of a C++11
lambda expression's capture-default ('&' or '=') when it's present.
It's possible for them to find it by re-lexing and re-implementing
rules that Clang's parser has already applied, but the cost of storing
the SourceLocation and making it available to them is 32 bits per
LambdaExpr (a small delta, proportionally), and the simplification in
client code is significant.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits, klimek, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1192
llvm-svn: 188121
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.
A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().
Fixes <rdar://problem/14438917>.
llvm-svn: 186738
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.
llvm-svn: 183283
|
|
|
|
|
|
|
|
| |
- Sema tests added and CodeGen tests are pending
Differential Revision: http://llvm-reviews.chandlerc.com/D728
llvm-svn: 181101
|
|
|
|
|
|
|
|
|
|
|
| |
Add serialization for captured statements and captured decls. Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
llvm-svn: 181048
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
about 'isa' ivar being explicitely accessed
when base is a user class object reference.
// rdar://13503456
llvm-svn: 178562
|
|
|
|
|
|
|
|
| |
is accessed via accessing 'isa' ivar to use
object_getClass/object_setClass apis.
// rdar://13503456
llvm-svn: 178282
|
|
|
|
|
|
|
| |
c++'s named cast need be replaced for bridge casting.
// rdar://12788838
llvm-svn: 175923
|
|
|
|
|
|
|
|
| |
This change also makes the serialisation store the required semantics,
fixing an issue where PPC128 was always assumed when re-reading a
128-bit value.
llvm-svn: 173139
|
|
|
|
|
|
| |
class, SwitchCase.
llvm-svn: 171483
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
viceversa). No functionality change.
llvm-svn: 167591
|
|
|
|
|
|
|
|
|
| |
Spent longer than reasonable looking for a nice way to test this & decided to
give up for now. Open to suggestions/requests. Richard Smith suggested adding
something to ASTMatchers but it wasn't readily apparent how to test this with
that.
llvm-svn: 167507
|
|
|
|
|
|
| |
namespace.
llvm-svn: 166194
|
|
|
|
|
|
|
|
| |
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 162629
|
|
|
|
| |
llvm-svn: 162210
|
|
|
|
| |
llvm-svn: 159925
|
|
|
|
| |
llvm-svn: 159723
|
|
|
|
| |
llvm-svn: 158325
|
|
|
|
|
|
|
|
|
| |
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://11190837
llvm-svn: 156890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calculating it recursively.
boost::assign::tuple_list_of uses the trick of chaining call operator expressions in order to declare a "list of tuples", e.g:
std::vector<tuple> v = boost::assign::tuple_list_of(1, "foo")(2, "bar")(3, "qqq");
Due to CXXOperatorCallExpr calculating its source range recursively we would get
significant slowdowns with a large number of chained call operator expressions and the
potential for stack overflow.
rdar://11350116
llvm-svn: 155848
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
of an uninitialized Stmt* in serialization of __atomic_init and add a test of
atomics serialization.
llvm-svn: 154448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference is going to message the setter, the getter, or both.
Having this info on the ObjCPropertyRefExpr node makes it easier for AST
clients (like libclang) to reason about the meaning of the property reference.
[AST/Sema]
-Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info
-Have ObjCPropertyOpBuilder set the info appropriately.
[libclang]
-When there is an implicit property reference (property syntax using methods)
have clang_getCursorReferenced return a cursor for the method. If the property
reference is going to result in messaging both the getter and the setter choose
to return a cursor for the setter because it is less obvious from source inspection
that the setter is getting called.
The general idea has the seal of approval by John.
rdar://11151621
llvm-svn: 153709
|
|
|
|
|
|
|
|
| |
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.
llvm-svn: 152491
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.
UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).
User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.
This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.
llvm-svn: 152211
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
|
|
|
|
|
|
|
| |
- This reduces our total # of allocations building a PCH for Cocoa.h by almost
a whopping 50%.
- A SmallPtrMap would be cleaner, but since we don't have one yet...
llvm-svn: 151697
|
|
|
|
|
|
|
|
| |
uninitialized.
Found by valgrind.
llvm-svn: 151527
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.
Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.
Fixes the Clang side of <rdar://problem/10895483> / PR12038.
llvm-svn: 151352
|
|
|
|
|
|
|
|
| |
hold the used constructor itself.""
This reintroduces commit r150682 with a fix for the Bullet benchmark crash.
llvm-svn: 150685
|
|
|
|
|
|
|
|
|
|
| |
used constructor itself."
It leads to a compiler crash in the Bullet benchmark.
This reverts commit r12014.
llvm-svn: 150684
|