summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Guard lazy synthesis of provisional ivars under the newFariborz Jahanian2011-01-031-1/+2
| | | | | | -fobjc-default-synthesize-properties flag. llvm-svn: 122757
* Warn when synthesizing a property which isFariborz Jahanian2010-12-171-0/+12
| | | | | | | implicitly atomic under -Wimplicit-atomic-properties flag. // rdar://8774580 llvm-svn: 122095
* ivars craeted for explicit @synthesize and thoseFariborz Jahanian2010-12-151-1/+1
| | | | | | | created for auto-synthesis are @private. Fixes: // rdar://8769582 llvm-svn: 121913
* Any property declared in a class extension might have userFariborz Jahanian2010-12-101-1/+4
| | | | | | | | | | | declared setter or getter in current class extension or one of the other class extensions. Mark them as synthesized as property will be synthesized when property with same name is seen in the @implementation. This prevents bogus warning about unimplemented methods to be issued for these methods. Fixes // rdar://8747333 llvm-svn: 121597
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-1/+1
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-181-6/+6
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* For an Objective-C @synthesize statement, e.g.,Douglas Gregor2010-11-171-3/+5
| | | | | | | | | @synthesize foo = _foo; keep track of the location of the ivar ("_foo"). Teach libclang to visit the ivar as a member reference. llvm-svn: 119447
* Kill off the remaining places which generate CK_Unknown casts.John McCall2010-11-161-8/+4
| | | | llvm-svn: 119326
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-151-4/+9
| | | | llvm-svn: 119138
* Check for duplicate declaration of a property in current andFariborz Jahanian2010-11-101-9/+16
| | | | | | other class extensions. // rdar://7629420 llvm-svn: 118689
* Propagate the deprecated and unavailable attributes from aJohn McCall2010-11-101-0/+17
| | | | | | | | | | @property declaration to the autogenerated methods. I'm uncertain whether this should apply to attributes in general, but these are a reasonable core. Implements rdar://problem/8617301 llvm-svn: 118676
* Tweak diagnostics for redeclaration of a @property in a class extension ↵Ted Kremenek2010-10-211-1/+10
| | | | | | | | | | where the redelcaration and original declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic. Fixes <rdar://problem/7629420>. llvm-svn: 117045
* Check for ivar being a C++ object before attempting toFariborz Jahanian2010-10-151-2/+4
| | | | | | | | | find a copy constructor/assignment operator used in getter/setter synthesis. This removes an unintended diagnostics and makes objc++ consistant with objective-c. // rdar: //8550657. llvm-svn: 116631
* Put line number on the diagnostic. //rdar: //8550657.Fariborz Jahanian2010-10-141-1/+1
| | | | llvm-svn: 116519
* Default synthesized ivars don't really have a location in the source. Using ↵Ted Kremenek2010-09-241-3/+8
| | | | | | | | | the location of the @implementation is just confusing for clients that want to use SourceLocations for syntactic references. Fixes: <rdar://problem/8470540> llvm-svn: 114714
* For properties declared in a @protocol and redeclared in a class extension, ↵Ted Kremenek2010-09-231-2/+7
| | | | | | | | | use the class extension as the lexical DeclContext for the @property declaration that gets auto-created for the @interface. Fixes: <rdar://problem/8467189> llvm-svn: 114693
* Correctly register the class extension as the lexical DeclContext for ObjC ↵Ted Kremenek2010-09-211-6/+9
| | | | | | | | | | | | methods declared with @property in class extensions. This matches the behavior for setters. Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property. This fixes the remaining issues in <rdar://problem/7410145>. llvm-svn: 114477
* For ObjCPropertyDecls in class extensions, use the class extension as the ↵Ted Kremenek2010-09-211-12/+18
| | | | | | | | | | | lexical DeclContext for newly created ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls (if they didn't previously exist). This fixes more of the issues reported in <rdar://problem/7410145>. llvm-svn: 114456
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-011-11/+16
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-2/+2
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-1/+1
| | | | | | to the new constants. llvm-svn: 112047
* Remove the DenseSet dependency from Sema.h.John McCall2010-08-251-0/+1
| | | | llvm-svn: 112030
* No need to default synthesize property if implementation Fariborz Jahanian2010-08-251-0/+6
| | | | | | | has its own getter and setter methods declared. Fixed 8349319 (nonfragile-abi2). llvm-svn: 112003
* Fix a bug in nonfragile-abi2 when attempting to diagnoseFariborz Jahanian2010-08-241-2/+4
| | | | | | | | previous use of a synthesized 'ivar' with property of same name declared as @dynamic. In this case, 'ivar' is in the inherited class and no diagnostics should be issued. llvm-svn: 111940
* Struggle mightily against header inclusion in Sema.h.John McCall2010-08-241-0/+1
| | | | llvm-svn: 111904
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-3/+3
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* DeclPtrTy -> Decl *John McCall2010-08-211-50/+48
| | | | llvm-svn: 111733
* StringRef'ication of lots stuff, patch by Peter Davies!Daniel Dunbar2010-08-171-1/+1
| | | | llvm-svn: 111314
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-2/+2
| | | | llvm-svn: 110945
* atch for implementation of objective-c's -WselectorFariborz Jahanian2010-07-221-1/+3
| | | | | | | warning flag in clang. Little more to do for a PCH issue. Radar 6507158. llvm-svn: 109129
* Patch to synthesize property ivars on demand asFariborz Jahanian2010-07-171-1/+19
| | | | | | | part of the new property synthesis by default. wip. llvm-svn: 108599
* Don't error when doing default property synthesis Fariborz Jahanian2010-07-141-0/+4
| | | | | | and some are already synthesized by user declaration. llvm-svn: 108341
* Check on property attributes which are declaredFariborz Jahanian2010-07-131-11/+15
| | | | | | in class extensions (radar 8171968). llvm-svn: 108283
* This patch fixes a bug whereby, clang skipped Fariborz Jahanian2010-06-291-38/+18
| | | | | | | | | unimplemented property warning for properties coming from class's conformin protocol. It also simplifies the algorithm in the process. Fixes radar 8035776. llvm-svn: 107174
* Patch to provide separate ASTs for multiple ObjC class extension Fariborz Jahanian2010-06-221-1/+7
| | | | | | declarations (implements radar 7928731). llvm-svn: 106597
* Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.John McCall2010-06-041-2/+2
| | | | | | This is never null, but the associated type might be. llvm-svn: 105503
* Remember type source information for Objective C property declarations.John McCall2010-06-041-7/+8
| | | | llvm-svn: 105484
* Misc. fixes to bring Objetive-C++'s handling ofFariborz Jahanian2010-05-181-1/+10
| | | | | | | gc attributes to be inline with Objective-C (for radar 7925141). llvm-svn: 104084
* Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because ↵Ted Kremenek2010-05-181-3/+16
| | | | | | | | | | of a current design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor to essentially visit an @property twice (once in the @interface, the other in the class extension). Fixes <rdar://problem/7410145>. llvm-svn: 104055
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-151-12/+9
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Recognize when the named return value optimization applies in aDouglas Gregor2010-05-151-2/+3
| | | | | | | | | | "return" statement and mark the corresponding CXXConstructExpr as elidable. Teach CodeGen that eliding a temporary is different from eliding an object construction. This is just a baby step toward NRVO. llvm-svn: 103849
* Implement new default property synthesis rules. Essentially, no longerFariborz Jahanian2010-05-141-8/+69
| | | | | | | | | user directive is needed to force a property implementation. It is decided based on those propeties which are declared in the class (or in its protocols) but not those which must be default implemented by one of its super classes. Implements radar 7923851. llvm-svn: 103787
* This patch deals with Sema Part of Setter/Getter synthesisFariborz Jahanian2010-05-051-3/+54
| | | | | | | of properties which are of C++ objects. Code Gen to follow (Radar 7468090). llvm-svn: 103123
* Do not issue warning on unimplemented property in the class, if itFariborz Jahanian2010-05-031-1/+31
| | | | | | | | conforms to a protocol as one of its super classes does. This is because conforming super class will implement the property. This implements new warning rules for unimplemented properties (radar 7884086). llvm-svn: 102919
* Properties cannot be synthesized by-dafult inFariborz Jahanian2010-04-291-1/+1
| | | | | | | categories. Issue usual warnings instead of confusing error message. Radar 7920807 llvm-svn: 102645
* Improve on source location of diagnostic when defaultFariborz Jahanian2010-04-211-1/+1
| | | | | | property synthesis is using a super class ivar. llvm-svn: 102011
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-191-0/+1
| | | | | | | | 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
* Feed proper source-location information into Sema::LookupSingleResult,Douglas Gregor2010-04-151-1/+1
| | | | | | | | in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
* Fixes a regression caused by implementing cstyle methods Fariborz Jahanian2010-04-091-1/+1
| | | | | | for objc. llvm-svn: 100865
OpenPOWER on IntegriCloud