summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Patch fixes PR21932 crash on invalid code. UsingFariborz Jahanian2015-01-201-21/+22
| | | | | | | property-dot syntax on 'super' with no super class. Patch by Jason Haslam. llvm-svn: 226578
* Address review feedback on r221933.Nico Weber2014-12-271-3/+4
| | | | | | | | | | | 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
* [Objective-C]. This patch extends objc_bridge attribute to support ↵Fariborz Jahanian2014-12-111-0/+3
| | | | | | | | | | objc_bridge(id). This means that a pointer to the struct type to which the attribute appertains is a CF type (and therefore an Objective-C object of some type), but not of any specific class. rdar://19157264 llvm-svn: 224072
* Fix the indentation: Nesting level does not match indentation (CID 1254863)Sylvestre Ledru2014-11-171-2/+2
| | | | llvm-svn: 222152
* Objective-C. Fixes a regression caused by implementationFariborz Jahanian2014-11-131-2/+1
| | | | | | | | of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. llvm-svn: 221933
* [Objective-C Sema]. Issue availability/deprecated warning when Fariborz Jahanian2014-11-071-1/+5
| | | | | | | there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 llvm-svn: 221562
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-281-63/+12
| | | | llvm-svn: 220812
* [Objective-C]. revert r220740,r220727Fariborz Jahanian2014-10-281-16/+5
| | | | llvm-svn: 220802
* Objective-C ARC [qoi]. Issue diagnostic if __bridge castingFariborz Jahanian2014-10-271-5/+16
| | | | | | to C type a collection literal. rdar://18768214 llvm-svn: 220727
* Pass around CorrectionCandidateCallbacks as unique_ptrs soKaelyn Takata2014-10-271-9/+9
| | | | | | TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
* Objective-C. Under a special flag, -Wcstring-format-directive,Fariborz Jahanian2014-09-111-11/+24
| | | | | | | | | off by default, issue a warning if %s directive is used in formart argument of a function/method declared as __attribute__((format(CF/NSString, ...))) To complete rdar://18182443 llvm-svn: 217619
* Objective-C. Under a special flag, -Wcstring-format-directive,Fariborz Jahanian2014-09-091-1/+31
| | | | | | | | off by default, issue a warning if %s directive is used in certain CF/NS formatting APIs, to assist user in deprecating use of such %s in these APIs. rdar://18182443 llvm-svn: 217467
* Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor ↵Craig Topper2014-08-301-1/+1
| | | | | | and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216824
* Objective-C. Allow [super initialize] in an +initializeFariborz Jahanian2014-08-251-8/+19
| | | | | | | implementation but not anywhere else. rdar://16628028 llvm-svn: 216408
* Objective-C. Warn when @encode'ing provides an incompleteFariborz Jahanian2014-08-221-1/+5
| | | | | | | | type encoding because in certain cases, such as for vector types, because we still haven't designed encoding for them. rdar://9255564 llvm-svn: 216301
* Objective-C. Update my previous patch to not warn ifFariborz Jahanian2014-08-221-2/+3
| | | | | | | +initialize is called on 'super' in its implementation. rdar://16628028 llvm-svn: 216282
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-221-0/+13
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* Objective-C [qoi]. Provide fix-it hint when sendingFariborz Jahanian2014-08-191-5/+13
| | | | | | class method to an object receiver. rdar://16263395 llvm-svn: 216038
* Objective-C. Do not warn if user is using property-dox syntax to name aFariborz Jahanian2014-08-151-1/+5
| | | | | | | user provided setter name (as declared in @property attribute declaration). rdar://18022762 llvm-svn: 215736
* Objective-C. Handle case of multiple class methodsFariborz Jahanian2014-08-131-1/+5
| | | | | | found in global pool as well. rdar://16808765 llvm-svn: 215603
* Objective-C. Minor refactoring of my last patch.Fariborz Jahanian2014-08-131-7/+4
| | | | | | // rdar://16808765 llvm-svn: 215581
* Objective-C. This patch is to resolve the method used in methodFariborz Jahanian2014-08-131-0/+7
| | | | | | | expression to the best method found in global method pools. This is wip. // rdar://16808765 llvm-svn: 215577
* Objective-C [qoi]. Patch to not do Fix-It for fixingFariborz Jahanian2014-08-121-3/+6
| | | | | | | | | a messaging expression except in the simple case of a unary selector. We cannot reliably provide such a fixit due to numerous reasons where a matching selector could not be found. rdar://15756038 llvm-svn: 215480
* Objective-C [qoi]. Issue warning and fixit if property-dot syntaxFariborz Jahanian2014-08-081-0/+12
| | | | | | | use mis-cased property name (which is currently accepted silently due to the way property setters are named). rdar://17911746 llvm-svn: 215250
* Objective-C. Minor refactoring of my previous patch.Fariborz Jahanian2014-08-081-36/+29
| | | | | | rdar://17554063 llvm-svn: 215235
* Objective-C ARC. Use of non-retain/autorelease APIFariborz Jahanian2014-08-081-6/+35
| | | | | | | for building Objective-C array literals in ARC mode. rdar://17554063 llvm-svn: 215232
* Objective-C arc. Switch the Objective-C dictionary literal in ARC modeFariborz Jahanian2014-08-071-6/+9
| | | | | | | to use non-retain/autorelease API variants of ObjC objects. wip. rdar://17554063 llvm-svn: 215146
* Objective-C ARC. More code for Objective-C'sFariborz Jahanian2014-08-061-2/+28
| | | | | | new APIs for literals. nfc. wip. rdar://17554063 llvm-svn: 215043
* Objective-C ARC. First patch toward generating new APIsFariborz Jahanian2014-08-061-2/+2
| | | | | | | for Objective-C's array and dictionary literals. rdar://17554063. This is wip. llvm-svn: 214983
* Replacing some more complex logic with a helper function call to ↵Aaron Ballman2014-08-011-6/+2
| | | | | | ObjCMethod::getReturnTypeSourceRange. No functional changes intended. llvm-svn: 214511
* Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges, Fariborz Jahanian2014-07-311-1/+1
| | | | | | | when arguments are structures or classes. PR16392. patch by Karlis Senko llvm-svn: 214409
* Objective-C. Warn if protocol used in an @protocolFariborz Jahanian2014-07-251-0/+2
| | | | | | | expression is a forward declaration as this results in undefined behavior. rdar://17768630 llvm-svn: 213968
* Switch over a few uses of param_begin() to parameters()Alp Toker2014-07-071-17/+17
| | | | llvm-svn: 212442
* Objective-C ARC. Provide diagnostic and fix-it Fariborz Jahanian2014-06-261-0/+23
| | | | | | | | | when casting a retainable object to a objc_bridge_related CF type with the suggestion of applying the method specified in the bridging attribute to the object. // rdar://15932435 llvm-svn: 211807
* Objective-C. When we use @selector(save:), etc. there may be more Fariborz Jahanian2014-06-241-9/+17
| | | | | | | | | | | | | than one method with mismatched type of same selector name. clang issues a warning to point this out since it may cause undefined behavior. There are cases though that some APIs don't care about user methods and such warnings are perceived as noise. This patch allows users to add paren delimiters around selector name to turn off such warnings. So, @selector((save:)) will turn off the warning. It also provides 'fixit' so user knows what to do. // rdar://16458579 llvm-svn: 211611
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-181-3/+6
| | | | | | | | retainable ObjC pointers without requiring a bridge-cast in the context of pointer comparison as this is in effect a +0 context. // rdar://16627903 llvm-svn: 211243
* Objective-C. Revert my patch in r211234.Fariborz Jahanian2014-06-181-3/+1
| | | | llvm-svn: 211237
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-181-1/+3
| | | | | | | retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 llvm-svn: 211234
* Objective-C. Check for integer overflow in Objective-C'sFariborz Jahanian2014-06-181-1/+1
| | | | | | boxed expression. // rdar://16417427 llvm-svn: 211215
* Objective-C ARC. Do not warn about properties with bothFariborz Jahanian2014-06-171-1/+8
| | | | | | | | | IBOutlet and weak attributes when accessed being unpredictably set to nil because usage of such properties are always single threaded and its ivar cannot be set to nil asynchronously. // rdar://15885642 llvm-svn: 211132
* Hide the concept of diagnostic levels from lex, parse and semaAlp Toker2014-06-151-13/+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
* Objective-C. More tests for both bridging attributes andFariborz Jahanian2014-06-111-1/+1
| | | | | | | a fix to make it work when CFStructs have no definition. // rdar://17238954. llvm-svn: 210690
* Objective-C. Patch to handle bridge attribute warningsFariborz Jahanian2014-06-111-29/+80
| | | | | | | | correctly when both NSAttributedString and NSMutableAttributedString are specified on the same CFStruct via different typedefs. // rdar://17238954 llvm-svn: 210660
* Refactoring. Remove Owned method from Sema.Nikola Smiljanic2014-05-291-62/+42
| | | | llvm-svn: 209812
* Refactoring. Remove release and take methods from ActionResult. Rename ↵Nikola Smiljanic2014-05-291-13/+13
| | | | | | takeAs to getAs. llvm-svn: 209800
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-81/+90
| | | | llvm-svn: 209613
* Objective-C ARC. Add support for toll-free bridge Fariborz Jahanian2014-05-101-0/+16
| | | | | | | type ,and bridge attribute, checking with static_cast. // rdar://16756639 llvm-svn: 208474
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-091-2/+3
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* Objective-C. Improve diagnosis of bridging types.Fariborz Jahanian2014-04-291-41/+20
| | | | | | // rdar://16737117 llvm-svn: 207542
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-231-2/+3
| | | | | | symbols in non-imported modules. llvm-svn: 206977
OpenPOWER on IntegriCloud