| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:
1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)
Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:
1) Unchanged; the object instance is represented by an Expr*.
2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...
3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).
4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.
The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!
This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:
if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}
with a switch
switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}
There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.
llvm-svn: 101972
|
|
|
|
| |
llvm-svn: 101876
|
|
|
|
| |
llvm-svn: 101867
|
|
|
|
| |
llvm-svn: 101862
|
|
|
|
| |
llvm-svn: 101786
|
|
|
|
| |
llvm-svn: 101772
|
|
|
|
| |
llvm-svn: 101771
|
|
|
|
|
|
|
|
| |
users of getNameAsString on a stream.
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.
llvm-svn: 101632
|
|
|
|
|
|
| |
float. Fixes PR 6854.
llvm-svn: 101499
|
|
|
|
|
|
|
|
|
|
| |
the default
case in GRExprEngine::Visit (in r101129). Instead, enumerate all Stmt cases and have
no 'default' case in the switch statement. When we encounter a Stmt we don't handle,
we should explicitly add it to the switch statement.
llvm-svn: 101378
|
|
|
|
| |
llvm-svn: 101239
|
|
|
|
| |
llvm-svn: 101238
|
|
|
|
| |
llvm-svn: 101129
|
|
|
|
| |
llvm-svn: 101128
|
|
|
|
|
|
| |
now in the LLVM tree.
llvm-svn: 100891
|
|
|
|
|
|
|
| |
This is still not an ideal solution, but should disable the check for other
targets where the value of O_CREAT is different.
llvm-svn: 100818
|
|
|
|
|
|
|
|
| |
buildbot. I'm
looking into an alternate fix right now.
llvm-svn: 100816
|
|
|
|
|
|
|
|
| |
control-flow has
automatic storage. This matches the corresponding check for 'dispatch_once()'.
llvm-svn: 100803
|
|
|
|
|
|
| |
0 size.
llvm-svn: 100594
|
|
|
|
|
|
|
| |
them the same way as fields. This fixes a regression in RegionStore::RemoveDeadbindings()
that emerged from going to the cluster-based analysis.
llvm-svn: 100570
|
|
|
|
|
|
| |
This bug only shows up with GCC 4.4.1 Release-Asserts build.
llvm-svn: 100516
|
|
|
|
|
|
| |
the callee.
llvm-svn: 100429
|
|
|
|
|
|
| |
code can be removed.
llvm-svn: 100428
|
|
|
|
|
|
|
|
| |
VarRegion.
Patch by Jordy Rose.
llvm-svn: 100099
|
|
|
|
| |
llvm-svn: 100098
|
|
|
|
| |
llvm-svn: 100080
|
|
|
|
|
|
| |
array values with a non-zero offset would get prematurely pruned from the store.
llvm-svn: 100067
|
|
|
|
|
|
| |
the C-only "optimization".
llvm-svn: 100022
|
|
|
|
| |
llvm-svn: 100018
|
|
|
|
|
|
|
| |
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.
llvm-svn: 100008
|
|
|
|
|
|
|
| |
null checks, and make sure we elide null checks when accessing base class
members.
llvm-svn: 99963
|
|
|
|
|
|
|
|
| |
'const'.
Fixes a false positive reported in PR 6288.
llvm-svn: 99922
|
|
|
|
| |
llvm-svn: 99921
|
|
|
|
|
|
|
|
| |
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920
|
|
|
|
|
|
| |
6302.
llvm-svn: 99904
|
|
|
|
|
|
|
| |
This patch moves some methods from QualType to Type and changes the users to
use -> instead of .
llvm-svn: 99805
|
|
|
|
| |
llvm-svn: 99731
|
|
|
|
|
|
| |
when determining if it returns. Fixes <rdar://problem/7796563>.
llvm-svn: 99663
|
|
|
|
|
|
| |
Instead of setting the ReturnExpr GDM to NULL, remove it.
llvm-svn: 99470
|
|
|
|
| |
llvm-svn: 99442
|
|
|
|
| |
llvm-svn: 99441
|
|
|
|
| |
llvm-svn: 99271
|
|
|
|
| |
llvm-svn: 99269
|
|
|
|
| |
llvm-svn: 99268
|
|
|
|
|
|
| |
plate code for evaluating expressions of C++ class type.
llvm-svn: 99267
|
|
|
|
| |
llvm-svn: 99259
|
|
|
|
|
|
|
| |
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.
llvm-svn: 99255
|
|
|
|
|
|
| |
a null dereference results from a field access.
llvm-svn: 99236
|
|
|
|
|
|
| |
uninitialized value is used in the LHS of a compound assignment.
llvm-svn: 99221
|
|
|
|
| |
llvm-svn: 99191
|