[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 03:30:28 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 2d4acb086541577ac6ab3a140b9ceb9659ce7094 e560fe2bf2d4bdc07a71682aa4d3a4bee8730b80 -- clang/unittests/Tooling/RecursiveASTVisitorTests/DeductionGuide.cpp clang/include/clang/AST/RecursiveASTVisitor.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/Tooling/RecursiveASTVisitorTests/DeductionGuide.cpp b/clang/unittests/Tooling/RecursiveASTVisitorTests/DeductionGuide.cpp
index abfdbaea4a..274f275ea6 100644
--- a/clang/unittests/Tooling/RecursiveASTVisitorTests/DeductionGuide.cpp
+++ b/clang/unittests/Tooling/RecursiveASTVisitorTests/DeductionGuide.cpp
@@ -22,17 +22,13 @@ public:
std::string Storage;
llvm::raw_string_ostream Stream(Storage);
D->print(Stream);
- Match(Stream.str(),D->getLocation());
+ Match(Stream.str(), D->getLocation());
return true;
}
- bool shouldVisitTemplateInstantiations() const {
- return false;
- }
+ bool shouldVisitTemplateInstantiations() const { return false; }
- bool shouldVisitImplicitCode() const {
- return ShouldVisitImplicitCode;
- }
+ bool shouldVisitImplicitCode() const { return ShouldVisitImplicitCode; }
bool ShouldVisitImplicitCode;
};
@@ -43,7 +39,7 @@ TEST(RecursiveASTVisitor, DeductionGuideNonImplicitMode) {
Visitor.ExpectMatch("Foo(T) -> Foo<int>", 11, 1);
Visitor.DisallowMatch("Bar(type-parameter-0-0) -> Foo<int>", 14, 1);
EXPECT_TRUE(Visitor.runOver(
- R"cpp(
+ R"cpp(
template <typename T>
concept False = true;
@@ -58,8 +54,8 @@ Foo(T) -> Foo<int>;
template <typename U>
using Bar = Foo<U>;
Bar s(1);
- )cpp"
- , DeductionGuideVisitor::Lang_CXX2a));
+ )cpp",
+ DeductionGuideVisitor::Lang_CXX2a));
}
TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) {
@@ -67,7 +63,7 @@ TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) {
Visitor.ExpectMatch("Foo(T) -> Foo<int>", 11, 1);
Visitor.ExpectMatch("Bar(type-parameter-0-0) -> Foo<int>", 14, 1);
EXPECT_TRUE(Visitor.runOver(
- R"cpp(
+ R"cpp(
template <typename T>
concept False = true;
@@ -82,8 +78,8 @@ Foo(T) -> Foo<int>;
template <typename U>
using Bar = Foo<U>;
Bar s(1);
- )cpp"
- , DeductionGuideVisitor::Lang_CXX2a));
+ )cpp",
+ DeductionGuideVisitor::Lang_CXX2a));
}
} // end anonymous namespace
``````````
</details>
https://github.com/llvm/llvm-project/pull/91454
More information about the cfe-commits
mailing list