================
@@ -54,6 +60,29 @@ void call() noexcept {
   nothrow_nobody();
 }
 
+struct Member {
+  Member() noexcept {}
+  Member(const Member &) noexcept {}
+  Member &operator=(const Member &) noexcept { return *this; }
+  ~Member() noexcept {}
+};
+
+struct S {
+  // CHECK-MESSAGES-ALL: :[[@LINE-1]]:8: warning: an exception may be thrown 
in function 'S' which should not throw exceptions
+  // CHECK-MESSAGES-ALL: :[[@LINE-2]]:8: note: frame #0: an exception of 
unknown type may be thrown in function 'S' here
+  // CHECK-MESSAGES-ALL: :[[@LINE-3]]:8: warning: an exception may be thrown 
in function 'operator=' which should not throw exceptions
+  // CHECK-MESSAGES-ALL: :[[@LINE-4]]:8: note: frame #0: an exception of 
unknown type may be thrown in function 'operator=' here
+  // CHECK-MESSAGES-ALL: :[[@LINE-5]]:8: warning: an exception may be thrown 
in function '~S' which should not throw exceptions
+  // CHECK-MESSAGES-ALL: :[[@LINE-6]]:8: note: frame #0: an exception of 
unknown type may be thrown in function '~S' here
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-7]]:8: warning: an exception may be 
thrown in function 'S' which should not throw exceptions
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-8]]:8: note: frame #0: an exception of 
unknown type may be thrown in function 'S' here
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-9]]:8: warning: an exception may be 
thrown in function 'operator=' which should not throw exceptions
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-10]]:8: note: frame #0: an exception 
of unknown type may be thrown in function 'operator=' here
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-11]]:8: warning: an exception may be 
thrown in function '~S' which should not throw exceptions
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-12]]:8: note: frame #0: an exception 
of unknown type may be thrown in function '~S' here
----------------
firewave wrote:

See #188730.

https://github.com/llvm/llvm-project/pull/187971
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to