summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR10447: lazily building name lookup tables for DeclContexts was broken.Richard Smith2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The deferred lookup table building step couldn't accurately tell which Decls should be included in the lookup table, and consequently built different tables in some cases. Fix this by removing lazy building of DeclContext name lookup tables. In practice, the laziness was frequently not worthwhile in C++, because we performed lookup into most DeclContexts. In C, it had a bit more value, since there is no qualified lookup. In the place of lazy lookup table building, we simply don't build lookup tables for function DeclContexts at all. Such name lookup tables are not useful, since they don't capture the scoping information required to correctly perform name lookup in a function scope. The resulting performance delta is within the noise on my testing, but appears to be a very slight win for C++ and a very slight loss for C. The C performance can probably be recovered (if it is a measurable problem) by avoiding building the lookup table for the translation unit. llvm-svn: 152608
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-33/+33
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr toJohn McCall2012-03-101-3/+3
| | | | | | | | track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491
* objective-c: provide fixit hint when atomic property does notFariborz Jahanian2012-02-291-8/+39
| | | | | | | have matching user defined setter/getter and a warning is issued. In this case, a fixit note is displayed. // rdar://10267155 llvm-svn: 151766
* [AST] When we @synthesize a property with a user-defined ivar name,Argyrios Kyrtzidis2012-02-281-5/+5
| | | | | | | | | | make sure to record the source location of the ivar name. [libclang] When indexing @synthesized objc methods, report the @implementation as the lexical container. Fixes rdar://10905472 llvm-svn: 151635
* [AST] Associate the getter/setter methods to a property of a objc class ↵Argyrios Kyrtzidis2012-02-281-4/+8
| | | | | | | | | | extension. [libclang] Index the getter/setter methods of a property of a objc class extension. Fixes rdar://10907597 llvm-svn: 151633
* objective-c default synthesis. classes which adopt protocol propertiesFariborz Jahanian2012-02-231-1/+2
| | | | | | | must still auto synthesize those propeties which have been redeclared in the class. // rdar://10907410 llvm-svn: 151268
* Don't crash on attempts to synthesize an invalid property.John McCall2012-02-211-0/+1
| | | | | | rdar://problem/10904479 llvm-svn: 151089
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* Further enhance comment for property in continuation class.Fariborz Jahanian2012-02-021-1/+4
| | | | llvm-svn: 149639
* objc: comment the code which allows narroing of property objectFariborz Jahanian2012-02-021-0/+3
| | | | | | type in continuation class. llvm-svn: 149625
* objective-c: When redeclaraing in continuation class a 'readonly'Fariborz Jahanian2012-02-021-5/+12
| | | | | | | | property to 'readwrite', also allow redeclaration of property type to a narrowring object type. // rdar://10790488 llvm-svn: 149614
* minor refactoring to improve compile-time performance.Fariborz Jahanian2012-01-111-2/+2
| | | | llvm-svn: 147963
* objc-arc: evaluate 'readonly' property with no knownFariborz Jahanian2012-01-111-6/+55
| | | | | | | life-time to that of its backing 'ivar's lifetime. // rdar://10558871 llvm-svn: 147956
* objc++: patch for IRgen for atomic properties ofFariborz Jahanian2012-01-101-2/+6
| | | | | | | c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 llvm-svn: 147817
* After further discussion, rename attribute ↵Ted Kremenek2012-01-051-4/+4
| | | | | | 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'. llvm-svn: 147622
* objc: When issuing warning for missing synthesis forFariborz Jahanian2012-01-041-0/+9
| | | | | | | properties in classes declared with objc_suppress_autosynthesis attribute, pinpoint location of the said class in a note. llvm-svn: 147562
* In non-gc, non-arc mode, property of 'Class' typeFariborz Jahanian2012-01-041-0/+9
| | | | | | | | variety is treated as a 'void *'. No need to issue warning reserved for objc object properties. // rdar://10565506 llvm-svn: 147504
* objc: use objc_suppress_autosynthesis attribute on classesFariborz Jahanian2012-01-031-2/+4
| | | | | | which should not be default synthesized. llvm-svn: 147468
* objc: do not auto synthesize properties declared inFariborz Jahanian2011-12-151-1/+7
| | | | | | protocols; with a warning. // rdar://10567333 llvm-svn: 146626
* Replace all comparisons between ObjCInterfaceDecl pointers with callsDouglas Gregor2011-12-151-2/+2
| | | | | | | | to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. llvm-svn: 146618
* objc-arc: diagnose synthesis of a 'weak unavailable' property.Fariborz Jahanian2011-12-091-6/+14
| | | | | | // rdar://10535245 llvm-svn: 146272
* objc: turn warning for property type mismatch in Fariborz Jahanian2011-11-281-1/+1
| | | | | | | primary and its continuation class into error. // rdar://10142679 llvm-svn: 145255
* [PCH] Do not crash if a class extension in a chained PCH ↵Argyrios Kyrtzidis2011-11-141-0/+5
| | | | | | introduces/redeclares a property. llvm-svn: 144520
* objc-arc: 'readonly' property of retainable objectFariborz Jahanian2011-11-081-3/+2
| | | | | | type is strong by default too. // rdar://10410903 llvm-svn: 144118
* Make sure when setting AttributesAsWritten of a property that they do notArgyrios Kyrtzidis2011-11-061-4/+9
| | | | | | include ownership qualifiers from the type. llvm-svn: 143885
* objc: warn if a readonly property has a setter attribute too.Fariborz Jahanian2011-11-011-0/+5
| | | | | | // rdar://10357768 llvm-svn: 143518
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-5/+3
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-251-3/+5
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-251-5/+3
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Set the objc "property attributes as written" for extension properties as well.Argyrios Kyrtzidis2011-10-181-28/+34
| | | | llvm-svn: 142406
* obj-c++: allow the getter/setter to return/take parametersFariborz Jahanian2011-10-151-2/+4
| | | | | | by reference. // rdar://10188258 llvm-svn: 142075
* objc-arc: 'Class' property is implicitly __unsafe_unretained.Fariborz Jahanian2011-10-131-1/+1
| | | | | | // rdar://10239594 llvm-svn: 141915
* Fix typo in name of diagnostic.Ted Kremenek2011-10-121-1/+1
| | | | llvm-svn: 141793
* objc: note location of the previously declaredFariborz Jahanian2011-10-121-1/+3
| | | | | | property in the diagnostic. llvm-svn: 141745
* objc: err on a property designated both atomic andFariborz Jahanian2011-10-101-0/+7
| | | | | | nonatomic. // rdar://10260017 llvm-svn: 141580
* objc: Do not warn about mismatch on Super's readonly property attribute, Fariborz Jahanian2011-10-081-1/+1
| | | | | | | related to a readwrite property, and Sub's readwrite property. // rdar://9396329 llvm-svn: 141497
* objc++: some minor cleanup and a test caseFariborz Jahanian2011-10-071-5/+2
| | | | | | for atomic setters which requires assignment operator. llvm-svn: 141415
* objc: Improve on diagnostic when atomic proeprty is synthesizedFariborz Jahanian2011-10-061-1/+3
| | | | | | on one accessor and user-provide with another. llvm-svn: 141343
* objc++: For atomic properties of c++ class objec typet, appropriateFariborz Jahanian2011-10-061-0/+15
| | | | | | | operator= is called. Issue a warning for non-trivial case until runtime support is provided. // rdar://6137845 llvm-svn: 141302
* objc: Turn diagnostic on property type mismatch inFariborz Jahanian2011-10-041-1/+1
| | | | | | continuation class into warning. // rdar://10231514 llvm-svn: 141100
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-031-3/+3
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Pass from the parser the locations of selector identifiers when creatingArgyrios Kyrtzidis2011-10-031-1/+2
| | | | | | | | objc method decls. They are not stored in the AST yet. llvm-svn: 140984
* Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived ↵Argyrios Kyrtzidis2011-10-031-1/+1
| | | | | | from the selector. llvm-svn: 140983
* Include prefix with default synthesized ivars.Ted Kremenek2011-09-271-3/+14
| | | | llvm-svn: 140657
* objc - don't complain about unimplemented property when conformingFariborz Jahanian2011-09-271-1/+2
| | | | | | | protocol declares the property, as well as one of its superclasses. Property will be implemented in the super class. // rdar://10120691 llvm-svn: 140586
* objc - compare setter/property types usingFariborz Jahanian2011-09-261-2/+2
| | | | | | hasSameUnqualifiedType in //rdar://10156674 llvm-svn: 140576
* objc - in matching setter argument type to its property type,Fariborz Jahanian2011-09-261-1/+2
| | | | | | ingore the type qualifiers. // rdar://10156674 llvm-svn: 140571
* objc - redeclaration of property in extension classFariborz Jahanian2011-09-241-1/+7
| | | | | | | must match property type declaration in its primary class. // rdar://10142679 llvm-svn: 140438
OpenPOWER on IntegriCloud