[PATCH] D127074: [NFC] Add test cases reported in PR54341
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 5 10:09:59 PDT 2022
mizvekov updated this revision to Diff 434334.
mizvekov added a comment.
.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127074/new/
https://reviews.llvm.org/D127074
Files:
clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
Index: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
===================================================================
--- clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
+++ clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
@@ -125,6 +125,17 @@
} catch (...) {
throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}}
}
+
+#if __cplusplus >= 201103L
+void test4(A1 a) { // PR54341
+ void f(decltype((throw a, 0)));
+ // expected-warning at -1 {{has no effect}}
+
+ void g(int = decltype(throw a, 0){});
+ // expected-warning at -1 {{has no effect}}
+}
+#endif
+
} // namespace test_throw_parameter
// During the first overload resolution, the selected function no
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127074.434334.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220605/bc417d13/attachment.bin>
More information about the cfe-commits
mailing list