[clang-tools-extra] [clang-tidy] Add frames for bugprone-exception-escape options (PR #187971)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 20:34:17 PDT 2026


================
@@ -489,7 +492,9 @@ ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException(
     // are not explicitly non-throwing and no throw was discovered.
     if (AssumeUnannotatedFunctionsAsThrowing &&
         Result.getBehaviour() == State::NotThrowing && canThrow(Func)) {
-      Result.registerUnknownException();
+      CallStack.insert({Func, CallLoc});
+      Result.registerUnknownException({Func->getLocation(), CallStack});
+      CallStack.erase(Func);
     }
----------------
zeyi2 wrote:

Fixed, thanks!

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


More information about the cfe-commits mailing list