[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 17 12:23:59 PDT 2025
================
@@ -2165,6 +2167,26 @@ void TypePrinter::printBTFTagAttributedAfter(const BTFTagAttributedType *T,
printAfter(T->getWrappedType(), OS);
}
+void TypePrinter::printOverflowBehaviorBefore(const OverflowBehaviorType *T,
+ raw_ostream &OS) {
+ StringRef KindName;
+ switch (T->getBehaviorKind()) {
+ case clang::OverflowBehaviorType::OverflowBehaviorKind::Wrap:
+ KindName = "__wrap";
+ break;
+ case clang::OverflowBehaviorType::OverflowBehaviorKind::NoWrap:
+ KindName = "__no_wrap";
+ break;
+ }
+ OS << KindName << " ";
+ printBefore(T->getUnderlyingType(), OS);
+}
----------------
JustinStitt wrote:
good idea. added to `clang/test/AST/`
https://github.com/llvm/llvm-project/pull/148914
More information about the cfe-commits
mailing list