| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 91503
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to all callers. Switch a few other users of CK_Unknown to proper cast
kinds.
Note that there are still some situations where we end up with
CK_Unknown; they're pretty easy to find with grep. There
are still a few missing conversion kinds, specifically
pointer/int/float->bool and the various combinations of real/complex
float/int->real/complex float/int.
llvm-svn: 84623
|
| |
|
|
|
|
|
|
|
| |
users to
pass a LookupResult reference to lookup routines. Call out uses which assume a single
result.
llvm-svn: 83674
|
| |
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
| |
|
|
| |
llvm-svn: 81346
|
| |
|
|
|
|
| |
selector name is for a @selector expression.
llvm-svn: 79776
|
| |
|
|
|
|
|
|
| |
"ObjCImplctSetterGetterRefExpr".
A field rename and more comments.
llvm-svn: 79537
|
| |
|
|
| |
llvm-svn: 79395
|
| |
|
|
|
|
|
|
| |
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
|
| |
|
|
|
|
|
|
| |
- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.
llvm-svn: 76830
|
| |
|
|
| |
llvm-svn: 76741
|
| |
|
|
|
|
| |
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.
llvm-svn: 76510
|
| |
|
|
|
|
| |
ObjCInterfaceDecl::getImplementation().
llvm-svn: 76509
|
| |
|
|
|
|
|
|
|
|
| |
- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.
llvm-svn: 76443
|
| |
|
|
| |
llvm-svn: 76321
|
| |
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098
|
| |
|
|
|
|
|
|
| |
http://llvm.org/viewvc/llvm-project?view=rev&revision=75314.
Still more to come...just wanted to get the no-brainers out of the way.
llvm-svn: 75477
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
|
| |
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
| |
|
|
|
|
|
|
|
|
|
|
| |
representation.
Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).
This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).
No functionality change.
llvm-svn: 73649
|
| |
|
|
| |
llvm-svn: 73495
|
| |
|
|
| |
llvm-svn: 73034
|
| |
|
|
|
|
|
|
| |
This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType.
No functionality change.
llvm-svn: 72475
|
| |
|
|
| |
llvm-svn: 72417
|
| |
|
|
|
|
| |
setting of NSObject attribute.
llvm-svn: 72225
|
| |
|
|
| |
llvm-svn: 71936
|
| |
|
|
|
|
|
| |
method is a qualified id which conforms to the matching type
of its method declaration.
llvm-svn: 71817
|
| |
|
|
|
|
|
| |
message dispatches (and function calls later). No change in
functionality.
llvm-svn: 71683
|
| |
|
|
|
|
|
| |
and we also want to tell which message is actually
being sent.
llvm-svn: 71296
|
| |
|
|
| |
llvm-svn: 71278
|
| |
|
|
|
|
|
| |
in a 'Class' receiver which is not a root instance
method.
llvm-svn: 70987
|
| |
|
|
|
|
| |
message send.
llvm-svn: 70373
|
| |
|
|
|
|
|
|
| |
pools, combined). The methods in the global method pool are lazily
loaded from an on-disk hash table when Sema looks into its version of
the hash tables.
llvm-svn: 69989
|
| |
|
|
|
|
|
|
|
|
|
| |
good for uniformity is good for PCH (or is it the other way around?).
As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.
llvm-svn: 69941
|
| |
|
|
|
|
|
|
|
|
|
|
| |
their own namespace (IDNS_Protocol) and use the normal name-lookup
routines to find them. Aside from the simplification this provides
(one less DenseMap!), it means that protocols will be lazily
deserialized from PCH files.
Make the code size of the selector table block match the code size of
the type and decl blocks.
llvm-svn: 69939
|
| |
|
|
|
|
|
|
|
|
|
| |
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.
This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).
llvm-svn: 69849
|
| |
|
|
|
|
| |
Class and unqualified id's are.
llvm-svn: 68899
|
| |
|
|
|
|
| |
crashes codegen.
llvm-svn: 68891
|
| |
|
|
|
|
| |
No functionality change (really).
llvm-svn: 68726
|
| |
|
|
|
|
|
|
|
|
|
|
| |
with qualified id's. This change is motivated by our desire to not support the "Class<foo>" idiom. Note that the change makes perfect sense (since all ObjC classes are also id/instances).
This allow us to document a simple migration path...change "Class <foo>" to "id <foo>".
This effects:
- <rdar://problem/6761939> TASK: File source change radars for "qualified Class" errors
- <rdar://problem/6761864> Protocol qualified Class is unsupported
llvm-svn: 68517
|
| |
|
|
|
|
| |
This fixes <rdar://problem/6757102> clang type for @"xxx" is "NSConstantString *" (GCC type is "NSString *").
llvm-svn: 68514
|
| |
|
|
| |
llvm-svn: 67981
|
| |
|
|
| |
llvm-svn: 66551
|
| |
|
|
|
|
|
|
|
| |
a warning and then threw away the AST. While I'm in there, tighten up the
code to actually reject completely bogus cases (sending a message to a
struct). We still allow sending a message to an int, which doesn't make
sense but GCC allows it and is easy to support.
llvm-svn: 66468
|
| |
|
|
|
|
|
|
| |
aren't very pretty:-(
This fixes <rdar://problem/6496506> Implement class setter/getter for properties.
llvm-svn: 66465
|
| |
|
|
| |
llvm-svn: 66385
|
| |
|
|
|
|
| |
Patch by Jean-Daniel Dupas. Thanks!
llvm-svn: 66383
|
| |
|
|
| |
llvm-svn: 66099
|
| |
|
|
| |
llvm-svn: 66041
|