[PATCH] D133467: [BOLT][TEST] Replace dynamic exception specification with noexcept(false)

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 19:21:55 PDT 2022


Amir created this revision.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Clang has switched to gnu++17 by default with https://reviews.llvm.org/D131465.
C++17 removes dynamic exception specification. Replace their uses in tests with
`noexcept(false)` specification. It's a benign change wrt test behavior as
neither noexcept nor dynamic exception specification are part of function type.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133467

Files:
  bolt/test/runtime/X86/Inputs/exception3.cpp
  bolt/test/runtime/X86/Inputs/exception4.cpp


Index: bolt/test/runtime/X86/Inputs/exception4.cpp
===================================================================
--- bolt/test/runtime/X86/Inputs/exception4.cpp
+++ bolt/test/runtime/X86/Inputs/exception4.cpp
@@ -16,9 +16,7 @@
     throw ExcC();
 }
 
-void filter_only(int a) throw (ExcA, ExcB, ExcC, ExcD, ExcE, ExcF) {
-  foo(a);
-}
+void filter_only(int a) noexcept(false) { foo(a); }
 
 void never_throws() throw () {
   printf("this statement is cold and should be outlined\n");
Index: bolt/test/runtime/X86/Inputs/exception3.cpp
===================================================================
--- bolt/test/runtime/X86/Inputs/exception3.cpp
+++ bolt/test/runtime/X86/Inputs/exception3.cpp
@@ -16,9 +16,7 @@
     throw ExcC();
 }
 
-void filter_only(int a) throw (ExcA, ExcB, ExcC, ExcD, ExcE, ExcF) {
-  foo(a);
-}
+void filter_only(int a) noexcept(false) { foo(a); }
 
 int main(int argc, char **argv)
 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133467.458625.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/a76a8039/attachment.bin>


More information about the llvm-commits mailing list