summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-init.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaTemplate/instantiate-init.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaTemplate/instantiate-init.cpp')
-rw-r--r--test/SemaTemplate/instantiate-init.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-init.cpp b/test/SemaTemplate/instantiate-init.cpp
index 6a1a57c..22c70be 100644
--- a/test/SemaTemplate/instantiate-init.cpp
+++ b/test/SemaTemplate/instantiate-init.cpp
@@ -118,3 +118,18 @@ namespace PR13064 {
template<typename T> struct C { T a = { 0 }; }; // expected-error{{explicit}}
C<A> c; // expected-note{{here}}
}
+
+namespace PR16903 {
+ // Make sure we properly instantiate list-initialization.
+ template<typename T>
+ void fun (T it) {
+ int m = 0;
+ for (int i = 0; i < 4; ++i, ++it){
+ m |= long{char{*it}};
+ }
+ }
+ int test() {
+ char in[4] = {0,0,0,0};
+ fun(in);
+ }
+}
OpenPOWER on IntegriCloud