summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX
Commit message (Collapse)AuthorAgeFilesLines
...
* objective-C++: Delayed parsing of most commonFariborz Jahanian2012-08-101-0/+38
| | | | | | | member functions defined inside an objc class implementation. wip. llvm-svn: 161667
* Objective-C pointer types don't have C-linkage, even though they areDouglas Gregor2012-08-071-0/+3
| | | | | | non-POD. Fixes <rdar://problem/12031870>. llvm-svn: 161395
* Fix an assertion failure instantiating a constexpr function from within a ↵Eli Friedman2012-08-011-0/+19
| | | | | | -dealloc method. PR13401. llvm-svn: 161135
* Improvements to vexing-parse warnings. Make the no-parameters case moreRichard Smith2012-07-301-1/+1
| | | | | | | | | | | | | accurate by asking the parser whether there was an ambiguity rather than trying to reverse-engineer it from the DeclSpec. Make the with-parameters case have better diagnostics by using semantic information to drive the warning, improving the diagnostics and adding a fixit. Patch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for declarations of the form 'T (*x)(...)', which seem to have a very high false positive rate, and to reduce indentation in 'warnAboutAmbiguousFunction'. llvm-svn: 160998
* objective-c arc: When function calls with known CFCreate naming conventionFariborz Jahanian2012-07-271-4/+4
| | | | | | | | are cast to retainable types, only suggest CFBridgingRelease/ CFBridgingRetain and not the __bridge casts. // rdar://11923822 llvm-svn: 160900
* revert r160839 for now.Fariborz Jahanian2012-07-271-14/+14
| | | | llvm-svn: 160895
* objc-arc: When objects with known CF semantics are assigned toFariborz Jahanian2012-07-261-14/+14
| | | | | | | | retainable types in arc, only suggest CFBridgingRelease/ CFBridgingRetain and not the confusing __bridge casts. // rdar://11923822 llvm-svn: 160839
* When we have an Objective-C object with non-trivial lifetime in aDouglas Gregor2012-07-231-0/+45
| | | | | | | | structor class under ARC, that struct/class does not have a trivial move constructor or move assignment operator. Fixes the rest of <rdar://problem/11738725>. llvm-svn: 160615
* Fixes an ObjC++ parse crash caused by delayed parsingFariborz Jahanian2012-07-201-0/+4
| | | | | | | | of c-functions nested in namespace in method implementations by turning off its delayed parsing until a proper solution is figured out. pr13418 llvm-svn: 160552
* Capitalize "Objective-C" and "C++" in user-facing contexts.Jordan Rose2012-07-191-2/+2
| | | | | | No functionality change. llvm-svn: 160516
* When performing the deduced/actual argument type check for C++Douglas Gregor2012-07-181-0/+17
| | | | | | | | [temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the qualifiers to introduce the implicit strong lifetime when needed. Fixes <rdar://problem/11825671>. llvm-svn: 160412
* objective-c++11: extend c++11 range-based loop to iterateFariborz Jahanian2012-07-061-0/+61
| | | | | | over objective-c container collection. // rdar://9293227 llvm-svn: 159847
* objective-c++ parsing. Turn off delayed parsingFariborz Jahanian2012-07-051-1/+2
| | | | | | | | | of out-of-line c++ method definition which happens to be inside an objc class implementation until I can figure out how to do it. This is to fix a broken project. llvm-svn: 159772
* Obj-C++11 parser: handle a fall out of delayed Fariborz Jahanian2012-07-031-0/+43
| | | | | | | c-function parsing when a declaration with C++0x braced-init-list is inside an @implementation. llvm-svn: 159693
* Teach the __is_trivially_assignable and __is_trivially_constructibleDouglas Gregor2012-06-291-1/+80
| | | | | | | type traits that assignment to/construction of a lifetime-qualified object under ARC is *not* trivial. Fixes <rdar://problem/11738725>. llvm-svn: 159401
* objective-c: improve diagnostic when collection expression isFariborz Jahanian2012-06-221-4/+4
| | | | | | not a pointer to a fast-enumerable object. // rdar://11488666 llvm-svn: 158998
* Restructure how the driver communicates information about theJohn McCall2012-06-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Test that -Wauto-var-id fires in value-dependent contexts.Jordan Rose2012-06-151-3/+9
| | | | | | | There was already a test that it did not fire in type-dependent contexts. This was already behaving correctly. llvm-svn: 158530
* Warn in ObjC++ when an 'auto' variable deduces type 'id'.Jordan Rose2012-06-081-1/+22
| | | | | | | | | | | | | | | | | | | | This could happen for cases like this: - (NSArray *)getAllNames:(NSArray *)images { NSMutableArray *results = [NSMutableArray array]; for (auto img in images) { [results addObject:img.name]; } return results; } Here the property access will fail because 'img' has type 'id', rather than, say, NSImage. This warning will not fire in templated code, since the 'id' could have come from a template parameter. llvm-svn: 158239
* Allow objc @() syntax for enum types.Argyrios Kyrtzidis2012-05-151-0/+58
| | | | | | | | | | Previously we would reject it as illegal using a value of enum type and on ObjC++ it was illegal to use an enumerator as well. rdar://11454917 llvm-svn: 156843
* Add a missing RequireCompleteType call when synthesizing properties. ↵Eli Friedman2012-05-011-1/+12
| | | | | | | | <rdar://problem/11333367>. While I'm here, fix source locations for other diagnostics related to property synthesis. llvm-svn: 155953
* HandleDeclarator() returns NULL for semantic disasters. Deal with itDouglas Gregor2012-04-301-0/+23
| | | | | | | when we're in an Objective-C container context. Fixes <rdar://problem/11286701>. llvm-svn: 155836
* Teach RequireCompleteType about multi-dimensional arrays. FixesDouglas Gregor2012-04-231-0/+8
| | | | | | <rdar://problem/11284902>. llvm-svn: 155356
* objective-c modern translator: buildit objc boolFariborz Jahanian2012-04-161-1/+1
| | | | | | | type for rewriter project will be BoolTy. // rdar://11231426. llvm-svn: 154861
* super and class property reference expressions don't need to beDouglas Gregor2012-04-131-0/+15
| | | | | | rebuilt. Fixes <rdar://problem/11052352>. llvm-svn: 154667
* objective-c numeric literal: type of boolean isFariborz Jahanian2012-04-121-1/+10
| | | | | | | that of typedef BOOL if found. // rdar://11231426 llvm-svn: 154595
* Added a new attribute, objc_root_class, which informs the compiler when a ↵Patrick Beard2012-04-0619-19/+19
| | | | | | | | | root class is intentionally declared. The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698> llvm-svn: 154187
* Forbid the block and lambda copy-capture of __autoreleasing variablesJohn McCall2012-03-301-0/+21
| | | | | | in ARC, under the usual reasoning limiting the use of __autoreleasing. llvm-svn: 153725
* Fix typo in my last patch.Fariborz Jahanian2012-03-281-2/+2
| | | | llvm-svn: 153602
* objective-c: Improve diagnostics andFariborz Jahanian2012-03-281-2/+2
| | | | | | | provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 llvm-svn: 153584
* 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
OpenPOWER on IntegriCloud