diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1152,6 +1152,12 @@ case BuiltinType::ULong: OS << "UL"; break; case BuiltinType::LongLong: OS << "LL"; break; case BuiltinType::ULongLong: OS << "ULL"; break; + case BuiltinType::Int128: + OS << "i128"; + break; + case BuiltinType::UInt128: + OS << "Ui128"; + break; } } diff --git a/clang/test/AST/ast-print-int128.cpp b/clang/test/AST/ast-print-int128.cpp new file mode 100644 --- /dev/null +++ b/clang/test/AST/ast-print-int128.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -ast-print -std=c++20 %s -o - | FileCheck %s + +template +struct enable_if { +}; + +template <__uint128_t x, typename = typename enable_if::type> +void f(); + +template <__int128_t> +void f(); + +using T = decltype(f<0>()); + +// CHECK: using T = decltype(f<0>());