davidstone created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82880 Files: clang/lib/AST/StmtPrinter.cpp clang/test/AST/ast-print-int128.cpp Index: clang/test/AST/ast-print-int128.cpp =================================================================== --- /dev/null +++ clang/test/AST/ast-print-int128.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -ast-print -std=c++20 %s -o - | FileCheck %s + +template <bool> +struct enable_if { +}; + +template <__uint128_t x, typename = typename enable_if<x != 0>::type> +void f(); + +template <__int128_t> +void f(); + +using T = decltype(f<0>()); + +// CHECK: using T = decltype(f<0>()); Index: clang/lib/AST/StmtPrinter.cpp =================================================================== --- clang/lib/AST/StmtPrinter.cpp +++ 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; } }
Index: clang/test/AST/ast-print-int128.cpp =================================================================== --- /dev/null +++ clang/test/AST/ast-print-int128.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -ast-print -std=c++20 %s -o - | FileCheck %s + +template <bool> +struct enable_if { +}; + +template <__uint128_t x, typename = typename enable_if<x != 0>::type> +void f(); + +template <__int128_t> +void f(); + +using T = decltype(f<0>()); + +// CHECK: using T = decltype(f<0>()); Index: clang/lib/AST/StmtPrinter.cpp =================================================================== --- clang/lib/AST/StmtPrinter.cpp +++ 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; } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits