summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Switched code from using hasAttr followed by getAttr to simply call getAttr ↵Aaron Ballman2013-12-191-2/+1
| | | | | | | | directly. No functional changes intended. llvm-svn: 197676
* Objective-C. After providing a fix-it for aFariborz Jahanian2013-12-181-7/+3
| | | | | | | | cstring, converted to NSString, produce the matching AST for it. This also required some refactoring of the previous code. // rdar://14106083 llvm-svn: 197605
* Objective-C. Make diagnostics and fix-its consistent Fariborz Jahanian2013-12-171-0/+11
| | | | | | | | when diagnosing casting of a cstring literal to NSString in default and -fobjc-arc mode. // rdar://14106083 llvm-svn: 197515
* ObjectiveC. Further improvements of useFariborz Jahanian2013-12-161-13/+25
| | | | | | | | | | of objc_bridge_related attribute; eliminate unnecessary diagnostics which is issued elsewhere, fixit now produces a valid AST tree per convention. This results in some simplification in handling of this attribute as well. // rdar://15499111 llvm-svn: 197436
* [objc] If we don't know for sure what the designated initializers of the ↵Argyrios Kyrtzidis2013-12-131-1/+4
| | | | | | | | | superclass are, assume that a [super init..] inside a designated initializer also refers to a designated one and do not warn. llvm-svn: 197202
* ObjectiveC. Provide a property-dot syntax for fixitFariborz Jahanian2013-12-101-8/+20
| | | | | | | when selector in objc_bridge_related attribute names a property. // rdar://15517899 llvm-svn: 196984
* Objective-C. Minor change to a diagnostic.Fariborz Jahanian2013-12-101-2/+2
| | | | | | // rdar://15499111 llvm-svn: 196977
* Improve on an objc_bridge_related diagnostic.Fariborz Jahanian2013-12-101-6/+6
| | | | | | // rdar://15499111 llvm-svn: 196950
* Objective-C. Provide fixit's for objc_bride_relatedFariborz Jahanian2013-12-101-5/+24
| | | | | | | attributed CF to ObjC type conversions. // rdar://15499111 llvm-svn: 196935
* Objective-C: Improve on various diagnostics related toFariborz Jahanian2013-12-091-69/+83
| | | | | | use of objc_bridge_related attribute. // rdar://15499111 llvm-svn: 196828
* ObjectiveC. Continuing implementation of objc_bridge_relatedFariborz Jahanian2013-12-071-0/+114
| | | | | | | | | attribute in sema and issuing a variety of diagnostics lazily for misuse of this attribute (and what to do) when converting from CF types to ObjectiveC types (and vice versa). // rdar://15499111 llvm-svn: 196629
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* [objc] Emit warning when the implementation of a secondary initializer calls onArgyrios Kyrtzidis2013-12-031-0/+10
| | | | | | | | | | | super another initializer and when the implementation does not delegate to another initializer via a call on 'self'. A secondary initializer is an initializer method not marked as a designated initializer within a class that has at least one initializer marked as a designated initializer. llvm-svn: 196318
* [objc] Emit warnings when the implementation of a designated initializer ↵Argyrios Kyrtzidis2013-12-031-6/+25
| | | | | | | | calls on super an initializer that is not a designated one or any initializer on self. llvm-svn: 196317
* [objc] Emit a warning when the implementation of a designated initializer ↵Argyrios Kyrtzidis2013-12-031-0/+10
| | | | | | | | does not chain to an init method that is a designated initializer for the superclass. llvm-svn: 196316
* ObjectiveC. Implement attribute 'objc_bridge_mutable'Fariborz Jahanian2013-11-211-11/+20
| | | | | | | | whose semantic is currently identical to objc_bridge, but their differences may manifest down the road with further enhancements. // rdar://15498044 llvm-svn: 195376
* ObjectiveC. Allow toll free bridge cast warnings outsideFariborz Jahanian2013-11-211-9/+12
| | | | | | | ARC and in objectiveC/ObjectiveC++ MRR mode as well. // rdar://15454846 llvm-svn: 195288
* ObjectiveC ARC. warn in presense of __bridge casting to Fariborz Jahanian2013-11-201-0/+9
| | | | | | or from a toll free bridge cast. // rdar://15454846 llvm-svn: 195278
* ObjectiveC ARC. validate toll free bridge castingFariborz Jahanian2013-11-201-5/+23
| | | | | | | to or from 'id' and qualified-id types. // rdar://15454846 llvm-svn: 195178
* ObjectiveC objc_bridge. Minor refactoring.Fariborz Jahanian2013-11-191-2/+2
| | | | | | // rdar://15454846 llvm-svn: 195070
* ObjectiveC 'objc_bridging'. Assorment of improvements Fariborz Jahanian2013-11-191-3/+3
| | | | | | per Doug/Jordan comments. // rdar://15454846. llvm-svn: 195066
* ObjectiveC ARC. Adopt objc_bridge attributeFariborz Jahanian2013-11-191-10/+19
| | | | | | | on struct/union/class instead of typedef of such types. // rdar://15454846 llvm-svn: 195061
* ObjectiveC ARC. More validation of toll-free bridging ofFariborz Jahanian2013-11-161-1/+10
| | | | | | | CF objects with objc_bridge'ing annotaiton. // rdar://15454846 llvm-svn: 194938
* ObjectiveC ARC. Validate toll free bridge castingFariborz Jahanian2013-11-161-3/+51
| | | | | | | of ObjectiveC objects to CF types when CF type has the objc_bridge attribute. llvm-svn: 194930
* ObjetiveC ARC. Start diagnosing invalid toll free bridging.Fariborz Jahanian2013-11-161-10/+19
| | | | | | // rdar://15454846. llvm-svn: 194915
* ObjectiveC ARC. Only briding of pointer to struct CF object is allowed.Fariborz Jahanian2013-11-151-2/+2
| | | | | | | Improve on wording on illegal objc_bridge argumment. // rdar://15454846 llvm-svn: 194881
* ObjectiveC ARC. Lookup type associated with objc_bridage atFariborz Jahanian2013-11-151-0/+38
| | | | | | | | the point of CF object type-cast and issue diagnostic if it is not a valid ObjectiveC class. // rdar//15454846. This is wip. llvm-svn: 194861
* Re-instate contextual conversion to Objective-C pointers in message sends.Douglas Gregor2013-11-071-0/+5
| | | | | | | | | When performing an Objective-C message send to a value of class type, perform a contextual conversion to an Objective-C pointer type. We've had this for a long time, but it recently regressed. Fixes <rdar://problem/15234703>. llvm-svn: 194224
* ObjectiveC. Define a new cc1 flag Fariborz Jahanian2013-11-011-1/+1
| | | | | | | | | | | -fobjc-subscripting-legacy-runtime which is off by default and on only when using ObjectiveC legacy runtime. Use this flag to allow array and dictionary subscripting and disallow objectiveC pointer arithmatic in ObjectiveC legacy runtime. // rdar://15363492 llvm-svn: 193889
* Refine string literal concatenation warning within an NSArray literal to not ↵Ted Kremenek2013-10-091-4/+18
| | | | | | warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>. llvm-svn: 192328
* Cache the location of failed typo corrections so that typo correctionKaelyn Uhrain2013-09-271-3/+3
| | | | | | isn't repeatedly attempted for the same identifier at the same location. llvm-svn: 191543
* Omit llvm:: before makeArrayRef. We have using directive in this file.Robert Wilhelm2013-08-191-10/+5
| | | | llvm-svn: 188659
* Refactor all diagnosing of TypoCorrections through a common function, inRichard Smith2013-08-171-21/+10
| | | | | | | preparation for teaching this function how to diagnose a correction that includes importing a module. llvm-svn: 188602
* ObjectiveC [QoI] issue warning if an element of an nsarrayFariborz Jahanian2013-08-131-4/+11
| | | | | | | expresison is a concatenated nsstring element. // rdar://14303083 llvm-svn: 188332
* ObjectiveC ARC: Do not issue bridge cast diagnostic whenFariborz Jahanian2013-07-311-3/+10
| | | | | | | | passing a retainable object arg to a CF audited function expecting a CF object type. Issue a normal type mismatch diagnostic. This is wip // rdar://14569171 llvm-svn: 187532
* Objective-C: Fixes a typo correction bug where aFariborz Jahanian2013-06-181-1/+1
| | | | | | | selector would be correted to identical selector name in certain corner cases. // rdar://7853549 llvm-svn: 184208
* Objective-C [qoi]: privide typo correction for selectorsFariborz Jahanian2013-06-181-9/+9
| | | | | | | | in addition of receiver having static type, but also when receiver has dynamic type (of 'id' variety) as well as when receiver is of 'Class' type vareity. // rdar://7853549 llvm-svn: 184195
* Objective-C [qoi]: Provide fixit hint when message with typoFariborz Jahanian2013-06-171-2/+16
| | | | | | is sent to a receiver object. This is wip. // rdar://7853549 llvm-svn: 184086
* address some comments on r183474:Adrian Prantl2013-06-071-4/+5
| | | | | | | | | | - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 llvm-svn: 183582
* Objective-C: Provide fixit with suggested spelling correctionFariborz Jahanian2013-06-051-2/+12
| | | | | | for -Wundeclared-selector warnings. // rdar://14039037 llvm-svn: 183331
* improve of note message and minor refactoring of my lastFariborz Jahanian2013-05-151-5/+3
| | | | | | patch (r181847). llvm-svn: 181896
* Objective-C [diagnostics] [QOI], when method is notFariborz Jahanian2013-05-141-1/+10
| | | | | | | | found for a receiver, note where receiver class is declaraed (this is most common when receiver is a forward class). // rdar://3258331 llvm-svn: 181847
* Add support for __wchar_t in -fms-extensions mode.Hans Wennborg2013-05-101-2/+2
| | | | | | | | | | | | | | | | | MSVC provides __wchar_t. This is the same as the built-in wchar_t type from C++, but it is also available with -fno-wchar and in C. The commit changes ASTContext to have two different types for this: - WCharTy is the built-in type used for wchar_t in C++ and __wchar_t. - WideCharTy is the type of a wide character literal. In C++ this is the same as WCharTy, and in C it is an integer type compatible with the type in <stddef.h>. This fixes PR15815. llvm-svn: 181587
* ArrayRef'ize Sema::CheckMessageArgumentTypesDmitri Gribenko2013-05-101-15/+17
| | | | llvm-svn: 181571
* ArrayRef'ize some SemaOverload methodsDmitri Gribenko2013-05-091-1/+1
| | | | | | Patch by Robert Wilhelm. llvm-svn: 181544
* ArrayRef'ize Sema::CheckObjCMethodCallDmitri Gribenko2013-05-051-1/+2
| | | | | | Patch by Robert Wilhelm. llvm-svn: 181164
* Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef ↵Dmitri Gribenko2013-05-051-4/+4
| | | | | | | | constructor from None Patch by Robert Wilhelm. llvm-svn: 181139
* ArrayRef'ize InitializationSequence constructor and ↵Dmitri Gribenko2013-05-031-1/+1
| | | | | | | | InitializationSequence::Diagnose() Patch by Robert Wilhelm. llvm-svn: 181022
* Correctly emit certain implicit references to 'self' even withinJohn McCall2013-05-031-1/+1
| | | | | | | | | | | | | | | | | | a lambda. Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation functions. Fix that by generally improving getNonClosureContext to look through lambdas and captured statements but only report code contexts, which is generally what's wanted. Audit uses of CurFuncDecl and getNonClosureAncestor for correctness. Bug #2 is that lambdas weren't specially mapping 'self' when inside an ObjC method. Fix that by removing the requirement for that and using the normal EmitDeclRefLValue path in LoadObjCSelf. rdar://13800041 llvm-svn: 181000
* Point diagnostics that complain about a use of a selector in an objc ↵Argyrios Kyrtzidis2013-05-011-24/+41
| | | | | | | | | | | | message, to the selector location. Previously it would point to the left bracket or the receiver, which can be particularly problematic if the receiver is a block literal and we end up point the diagnostic far away for the selector that is complaining about. rdar://13620447 llvm-svn: 180833
OpenPOWER on IntegriCloud