[clang-tools-extra] [clang-tidy] Fix crashes when analyzing unknown exceptions in bugprone-exception-escape (PR #218067)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 22 05:48:46 PDT 2026


================
@@ -47,6 +47,17 @@ void calls_unknown_caught() noexcept {
   }
 }
 
+struct Error {};
+
+void calls_unknown_typed_catch() noexcept {
+  // CHECK-MESSAGES-ALL: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'calls_unknown_typed_catch' which should not throw exceptions
+  // CHECK-MESSAGES-UNDEFINED: :[[@LINE-2]]:6: warning: an exception may be thrown in function 'calls_unknown_typed_catch' which should not throw exceptions
----------------
zeyi2 wrote:

Fixed, thanks!

https://github.com/llvm/llvm-project/pull/218067


More information about the cfe-commits mailing list