summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Objective-C: Issue deprecated warning when using a Fariborz Jahanian2013-04-041-2/+4
| | | | | | | deprecated typedef to subclass or invoke a class method. // rdar://13569424 llvm-svn: 178775
* Add 178663 back.Rafael Espindola2013-04-031-12/+7
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-7/+12
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-12/+7
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* Add a clarifying note when a return statement is rejected becauseJohn McCall2013-03-191-0/+67
| | | | | | | | we expect a related result type. rdar://12493140 llvm-svn: 177378
* Objective-C: When using super.prop, property should beFariborz Jahanian2013-03-111-2/+9
| | | | | | | looked up the current class's super class. // rdar://13349296 llvm-svn: 176832
* Centralize and refine the __unknown_anytype argument rulesJohn McCall2013-03-041-9/+18
| | | | | | | | | and be sure to apply them whether or not the debugger gave us a method declaration. rdar://12565338 llvm-svn: 176432
* Perform the receiver-expression transformations regardless ofJohn McCall2013-03-011-41/+42
| | | | | | | | | | | | | | whether we already have a method. Fixes a bug where we were failing to properly contextually convert a message receiver during template instantiation. As a side-effect, we now actually perform correct method lookup after adjusting a message-send to integral or non-ObjC pointer types (legal outside of ARC). rdar://13305374 llvm-svn: 176339
* objective-C arg: provide fixit support whenFariborz Jahanian2013-02-221-8/+36
| | | | | | | c++'s named cast need be replaced for bridge casting. // rdar://12788838 llvm-svn: 175923
* objective-C arc: Diagnostic can not say to use bridgeFariborz Jahanian2013-02-221-8/+21
| | | | | | | casts with c++ named casts. Change notes to say use bridge with c-style cast instead. // rdar://12788838 llvm-svn: 175850
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-201-3/+3
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* Fix crash-on-invalid where a ParenListExpr shows up as a message receiverArgyrios Kyrtzidis2013-02-151-0/+7
| | | | | | | | while trying to do error recovery. rdar://13207886 llvm-svn: 175282
* Small code change to improve performanceFariborz Jahanian2013-01-221-2/+6
| | | | | | in my last patch, suggested by Argyrios. llvm-svn: 173182
* objectiveC (take two): don't warn when in -Wselector mode andFariborz Jahanian2013-01-221-18/+30
| | | | | | | an unimplemented selector is consumed by "respondsToSelector:". // rdar://12938616 llvm-svn: 173179
* objectiveC: don't warn when in -Wselector mode andFariborz Jahanian2013-01-211-14/+17
| | | | | | | an unimplemented selector is consumed by "respondsToSelector:". // rdar://12938616 llvm-svn: 173097
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-8/+8
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* objective-C arc: Underline the selector when issuingFariborz Jahanian2012-11-281-1/+2
| | | | | | | arc specific diagnostic on the selector. This is objc-arc part of // rdar://11303469 llvm-svn: 168756
* Accept and pass arguments to __unknown_anytype in argumentJohn McCall2012-11-141-0/+13
| | | | | | | | | | | | | | | | | | | | | positions of Objective-C methods. It is possible to recover a lot of type information about Objective-C methods from the reflective metadata for their implementations. This information is not rich when it comes to struct types, however, and it is not possible to produce a type in the debugger's round-tripped AST which will really do anything useful during type-checking. Therefore we allow __unknown_anytype in these positions, which essentially disables type-checking for that argument. We infer the parameter type to be the unqualified type of the argument expression unless that expression is an explicit cast, in which case it becomes the type-as-written of that cast. rdar://problem/12565338 llvm-svn: 167896
OpenPOWER on IntegriCloud