mizvekov created this revision.
Herald added a project: All.
mizvekov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Signed-off-by: Matheus Izvekov <[email protected]>
Repository:
rG LLVM Github Monorepo
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) {
+ void f(decltype((throw a, 0)));
+ // expected-warning@-1 {{has no effect}}
+
+ void g(int = decltype(throw a, 0){});
+ // expected-warning@-1 {{has no effect}}
+}
+#endif
+
} // namespace test_throw_parameter
// During the first overload resolution, the selected function no
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) {
+ void f(decltype((throw a, 0)));
+ // expected-warning@-1 {{has no effect}}
+
+ void g(int = decltype(throw a, 0){});
+ // expected-warning@-1 {{has no effect}}
+}
+#endif
+
} // namespace test_throw_parameter
// During the first overload resolution, the selected function no
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits