================
@@ -672,6 +673,131 @@ void Sema::NoteOverflowCheckedOps(Expr *E) {
Handler->setReferenced();
}
+namespace {
+/// Walks a function body, including nested lambda and block bodies, and
+/// diagnoses overflow-checked operations with no visible overflow handler.
+class OverflowHandlerDiagnoser {
+ Sema &S;
+ const IdentifierInfo *Name;
+ /// Handlers visible in the current function body, innermost last. The first
+ /// entry is the function-level handler and may be null.
+ SmallVector<LabelDecl *, 4> Handlers;
+ /// Matches the %select in warn_overflow_behavior_unreachable_handler.
+ enum NestedBodyKind { NB_Lambda, NB_Block };
----------------
Sirraide wrote:
Can you update that diagnostic to use `%enum_select` instead
https://github.com/llvm/llvm-project/pull/235047
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits