[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 19 12:11:48 PDT 2025


================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -foverflow-behavior-types -std=c++11 -ast-print %s -o - | FileCheck %s
+
+extern int __attribute__((overflow_behavior(no_wrap))) a;
+extern int __attribute__((overflow_behavior(wrap))) b;
+
+// CHECK: extern __no_wrap int a;
+// CHECK: extern __wrap int b;
----------------
mizvekov wrote:

So yeah, please just fix the type printer so it prints using the attribute spelling, if we are going with that, and make sure the ast-print test also does the round-tripping.

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


More information about the cfe-commits mailing list