summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-04-08 18:40:13 +0000
committerDouglas Gregor <dgregor@apple.com>2013-04-08 18:40:13 +0000
commitf7106af65693d564632956203c879622b2ec8a1f (patch)
tree0c888f2886ee352c6fe4b37b787f5d44e4cfd8a5 /clang/test
parentaa3ffafbde462b1e8ac5c666c8822e738418c195 (diff)
downloadbcm5719-llvm-f7106af65693d564632956203c879622b2ec8a1f.tar.gz
bcm5719-llvm-f7106af65693d564632956203c879622b2ec8a1f.zip
<rdar://problem/13540921> Cope with instantiations of the C++11 range-based for loop that end up being Objective-C fast enumeration loops.
llvm-svn: 179037
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaObjCXX/foreach.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/foreach.mm b/clang/test/SemaObjCXX/foreach.mm
index ec6ed0550e2..ac787bd09ed 100644
--- a/clang/test/SemaObjCXX/foreach.mm
+++ b/clang/test/SemaObjCXX/foreach.mm
@@ -16,6 +16,14 @@ void f(NSArray *a) {
for (auto thisKey : keys) { } // expected-warning{{'auto' deduced as 'id' in declaration of 'thisKey'}}
}
+template<typename Collection>
+void ft(Collection col) {
+ for (id x : col) { }
+ for (auto x : col) { }
+}
+
+template void ft(NSArray *);
+
/* // rdar://9072298 */
@protocol NSObject @end
OpenPOWER on IntegriCloud