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 @@ -1170,6 +1170,10 @@ case BuiltinType::ULong: OS << "UL"; break; case BuiltinType::LongLong: OS << "LL"; break; case BuiltinType::ULongLong: OS << "ULL"; break; + case BuiltinType::Int128: + break; // no suffix. + case BuiltinType::UInt128: + break; // no suffix. } } 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>());