Commit Graph

10 Commits

Author SHA1 Message Date
Douglas Gregor f4e43315a9 One can override an Objective-C ARC ownership qualifier that came from
a template parameter; make that also include one that came from
'auto'. Fixes <rdar://problem/12078752>.

llvm-svn: 172770
2013-01-17 23:59:28 +00:00
Fariborz Jahanian 63b1bc70ee objective-c++11: c++11 does not change pod-ness when
type is an unqualified objc pointer in arc. Treat it just
as being treated in c++98. This fixes a bogus vararg warning
with -std=c++11. //rdar://12229679

llvm-svn: 163236
2012-09-05 19:51:20 +00:00
Douglas Gregor 847cea72e6 Objective-C pointer types don't have C-linkage, even though they are
non-POD. Fixes <rdar://problem/12031870>.

llvm-svn: 161395
2012-08-07 06:14:34 +00:00
Jordan Rose 7c0abc34f9 Test that -Wauto-var-id fires in value-dependent contexts.
There was already a test that it did not fire in type-dependent contexts.
This was already behaving correctly.

llvm-svn: 158530
2012-06-15 18:19:43 +00:00
Jordan Rose d8d5669435 Warn in ObjC++ when an 'auto' variable deduces type 'id'.
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
2012-06-08 22:46:07 +00:00
John McCall 67cd5e094e Forbid the block and lambda copy-capture of __autoreleasing variables
in ARC, under the usual reasoning limiting the use of __autoreleasing.

llvm-svn: 153725
2012-03-30 05:23:48 +00:00
Richard Smith 9ca5c42582 Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!

llvm-svn: 141900
2011-10-13 22:29:44 +00:00
John McCall 9b0a7cea0f Make -fobjc-nonfragile-abi the -cc1 default, since it's the
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
2011-10-02 01:16:38 +00:00
Argyrios Kyrtzidis 774506918c Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch.
llvm-svn: 134271
2011-07-01 22:22:40 +00:00
John McCall 31168b077c Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.

llvm-svn: 133103
2011-06-15 23:02:42 +00:00