summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Reduce dyn_cast<> to isa<> or cast<> where possible. Clang edition.Benjamin Kramer2015-04-101-3/+2
| | | | | | No functional change intended. llvm-svn: 234587
* [Objective-C Sema] Patch to not issue unavailbility/deprecatedFariborz Jahanian2015-04-071-1/+7
| | | | | | | | warning when multiple method declarations are found in global pool with differing types and some are available. rdar://20408445 llvm-svn: 234328
* [Modules] Make Sema's map of referenced selectors have a deterministicChandler Carruth2015-03-271-5/+4
| | | | | | | | | | | order based on order of insertion. This should cause both our warnings about these and the modules serialization to be deterministic as a consequence. Found by inspection. llvm-svn: 233343
* revert r231700 (designated initializer patch) which brokeFariborz Jahanian2015-03-111-3/+2
| | | | | | several projects. rdar://20120666. llvm-svn: 231939
* [PATCH Sema Objective-C]. Patch to warn on missing designated initializerFariborz Jahanian2015-03-091-2/+3
| | | | | | | override where at least a declaration of a designated initializer is in a super class and not necessarily in the current class. rdar://19653785. llvm-svn: 231700
* [Objective-C Sema]. Don't warn about use of Fariborz Jahanian2015-02-191-2/+6
| | | | | | | property accessors in @selector not implemented because they will be auto-synthesized. rdar://16607480 llvm-svn: 229919
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-171-2/+1
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* Objective-C: Tweak unavailability warning.Nico Weber2014-12-271-1/+1
| | | | | | | Don't warn when a selector has an unavailable and an available variant, and the first also has an implementation. llvm-svn: 224881
* Address review feedback on r221933.Nico Weber2014-12-271-56/+62
| | | | | | | | | | | Remove ObjCMethodList::Count, instead store a "has more than one decl" bit in the low bit of the ObjCMethodDecl pointer, using a PointerIntPair. Most of this patch is replacing ".Method" with ".getMethod()". No intended behavior change. llvm-svn: 224876
* Update for LLVM API change to make Small(Ptr)Set::insert return ↵David Blaikie2014-11-191-2/+2
| | | | | | pair<iterator, bool> as per the C++ standard's associative container concept. llvm-svn: 222335
* Objective-C. Fixes a regression caused by implementationFariborz Jahanian2014-11-131-2/+15
| | | | | | | | of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. llvm-svn: 221933
* Pass around CorrectionCandidateCallbacks as unique_ptrs soKaelyn Takata2014-10-271-11/+10
| | | | | | TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-221-0/+4
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* Objective-C. This patch is to resolve the method used in methodFariborz Jahanian2014-08-131-0/+17
| | | | | | | expression to the best method found in global method pools. This is wip. // rdar://16808765 llvm-svn: 215577
* Replacing some more complex logic with a helper function call to ↵Aaron Ballman2014-08-011-12/+6
| | | | | | ObjCMethod::getReturnTypeSourceRange. No functional changes intended. llvm-svn: 214511
* MS ABI: Consider alignment attributes on typedefs for layoutDavid Majnemer2014-07-301-2/+13
| | | | | | | | | | | | | | | | | | | The MS ABI has a notion of 'required alignment' for fields; this alignment supercedes pragma pack directives. MSVC takes into account alignment attributes on typedefs when determining whether or not a field has a certain required alignment. Do the same in clang by tracking whether or not we saw such an attribute when calculating the type's bitwidth and alignment. This fixes PR20418. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4714 llvm-svn: 214274
* Hide the concept of diagnostic levels from lex, parse and semaAlp Toker2014-06-151-9/+5
| | | | | | | | | | | | | | | | The compilation pipeline doesn't actually need to know about the high-level concept of diagnostic mappings, and hiding the final computed level presents several simplifications and other potential benefits. The only exceptions are opportunistic checks to see whether expensive code paths can be avoided for diagnostics that are guaranteed to be ignored at a certain SourceLocation. This commit formalizes that invariant by introducing and using DiagnosticsEngine::isIgnored() in place of individual level checks throughout lex, parse and sema. llvm-svn: 211005
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-51/+53
| | | | llvm-svn: 209613
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-031-2/+1
| | | | llvm-svn: 207896
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-231-3/+4
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* Objective-C. Fixes a bogus warning on unimplementedFariborz Jahanian2014-03-261-5/+9
| | | | | | | | selectors because we were not going through entire elements in list of all implemented selectors. // rdar://16428638 llvm-svn: 204852
* Objective-C. Better fix for my previous patch Fariborz Jahanian2014-03-181-12/+7
| | | | | | | | | "No need to issue deprecated warning if deprecated method in class extension is being implemented in primary class implementation (no overriding is involved). // rdar://16249335". No functionality change. llvm-svn: 204159
* Objective-C. No need to issue deprecated warning if deprecated method Fariborz Jahanian2014-03-181-2/+12
| | | | | | | | in class extension is being implemented in primary class implementation (no overriding is involved). // rdar://16249335 llvm-svn: 204093
* Objective-C. Do not warn when an instance method andFariborz Jahanian2014-03-171-1/+3
| | | | | | | | class method with the same selctor but different argument types having one of them in class extension. // rdar://16312105 llvm-svn: 204065
* [C++11] Replacing ObjCObjectType iterators qual_begin() and qual_end() with ↵Aaron Ballman2014-03-171-3/+2
| | | | | | iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204047
* Objective-C. Redo turning off designated initialization warnings onFariborz Jahanian2014-03-141-5/+2
| | | | | | | | 'init' methods which are unavailable. Subclasses of NSObject have to implement such methods as a common pattern to prevent user's own implementation. // rdar://16305460 llvm-svn: 203984
* Objective-C. Turn off designated initialization warnings onFariborz Jahanian2014-03-141-2/+5
| | | | | | | | 'init' methods which are unavailable. Subclasses of NSObject have to implement such methods as a common pattern to prevent user's own implementation. // rdar://16305460 llvm-svn: 203966
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-3/+2
| | | | | | 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/+9
| | | | | | 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 visible_extensions_begin() and ↵Aaron Ballman2014-03-131-27/+8
| | | | | | visible_extensions_end() with iterator_range visible_extensions(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203855
* [C++11] Replacing ObjCInterfaceDecl iterators known_categories_begin() and ↵Aaron Ballman2014-03-131-6/+2
| | | | | | known_categories_end() with iterator_range known_categories(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203854
* [C++11] Replacing ObjCInterfaceDecl iterators visible_categories_begin() and ↵Aaron Ballman2014-03-131-5/+2
| | | | | | visible_categories_end() with iterator_range visible_categories(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203851
* [C++11] Replacing ObjCInterfaceDecl iterators ivar_begin() and ivar_end() ↵Aaron Ballman2014-03-131-3/+1
| | | | | | with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203849
* [C++11] Replacing ObjCInterfaceDecl iterators ↵Aaron Ballman2014-03-131-17/+8
| | | | | | 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 ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-131-23/+13
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203840
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-131-27/+16
| | | | | | 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-2/+2
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() ↵Aaron Ballman2014-03-131-7/+2
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203832
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-131-7/+3
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-121-1/+1
| | | | | | class. llvm-svn: 203640
* Objective-C. Diagose use of undefined protocolsFariborz Jahanian2014-03-111-1/+22
| | | | | | | when a class adopts a protocol that inherits from undefined protocols. // rdar://16111182 llvm-svn: 203586
* [C++11] Remove the remaining uses of OwningPtr.Ahmed Charles2014-03-091-4/+2
| | | | | | Replace OwningArrayPtr with std::unique_ptr<T[]>. llvm-svn: 203388
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-071-5/+3
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* Fix recursion bug in logic to validate ↵Ted Kremenek2014-03-051-3/+14
| | | | | | 'objc_protocol_requires_explicit_implementation' conformance. llvm-svn: 203024
* Adjust logic for 'objc_protocol_requires_explicit_implementation' for ↵Ted Kremenek2014-03-051-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | inherited protocols and protocols already conformed in the class hierarchy. Per more discussion, 'objc_protocol_requires_explicit_implementation' is refinement that it mainly adds that requirement that a protocol must be explicitly satisfied at the moment the first class in the class hierarchy conforms to it. Any subclasses that also conform to that protocol, either directly or via conforming to a protocol that inherits that protocol, do not need to re-implement that protocol. Doing this requires first doing a pass on the super class hierarchy, gathering the set of protocols conformed to by the super classes, and then culling those out when determining conformance. This two-pass algorithm could be generalized for all protocol checking, and could possibly be a performance win in some cases. For now we restrict this change to protocols with this attribute to isolate the change in logic (especially as the design continues to evolve). This change needs to be adjusted for properties as well; this only impacts methods right now. llvm-svn: 202948
* [ObjC] Change default property synthesis logic to not completely skip ↵Ted Kremenek2014-02-211-7/+9
| | | | | | | | | DiagnoseUnimplementedProperties. We're going to extend DiagnoseUnimplementedProperties shortly to look for more cases that aren't handled by default property synthesis. llvm-svn: 201878
* Objective-C. Fixes a bug where "new" family attributeFariborz Jahanian2014-01-281-1/+2
| | | | | | | was not being overridden in the category method implementation resulting in bogus warning. // rdar://15919775 llvm-svn: 200342
* ObjectiveC. Fixes a bug in recognition of an ivarFariborz Jahanian2014-01-271-9/+8
| | | | | | | backing a property resulting in bogus warning. // rdar://15890251 llvm-svn: 200254
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-54/+49
| | | | | | | | | | | | | | | 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
* ObjectiveC. When issuing property implementation isFariborz Jahanian2014-01-221-0/+7
| | | | | | | | not using backing ivar warning, ignore when property is not being synthesized (user declared its implementation @dynamic). // rdar://1583425 llvm-svn: 199820
OpenPOWER on IntegriCloud