summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Documentation cleanup:James Dennett2012-06-151-3/+3
| | | | | | | | | * Removed \param comments for parameters that no longer exist; * Fixed a "\para" typo to "\param"; * Escaped @, # and \ symbols as needed in Doxygen comments; * Added use of \brief to output short summaries. llvm-svn: 158498
* [libclang/AST]Argyrios Kyrtzidis2012-06-081-1/+1
| | | | | | | | | | | | | AST: For auto-synthesized ivars give them the location of the related property (previously they had no source location). This allows them to be indexed by libclang. libclang: Make sure synthesized ivars are indexed before the methods that may reference them. Fixes rdar://11607001. llvm-svn: 158189
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-15/+15
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* objective-c: fix a sema and IRGen crash when propertyFariborz Jahanian2012-05-291-3/+3
| | | | | | | | getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 llvm-svn: 157641
* Use the SelectorSet typedef more widely throughout Sema.Benjamin Kramer2012-05-271-1/+1
| | | | | | While there make it a SmallPtrSet. llvm-svn: 157532
* Remove unused argument in my last patch.Fariborz Jahanian2012-05-211-3/+2
| | | | llvm-svn: 157194
* objective-c: When default synthesizing readonly IBOutlet propertiesFariborz Jahanian2012-05-211-54/+42
| | | | | | provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209 llvm-svn: 157193
* objective-c: Warn if default synthesizing readonly IBOutlet propertiesFariborz Jahanian2012-05-191-0/+67
| | | | | | | and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit' part needs little more work. // rdar://11448209 llvm-svn: 157121
* objective-c: perform strict type checking on propertyFariborz Jahanian2012-05-151-13/+34
| | | | | | | | type and its accessor type and issue error if types are incompatible, instead of crashing in IRgen. // rdar://1105153 llvm-svn: 156871
* objc: avoid duplicate diagnostics on certain type mismatchesFariborz Jahanian2012-05-151-16/+18
| | | | | | between property and its backing ivar. llvm-svn: 156832
* [AST/libclang] Speed up clang_getOverriddenCursors() considerably by ↵Argyrios Kyrtzidis2012-05-091-0/+12
| | | | | | | | | | | | | reserving a bit in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of cases. That way we can avoid unnecessary work doing lookups, especially when PCH is involved. rdar://11360082 llvm-svn: 156476
* Fixes a typo. note_xxx not not_xxx.Fariborz Jahanian2012-05-081-1/+1
| | | | llvm-svn: 156391
* Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType()Douglas Gregor2012-05-041-2/+2
| | | | | | | | | | | off PartialDiagnostic. PartialDiagnostic is rather heavyweight for something that is in the critical path and is rarely used. So, switch over to an abstract-class-based callback mechanism that delays most of the work until a diagnostic is actually produced. Good for ~11k code size reduction in the compiler and 1% speedup in -fsyntax-only on the code in <rdar://problem/11004361>. llvm-svn: 156176
* objective-c: warn for properties being default synthesizedFariborz Jahanian2012-05-031-5/+10
| | | | | | | under -Wobjc-missing-property-synthesis which must be opted-in. // rdar://11295716 llvm-svn: 156078
* Add a missing RequireCompleteType call when synthesizing properties. ↵Eli Friedman2012-05-011-18/+36
| | | | | | | | <rdar://problem/11333367>. While I'm here, fix source locations for other diagnostics related to property synthesis. llvm-svn: 155953
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-18/+18
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* 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
OpenPOWER on IntegriCloud