summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/vector.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/SemaCXX/vector.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/SemaCXX/vector.cpp')
-rw-r--r--test/SemaCXX/vector.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/test/SemaCXX/vector.cpp b/test/SemaCXX/vector.cpp
index 4d2d064..7957c23 100644
--- a/test/SemaCXX/vector.cpp
+++ b/test/SemaCXX/vector.cpp
@@ -37,7 +37,7 @@ void f2_test(char16 c16, longlong16 ll16, char16_e c16e, longlong16_e ll16e) {
}
// Test the conditional operator with vector types.
-void conditional(bool Cond, char16 c16, longlong16 ll16, char16_e c16e,
+void conditional(bool Cond, char16 c16, longlong16 ll16, char16_e c16e,
longlong16_e ll16e) {
// Conditional operators with the same type.
__typeof__(Cond? c16 : c16) *c16p1 = &c16;
@@ -105,11 +105,11 @@ struct convertible_to { // expected-note 3 {{candidate function (the implicit co
operator T() const;
};
-void test_implicit_conversions(bool Cond, char16 c16, longlong16 ll16,
+void test_implicit_conversions(bool Cond, char16 c16, longlong16 ll16,
char16_e c16e, longlong16_e ll16e,
- convertible_to<char16> to_c16,
- convertible_to<longlong16> to_ll16,
- convertible_to<char16_e> to_c16e,
+ convertible_to<char16> to_c16,
+ convertible_to<longlong16> to_ll16,
+ convertible_to<char16_e> to_c16e,
convertible_to<longlong16_e> to_ll16e,
convertible_to<char16&> rto_c16,
convertible_to<char16_e&> rto_c16e) {
@@ -183,7 +183,7 @@ void test_implicit_conversions(bool Cond, char16 c16, longlong16 ll16,
(void)(Cond? to_c16 : to_c16e);
(void)(Cond? to_ll16e : to_ll16);
-
+
// These 2 are convertable with -flax-vector-conversions (default)
(void)(Cond? to_c16 : to_ll16);
(void)(Cond? to_c16e : to_ll16e);
@@ -278,3 +278,10 @@ void test_pseudo_dtor(fltx4 *f) {
(*f).~fltx4();
test_pseudo_dtor_tmpl(f);
}
+
+// PR16204
+typedef __attribute__((ext_vector_type(4))) int vi4;
+const int &reference_to_vec_element = vi4(1).x;
+
+// PR12649
+typedef bool bad __attribute__((__vector_size__(16))); // expected-error {{invalid vector element type 'bool'}}
OpenPOWER on IntegriCloud