[PATCH] D79584: [SVE] Add a couple of extra sizeless type tests
Richard Sandiford via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 02:34:08 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2d561f1a336: [SVE] Add a couple of extra sizeless type tests (authored by rsandifo-arm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79584/new/
https://reviews.llvm.org/D79584
Files:
clang/test/Sema/sizeless-1.c
clang/test/SemaCXX/sizeless-1.cpp
Index: clang/test/SemaCXX/sizeless-1.cpp
===================================================================
--- clang/test/SemaCXX/sizeless-1.cpp
+++ clang/test/SemaCXX/sizeless-1.cpp
@@ -379,6 +379,8 @@
extern array_alias<svint8_t> *array_alias_int8_ptr; // expected-note {{in instantiation of template type alias 'array_alias' requested here}}
#endif
+extern "C" svint8_t c_return_int8();
+
void cxx_only(int sel) {
svint8_t local_int8;
svint16_t local_int16;
Index: clang/test/Sema/sizeless-1.c
===================================================================
--- clang/test/Sema/sizeless-1.c
+++ clang/test/Sema/sizeless-1.c
@@ -290,4 +290,10 @@
int a3[_Generic(0, svint8_t : 1, svint16_t : 2, default : 3) == 3 ? 1 : -1];
(void)_Generic(0, svint8_t : 1, svint8_t : 2, default : 3); // expected-error {{type 'svint8_t' (aka '__SVInt8_t') in generic association compatible with previously specified type 'svint8_t'}} expected-note {{compatible type}}
}
+
+void test_compound_literal(void) {
+ svint8_t local_int8;
+
+ (void)(svint8_t){local_int8};
+}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79584.307998.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201127/afac74cd/attachment.bin>
More information about the cfe-commits
mailing list