summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C. Tweak diagnosing properties that are not auto-synthesized.Fariborz Jahanian2014-08-291-20/+19
| | | | | | | | | | | Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478 llvm-svn: 216753
* Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid ↵Craig Topper2014-08-171-1/+1
| | | | | | needing to mention the size. llvm-svn: 215869
* Objective-C. Issue more warning diagnostic when certainFariborz Jahanian2014-07-261-9/+12
| | | | | | | | properties are not synthesized in property auto-synthesis, as it can potentiall lead to runtime errors. rdar://17774815 llvm-svn: 214032
* Refactoring. Remove Owned method from Sema.Nikola Smiljanic2014-05-291-1/+1
| | | | llvm-svn: 209812
* Refactoring. Remove release and take methods from ActionResult. Rename ↵Nikola Smiljanic2014-05-291-3/+3
| | | | | | takeAs to getAs. llvm-svn: 209800
* Objective-C. Fixes an obscuer crash caused by multiple inclusion ofFariborz Jahanian2014-05-271-0/+3
| | | | | | | same framework after complaining about duplicate class definition. // rdar://17024681 llvm-svn: 209672
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-43/+49
| | | | llvm-svn: 209613
* Clean up language and grammar.Eric Christopher2014-05-201-1/+1
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209215
* Provide and use a safe Token::getRawIdentifier() accessorAlp Toker2014-05-171-2/+1
| | | | llvm-svn: 209061
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-031-2/+1
| | | | llvm-svn: 207896
* [MS-ABI] Add support for #pragma section and related pragmasWarren Hunt2014-04-081-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the msvc pragmas section, bss_seg, code_seg, const_seg and data_seg as well as support for __declspec(allocate()). Additionally it corrects semantics and adds diagnostics for __attribute__((section())) and the interaction between the attribute and the msvc pragmas and declspec. In general conflicts should now be well diganosed within and among these features. In supporting the pragmas new machinery for uniform lexing for msvc pragmas was introduced. The new machinery always lexes the entire pragma and stores it on an annotation token. The parser is responsible for parsing the pragma when the handling the annotation token. There is a known outstanding bug in this implementation in C mode. Because these attributes and pragmas apply _only_ to definitions, we process them at the time we detect a definition. Due to tentative definitions in C, we end up processing the definition late. This means that in C mode, everything that ends up in a BSS section will end up in the _last_ BSS section rather than the one that was live at the time of tentative definition, even if that turns out to be the point of actual definition. This issue is not known to impact anything as of yet because we are not aware of a clear use or use case for #pragma bss_seg but should be fixed at some point. Differential Revision=http://reviews.llvm.org/D3065#inline-16241 llvm-svn: 205810
* [C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and ↵Aaron Ballman2014-03-141-6/+2
| | | | | | propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203930
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-8/+4
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-13/+6
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators known_extensions_begin() and ↵Aaron Ballman2014-03-131-8/+3
| | | | | | known_extensions_end() with iterator_range known_extensions(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203857
* [C++11] Replacing ObjCInterfaceDecl iterators ↵Aaron Ballman2014-03-131-22/+9
| | | | | | all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203848
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-5/+2
| | | | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases. llvm-svn: 203842
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-131-10/+7
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-131-6/+6
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-131-27/+11
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* Remove trailing whitespace introduced in r203028.Bob Wilson2014-03-111-2/+2
| | | | llvm-svn: 203588
* [C++11] Replacing Decl iterators attr_begin() and attr_end() with ↵Aaron Ballman2014-03-081-7/+5
| | | | | | | | iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops. This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage. llvm-svn: 203362
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Fully reverting r203236 -- it seems the only bots that are happy are the ↵Aaron Ballman2014-03-071-5/+7
| | | | | | MSVC bots. llvm-svn: 203237
* [C++11] Replacing iterators attr_begin() and attr_end() with iterator_range ↵Aaron Ballman2014-03-071-7/+5
| | | | | | attrs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203236
* Objective-C. Suppress the warning for auto synthesis of property notFariborz Jahanian2014-03-051-4/+28
| | | | | | | synthesizing protocol properties if class's super class implements them. // rdar://16089191 llvm-svn: 203028
* Remove dead assignment reported by Gautier DI FOLCO.Ted Kremenek2014-02-251-1/+0
| | | | llvm-svn: 202115
* [ObjC] Make attribute 'objc_protocol_requires_explicit_implementation' ↵Ted Kremenek2014-02-221-13/+37
| | | | | | | | | | | behave correctly with default property synthesis. In particular, if we see an @property within the @interface of a class conforming to a protocol with this attribute, we treat that as if the implementation were available, per the rules of default property synthesis. llvm-svn: 201911
* [ObjC] add support for properties in attribute ↵Ted Kremenek2014-02-211-2/+24
| | | | | | 'objc_protocol_requires_explicit_implementation'. llvm-svn: 201880
* [ObjC] Change default property synthesis logic to not completely skip ↵Ted Kremenek2014-02-211-19/+23
| | | | | | | | | DiagnoseUnimplementedProperties. We're going to extend DiagnoseUnimplementedProperties shortly to look for more cases that aren't handled by default property synthesis. llvm-svn: 201878
* [ObjC] Condense logic for diagnosing unimplemented setter/getters into help ↵Ted Kremenek2014-02-211-39/+38
| | | | | | | | method. No functionality change. llvm-svn: 201877
* [Objective-C Sema]. Warn when an indirectly overridden propertyFariborz Jahanian2014-02-151-3/+9
| | | | | | | | mismatches the one declared in current class; in addition to those that are directly overridden. // rdar://15967517 llvm-svn: 201446
* ObjectiveC. When introducing a new property declaration in Fariborz Jahanian2014-01-271-0/+12
| | | | | | | | parimary class and in mrr mode, assume property's default memory attribute (assign) and to prevent a bogus warning. // rdar://15859862 llvm-svn: 200238
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-10/+8
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Distinguish between attributes explicitly written at the request of the ↵Aaron Ballman2014-01-161-7/+7
| | | | | | | | user, and attributes implicitly generated to assist in bookkeeping by the compiler. This is done so by table generating a CreateImplicit method for each attribute. Additionally, remove the optional nature of the spelling list index when creating attributes. This is supported by table generating a Spelling enumeration when the spellings for an attribute are distinct enough to warrant it. llvm-svn: 199378
* Use a proper lvalue-to-rvalue conversion in Objective-C++ property accessors.Jordan Rose2014-01-141-4/+10
| | | | | | | | | | | Previously, the synthesized AST contained an rvalue DeclRefExpr for 'self'. Now, it has an lvalue DeclRefExpr wrapped in an lvalue-to-rvalue ImplicitCastExpr, which is what's generated when an ivar access is written in the source. No (intended) functionality change. llvm-svn: 199225
* ObjectiveC. 1) Warn when @dynamic (as well as synthesize) Fariborz Jahanian2014-01-101-6/+2
| | | | | | | | | property has the naming convention that implies 'ownership'. 2) improve on diagnostic and make it property specific. 3) fix the line number in the case of default property synthesis. // rdar://15757510 llvm-svn: 198905
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-031-1/+1
| | | | llvm-svn: 198418
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-031-2/+2
| | | | llvm-svn: 198416
* Replacing calls to getAttr with calls to hasAttr for clarity. No functional ↵Aaron Ballman2013-12-191-2/+2
| | | | | | change intended -- this only replaces Boolean uses of getAttr. llvm-svn: 197648
* ObjectiveC. support "section" attribute on propertiesFariborz Jahanian2013-12-181-1/+7
| | | | | | and methods. rdar://15450637 llvm-svn: 197625
* Objective-C. Do not issue warning when 'readonly'Fariborz Jahanian2013-12-131-30/+7
| | | | | | | | | | | | | | property declaration has a memory management attribute (retain, copy, etc.). Sich properties are usually overridden to become 'readwrite' via a class extension (which require the memory management attribute specified). In the absence of class extension override, memory management attribute is needed to produce correct Code Gen. for the property getter in any case and this warning becomes confusing to user. // rdar://15641300 llvm-svn: 197251
* Enhance "auto synthesis will not synthesize property in protocol" to include ↵Ted Kremenek2013-12-121-2/+4
| | | | | | | | property and protocol name. Implements <rdar://problem/15617839>. llvm-svn: 197187
* [objc] Add a warning when a class that provides a designated initializer, ↵Argyrios Kyrtzidis2013-12-031-0/+28
| | | | | | | | does not override all of the designated initializers of its superclass. llvm-svn: 196319
* ObjectiveC ARC. Removes a bogus warning when a weak Fariborz Jahanian2013-11-191-1/+3
| | | | | | | property is redeclared as 'weak' in class extension. // rdar://15465916 llvm-svn: 195146
* ObjectiveC arc. Warn when an implicitly 'strong' property Fariborz Jahanian2013-10-261-0/+14
| | | | | | | is redeclared as 'weak' in class extension. // rdar://15304886 llvm-svn: 193453
* ObjectiveC: Warn when 'readonly' property has explicitFariborz Jahanian2013-10-071-118/+39
| | | | | | | ownership attribute (such as 'copy', 'assign' etc.) // rdar://15131088 llvm-svn: 192115
* ObjectiveC. Allow readonly properties without an explicit ownershipFariborz Jahanian2013-10-041-24/+34
| | | | | | | | (assign/unsafe_unretained/weak/retain/strong/copy) in super class to be overridden by a property with any explicit ownership in the subclass. // rdar://15014468 llvm-svn: 191971
* ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation Fariborz Jahanian2013-09-191-0/+4
| | | | | | | | | | of ObjectiveC properties to mean annotation of NS_RETURNS_INNER_POINTER on its synthesized getter. This also facilitates more migration to properties when methods are annotated with NS_RETURNS_INNER_POINTER. // rdar://14990439 llvm-svn: 191009
* Fix recovery for missing * in objc property.Eli Friedman2013-07-091-2/+10
| | | | | | <rdar://problem/14354144> llvm-svn: 185897
OpenPOWER on IntegriCloud