- Apr 23, 2010
-
-
Daniel Dunbar authored
Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps. llvm-svn: 102174
-
John McCall authored
way that C does. Among other differences, elaborated type specifiers are defined to skip "non-types", which, as you might imagine, does not include typedefs. Rework our use of IDNS masks to capture the semantics of different kinds of declarations better, and remove most current lookup filters. Removing the last remaining filter is more complicated and will happen in a separate patch. Fixes PR 6885 as well some spectrum of unfiled bugs. llvm-svn: 102164
-
Douglas Gregor authored
llvm-svn: 102145
-
Douglas Gregor authored
aren't and never were used. There's a gap in the bit pattern for IDNS now, but I'm sure *someone* will fill it. llvm-svn: 102143
-
- Apr 22, 2010
-
-
John McCall authored
address of overloaded function, instead of assuming that a nested name specifier was used. A nested name specifier is not required for static functions. Fixes PR6886. llvm-svn: 102107
-
Douglas Gregor authored
support dependent receivers for class and instance messages, along with dependent message arguments (of course), and check as much as we can at template definition time. This commit also deals with a subtle aspect of template instantiation in Objective-C++, where the type 'T *' can morph from a dependent PointerType into a non-dependent ObjCObjectPointer type. llvm-svn: 102071
-
Dan Gohman authored
the alignment is a power of 2, even in the esoteric case of a vector element which does not have a power-of-2 sizeof value. llvm-svn: 102036
-
- Apr 21, 2010
-
-
Zhongxing Xu authored
llvm-svn: 101994
-
Douglas Gregor authored
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
-
Ted Kremenek authored
llvm-svn: 101953
-
- Apr 20, 2010
-
-
Chris Lattner authored
into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939
-
Chris Lattner authored
llvm-svn: 101912
-
Douglas Gregor authored
function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826
-
- Apr 19, 2010
-
-
Daniel Dunbar authored
llvm-svn: 101815
-
Dan Gohman authored
llvm-svn: 101786
-
- Apr 17, 2010
-
-
Anders Carlsson authored
llvm-svn: 101668
-
Benjamin Kramer authored
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator. llvm-svn: 101633
-
Benjamin Kramer authored
Add raw_ostream operators to NamedDecl for convenience. Switch over all 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
-
Chris Lattner authored
the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. llvm-svn: 101576
-
- Apr 16, 2010
-
-
Anders Carlsson authored
llvm-svn: 101470
-
Anders Carlsson authored
llvm-svn: 101467
-
Anders Carlsson authored
llvm-svn: 101462
-
- Apr 15, 2010
-
-
Anders Carlsson authored
Split adding the primary virtual base offsets out into a separate pass. This fixes a bug where we would lay out virtual bases in the wrong order. llvm-svn: 101373
-
Daniel Dunbar authored
llvm-svn: 101369
-
Daniel Dunbar authored
- Used to determine whether the alignment of the type in a bit-field is respected when laying out structures. The default is true, targets can override this as needed. - This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in gcc. The AST/Sema implementation only affects one line, unless I have forgotten something. I'd appreciate further review. - IRgen still needs to be updated to fully support this (which is effectively PR5591). llvm-svn: 101356
-
- Apr 14, 2010
-
-
Fariborz Jahanian authored
blocks. Fixes PR6468. llvm-svn: 101196
-
Ted Kremenek authored
measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. llvm-svn: 101195
-
John McCall authored
code the first time. Fixes PR6827. llvm-svn: 101184
-
- Apr 13, 2010
-
-
Daniel Dunbar authored
llvm-svn: 101176
-
Chris Lattner authored
this caused us to codegen dead globals like this: struct foo { int a; int b; }; static struct foo fooarray[] = { {1, 2}, {4}, }; llvm-svn: 101150
-
- Apr 12, 2010
-
-
Anders Carlsson authored
Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not. llvm-svn: 101004
-
- Apr 10, 2010
-
-
Anders Carlsson authored
llvm-svn: 100952
-
Anders Carlsson authored
llvm-svn: 100951
-
Anders Carlsson authored
Simplify the virtual base layout code and fix a bug where we wouldn't store the offset for a virtual base. llvm-svn: 100940
-
- Apr 09, 2010
-
-
Fariborz Jahanian authored
for objc. llvm-svn: 100865
-
- Apr 08, 2010
-
-
Fariborz Jahanian authored
of c-style arguments. Completes radar 7445205. llvm-svn: 100813
-
Fariborz Jahanian authored
parameters list for encoding. llvm-svn: 100788
-
John McCall authored
llvm-svn: 100753
-
Daniel Dunbar authored
llvm-svn: 100746
-
Jeffrey Yasskin authored
parameter, explicitly ask the user to give it arguments. We used to complain that it wasn't a type and expect the user to figure it out. llvm-svn: 100729
-