summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX
Commit message (Collapse)AuthorAgeFilesLines
* lldb support: under debugger support flag, when sending messageFariborz Jahanian2012-03-091-0/+8
| | | | | | | to forward class, and assigning to an 'id' type var, message sends default to 'id'. // rdar"//10988847 llvm-svn: 152420
* Perform l2r conversions on delete operands before doingJohn McCall2012-03-091-0/+21
| | | | | | | type-analysis; otherwise, we just completely do the wrong thing for placeholders. llvm-svn: 152375
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-062-0/+316
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* objective-c++: Type of an objc string literal is NSString, not 'id'.Fariborz Jahanian2012-02-231-0/+10
| | | | | | // rdar://10907410 llvm-svn: 151296
* In Objective-C++, allow the keyword 'class' to be used as a propertyDouglas Gregor2012-02-161-0/+17
| | | | | | | | name for dot syntax, e.g., NSObject.class or foo.class. For other C++-keywords-as-method-names, use message send syntax. Fixes <rdar://problem/10794452>. llvm-svn: 150710
* Only complain about __strong __strong id, not __strong SomeStrongTypedefJohn McCall2012-02-081-2/+2
| | | | | | or __strong __typeof__(some.strong.thing). llvm-svn: 150029
* Fixed some testsuite problems introduced by mySean Callanan2012-02-042-1/+10
| | | | | | last commit. Sorry for the outage. llvm-svn: 149744
* [frontend] Don't allow a mapping to a warning override an error/fatal mapping.Chad Rosier2012-02-031-1/+1
| | | | | | rdar://10736625 llvm-svn: 149662
* Look for declaration of CFBridgingRetain/CFBridgingRetain beforeFariborz Jahanian2012-02-011-14/+18
| | | | | | changing the diagnostic. Also use correct spelling for both. llvm-svn: 149554
* objc-arc: In various diagnostics mention Fariborz Jahanian2012-01-311-14/+14
| | | | | | | | CFBridgingRetain/CFBridgingRelease calls instead of __bridge_retained/__bridge_transfer casts as preferred way of moving cf objects to arc land. // rdar://10207950 llvm-svn: 149449
* objc: Issue a generic diagnostic assigning to Fariborz Jahanian2012-01-241-2/+2
| | | | | | an objc object in any abi mode. llvm-svn: 148847
* objc: issue error if assigning objects in fragile-abi too.Fariborz Jahanian2012-01-241-0/+13
| | | | | | // rdar://10731065 llvm-svn: 148823
* Minor fixups for auto deduction of initializer lists.Sebastian Redl2012-01-231-1/+1
| | | | | | | | Fix some review comments. Add a test for deduction when std::initializer_list isn't available yet. Fix redundant error messages. This fixes and outstanding FIXME too. llvm-svn: 148735
* objc: deprecate direct usage of 'isa' of objc objectsFariborz Jahanian2012-01-181-4/+6
| | | | | | | in favor of usage of api's intended for. // rdar://8290002 llvm-svn: 148404
* Fix a couple issues where we didn't correctly delay diagnostics in ↵Eli Friedman2012-01-181-0/+16
| | | | | | PotentiallyPotentiallyEvaluated contexts. In preparation for making sizeof() PotentiallyPotentiallyEvaluated. llvm-svn: 148367
* Reinstate test case accidentally reverted by r148028Douglas Gregor2012-01-131-4/+14
| | | | llvm-svn: 148118
* In Objective-C++, actually compute the base type of a member accessDouglas Gregor2012-01-121-6/+15
| | | | | | | | expression for an Objective-C object or pointer type, so that we don't attempt to treat the member name as a template. Fixes <rdar://problem/10672501>. llvm-svn: 148028
* Fix some edge cases with C++ casts and placeholder expressions.Eli Friedman2012-01-121-0/+9
| | | | llvm-svn: 147984
* Typo in test.John McCall2012-01-111-2/+2
| | | | llvm-svn: 147905
* Do placeholder conversions on array bounds in both declarators andJohn McCall2012-01-111-0/+9
| | | | | | new-expressions. llvm-svn: 147900
* objc++: patch for IRgen for atomic properties ofFariborz Jahanian2012-01-102-4/+4
| | | | | | | c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 llvm-svn: 147817
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-301-8/+8
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-301-8/+8
| | | | llvm-svn: 147362
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-251-8/+8
| | | | | | constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271
* "Accidentally" fixed a bug with overloading of functions withDouglas Gregor2011-12-151-0/+6
| | | | | | Objective-C objects as parameters in r146659. Add a test for it. llvm-svn: 146660
* In debugger support mode, if we have a top-level message sendDouglas Gregor2011-12-151-1/+2
| | | | | | | expression with an unknown result type, assume that the result type is 'id'. Fixes <rdar://problem/10400663>. llvm-svn: 146622
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* Resolve placeholder expressions before trying to deduceJohn McCall2011-11-151-2/+11
| | | | | | | 'auto'. Introduce a convenience method to make this a bit easier, and use it elsewhere. llvm-svn: 144605
* Don't crash when a duplicate interface/protocol is inside an extern "C" context.Argyrios Kyrtzidis2011-11-131-0/+30
| | | | llvm-svn: 144508
* Improve text of a diagnostic. Fariborz Jahanian2011-10-311-3/+3
| | | | llvm-svn: 143353
* objc-arc: desugar certain type and improve on diagnostic forFariborz Jahanian2011-10-291-3/+3
| | | | | | | ownership qualifier cast which won't work. // rdar://10244607 llvm-svn: 143258
* objective-c arc: type-casting of an objc pointer toFariborz Jahanian2011-10-281-3/+6
| | | | | | | an rvalue retainable object type with life-time qualifier has no effect and wil be diagnosed as error. // rdar://10244607 llvm-svn: 143219
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-251-1/+1
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-251-1/+1
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-251-1/+1
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Teach the ARC compiler to not require __bridge casts whenJohn McCall2011-10-172-4/+107
| | | | | | | passing/receiving CF objects at +0 to/from Objective-C methods or audited C functions. llvm-svn: 142219
* Under ARC, merge the bit corresponding to the ns_returns_retainedDouglas Gregor2011-10-141-0/+8
| | | | | | | attribute from the first declaration to later declarations. Fixes <rdar://problem/10142572>. llvm-svn: 141957
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-132-2/+2
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Don't complain about qualified property or ivar access when theDouglas Gregor2011-10-101-0/+2
| | | | | | qualifier itself is invalid. Crasher noticed by Fariborz. llvm-svn: 141544
* Diagnose attempts to qualify the name of an instance variable orDouglas Gregor2011-10-091-0/+15
| | | | | | property in an Objective-C++ member access expression. Fixes PR9759. llvm-svn: 141522
* objc++: some minor cleanup and a test caseFariborz Jahanian2011-10-072-2/+15
| | | | | | for atomic setters which requires assignment operator. llvm-svn: 141415
* objc++: For atomic properties of c++ class objec typet, appropriateFariborz Jahanian2011-10-062-1/+30
| | | | | | | operator= is called. Issue a warning for non-trivial case until runtime support is provided. // rdar://6137845 llvm-svn: 141302
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-0217-17/+17
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* objc++ arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+20
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This fixes the objc++ side only *auch*. // rdar://10187884 llvm-svn: 140717
* Remove the egregious hack that made Objective-C++ ARC work with olderDouglas Gregor2011-09-271-11/+0
| | | | | | | versions of libc++. Newer versions of libc++ know how to deal with ARC properly. Fixes <rdar://problem/10062179>. llvm-svn: 140651
* objc - redeclaration of property in extension classFariborz Jahanian2011-09-241-1/+1
| | | | | | | must match property type declaration in its primary class. // rdar://10142679 llvm-svn: 140438
* Don't assert when diagnosing a missing cast of an unknown-anytypeJohn McCall2011-08-311-0/+8
| | | | | | | | message send to an unknown method. rdar://problem/9416370, redux. llvm-svn: 138893
* objc - fix a bug exposed by my recent decl contextFariborz Jahanian2011-08-251-0/+9
| | | | | | changes. // rdar://10015110 llvm-svn: 138594
* Objective-C++ ARC: When performing template argument deduction for aDouglas Gregor2011-07-261-0/+14
| | | | | | | lifetime-qualified template parameter, ensure that the deduced template argument is a lifetime type. Fixes <rdar://problem/9828157>. llvm-svn: 136078
* arc-objc++: Issue an arc specific diagnostic when overload resolutionFariborz Jahanian2011-07-201-0/+19
| | | | | | | fails because of lifetime differences of parameter and argument type. // rdar://9790531 llvm-svn: 135593
OpenPOWER on IntegriCloud