[Lldb-commits] [clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 13 08:15:51 PST 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 7e01a322f850e86be9eefde8ae5a30e532d22cfa 66250572fc6a76ea7470028ad3529af8b8aef0b4 --extensions cpp -- clang/lib/AST/Expr.cpp clang/test/CodeGenCXX/debug-info-structured-binding.cpp clang/unittests/AST/ASTTraverserTest.cpp lldb/test/API/lang/cpp/structured-binding/main.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/AST/ASTTraverserTest.cpp b/clang/unittests/AST/ASTTraverserTest.cpp
index f3128d4a75..9444d6ba5a 100644
--- a/clang/unittests/AST/ASTTraverserTest.cpp
+++ b/clang/unittests/AST/ASTTraverserTest.cpp
@@ -1604,14 +1604,16 @@ DecompositionDecl ''
{
auto FN = ast_matchers::match(
- functionDecl(hasName("decompTuple"), hasDescendant(callExpr(hasAncestor(varDecl(hasName("a"),
- hasAncestor(bindingDecl())))).bind("decomp_call"))),
+ functionDecl(hasName("decompTuple"),
+ hasDescendant(callExpr(hasAncestor(varDecl(
+ hasName("a"),
+ hasAncestor(bindingDecl()))))
+ .bind("decomp_call"))),
AST2->getASTContext());
EXPECT_EQ(FN.size(), 1u);
- EXPECT_EQ(
- dumpASTString(TK_AsIs, FN[0].getNodeAs<CallExpr>("decomp_call")),
- R"cpp(
+ EXPECT_EQ(dumpASTString(TK_AsIs, FN[0].getNodeAs<CallExpr>("decomp_call")),
+ R"cpp(
CallExpr
|-ImplicitCastExpr
| `-DeclRefExpr 'get'
@@ -1628,8 +1630,11 @@ DeclRefExpr ''
{
auto FN = ast_matchers::match(
- functionDecl(hasName("decompTuple"), hasDescendant(callExpr(hasAncestor(varDecl(hasName("c"),
- hasAncestor(bindingDecl())))).bind("decomp_call_with_default"))),
+ functionDecl(hasName("decompTuple"),
+ hasDescendant(callExpr(hasAncestor(varDecl(
+ hasName("c"),
+ hasAncestor(bindingDecl()))))
+ .bind("decomp_call_with_default"))),
AST2->getASTContext());
EXPECT_EQ(FN.size(), 1u);
@@ -1645,9 +1650,10 @@ CallExpr
`-IntegerLiteral
)cpp");
- EXPECT_EQ(dumpASTString(TK_IgnoreUnlessSpelledInSource,
- FN[0].getNodeAs<CallExpr>("decomp_call_with_default")),
- R"cpp(
+ EXPECT_EQ(
+ dumpASTString(TK_IgnoreUnlessSpelledInSource,
+ FN[0].getNodeAs<CallExpr>("decomp_call_with_default")),
+ R"cpp(
DeclRefExpr ''
)cpp");
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/122265
More information about the lldb-commits
mailing list