[clang] [clang][AST] Pretty-print default template template args (PR #162134)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 12:13:57 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions c,cpp -- clang/lib/AST/DeclPrinter.cpp clang/test/AST/ast-print-record-decl.c clang/unittests/AST/DeclPrinterTest.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp
index 2d415c46f..518d96ddf 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1087,10 +1087,10 @@ TEST(DeclPrinter, TestClassTemplateDecl8) {
TEST(DeclPrinter, TestClassTemplateDecl9) {
ASSERT_TRUE(PrintedDeclCXX98Matches(
- "template<typename T> struct Z { };"
- "template<template<typename U> class T = Z> struct A { };",
- classTemplateDecl(hasName("A")).bind("id"),
- "template <template <typename U> class T = Z> struct A {}"));
+ "template<typename T> struct Z { };"
+ "template<template<typename U> class T = Z> struct A { };",
+ classTemplateDecl(hasName("A")).bind("id"),
+ "template <template <typename U> class T = Z> struct A {}"));
}
TEST(DeclPrinter, TestClassTemplateDecl10) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/162134
More information about the cfe-commits
mailing list