[clang] Fix printing of templated records. (PR #86339)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 13:59:56 PDT 2024


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 3b3de48fd84b8269d5f45ee0a9dc6b7448368424 ab7d280abf053b67b716e0723e2e70876e639810 -- clang/lib/AST/TypePrinter.cpp clang/unittests/AST/DeclPrinterTest.cpp
``````````

</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 f0e360f9ca..a7d8212249 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1390,20 +1390,18 @@ TEST(DeclPrinter, TestCXXRecordDecl17) {
   ASSERT_TRUE(PrintedDeclCXX98Matches("template<typename T> struct Z {};"
                                       "struct X {};"
                                       "Z<X> A;",
-                                      "A",
-                                      "Z<X> A"));
+                                      "A", "Z<X> A"));
   [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
   ASSERT_TRUE(PrintedDeclCXX98Matches("template<typename T> struct Z {};"
                                       "struct X {};"
-                                      "Z<X> A;" 
+                                      "Z<X> A;"
                                       "template <typename T1, int>"
                                       "struct Y{};"
                                       "Y<Z<X>, 2> B;",
-                                      "B", 
-                                      "Y<Z<X>, 2> B"));
+                                      "B", "Y<Z<X>, 2> B"));
   [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/86339


More information about the cfe-commits mailing list