| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 75178
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
thereof. Patch by Anders Johnsen!
llvm-svn: 73641
|
|
|
|
| |
llvm-svn: 73000
|
|
|
|
| |
llvm-svn: 72871
|
|
|
|
|
|
|
|
|
| |
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.
llvm-svn: 72267
|
|
|
|
| |
llvm-svn: 72210
|
|
|
|
| |
llvm-svn: 71936
|
|
|
|
|
|
|
| |
method is a qualified id which conforms to the matching type
of its method declaration.
llvm-svn: 71817
|
|
|
|
|
|
| |
declarations.
llvm-svn: 71597
|
|
|
|
| |
llvm-svn: 71267
|
|
|
|
| |
llvm-svn: 71248
|
|
|
|
|
|
| |
use of dot-syntax expression. This is to match gcc's.
llvm-svn: 71243
|
|
|
|
|
|
| |
block pointer. Radar 6441502
llvm-svn: 71190
|
|
|
|
|
|
|
| |
refers to the underlying class.
This is radar 6859726. Steve, please read the radar for my rational.
llvm-svn: 71181
|
|
|
|
|
|
|
|
| |
return type and the selector. This is inconsistent with C functions
(where such attributes would be placed on the return type, not the the
FunctionDecl), and is inconsistent with what people are use to seeing.
llvm-svn: 70878
|
|
|
|
|
|
|
|
| |
class/protocol and implementation which could be
an imm. implementation or down in the inheritance
hierarchy.
llvm-svn: 70568
|
|
|
|
| |
llvm-svn: 70514
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.
Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.
llvm-svn: 70504
|
|
|
|
|
|
| |
in an @synthesize diective, as it breaks few projects.
llvm-svn: 70441
|
|
|
|
|
|
| |
and found in super class triggers a diagnostics.
llvm-svn: 70414
|
|
|
|
| |
llvm-svn: 70145
|
|
|
|
| |
llvm-svn: 69996
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
updates name lookup so that we see through @compatibility_alias
declarations to their underlying interfaces.
llvm-svn: 69950
|
|
|
|
| |
llvm-svn: 69945
|
|
|
|
| |
llvm-svn: 69942
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
declaration (and avoid issuing bogus error later on).
llvm-svn: 69928
|
|
|
|
| |
llvm-svn: 69899
|
|
|
|
| |
llvm-svn: 69894
|
|
|
|
|
|
| |
This enables class recognition to work with PCH. I believe this means we can remove Sema::ObjCInterfaceDecls and it's usage within Sema::LookupName(). Will investigate.
llvm-svn: 69891
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.
llvm-svn: 69728
|
|
|
|
| |
llvm-svn: 69710
|
|
|
|
|
|
|
|
| |
ObjCIvarDecl.
Next step: Add selector support to PCHWriter::AddDeclarationName().
llvm-svn: 69619
|
|
|
|
|
|
| |
Test will be enabled with ObjCInterfaceDecl is added.
llvm-svn: 69594
|
|
|
|
|
|
|
| |
calling into the jump checker when a function or method is known to contain
no VLAs or @try blocks.
llvm-svn: 69509
|
|
|
|
|
|
|
|
| |
gen. issue for property in continuation class declared readwrite
but which did not generate the declaration for the setter. Fix also
removed a FIXME and resulted in code cleanup.
llvm-svn: 69200
|
|
|
|
|
|
|
| |
either unimplemented setter/getter or no
implementation directive.
llvm-svn: 69098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Exposed quite a few Sema issues and a CodeGen crash.
- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).
I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.
llvm-svn: 69020
|
|
|
|
|
|
| |
setter/getter synthesis.
llvm-svn: 68976
|
|
|
|
|
|
|
|
| |
missing interface name in "error: cannot declare variable inside a class, protocol or category ''.
Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.
llvm-svn: 68967
|
|
|
|
|
|
|
| |
list of another protocol definition. This warning is very noisy and GCC doesn't
produce it so existing code doesn't expect it.
llvm-svn: 68894
|
|
|
|
|
|
|
|
|
|
|
| |
@property int x;
associate the location of X with the property decl, not the location
of the @. Also, pass this info along to the synthesized ParmVarDecls
so that redefinition and other diagnostics can use it. This eliminates
a fixme.
llvm-svn: 68880
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
info, now
that it is plumbed through Sema. On a file from growl, we used to emit:
t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^
now we produce:
t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^
We still don't have proper loc info for properties, hence the FIXME.
rdar://6782494
llvm-svn: 68879
|
|
|
|
| |
llvm-svn: 68877
|
|
|
|
|
|
| |
to their arguments.
llvm-svn: 68876
|