[clang-tools-extra] [compiler-rt] Added support for the .yml file extension (PR #79899)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 13:17:31 PST 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 0175a1e4d33720ed7e827b3db5a36f88bdd790a3 97d0f4597caed05c6ad2d56553591976576788f6 -- clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp compiler-rt/lib/hwasan/hwasan_report.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
index 2938973702..a7924367a4 100644
--- a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
+++ b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
@@ -40,7 +40,8 @@ namespace replace {
namespace detail {
-static constexpr std::array<StringRef, 3> AllowedExtensions = {".yaml", ".yml", ""};
+static constexpr std::array<StringRef, 3> AllowedExtensions = {".yaml", ".yml",
+ ""};
template <typename TranslationUnits>
static std::error_code collectReplacementsFromDirectory(
@@ -59,9 +60,9 @@ static std::error_code collectReplacementsFromDirectory(
continue;
}
- if (!is_contained(AllowedExtensions, extension(I->path())))
+ if (!is_contained(AllowedExtensions, extension(I->path())))
continue;
-
+
TUFiles.push_back(I->path());
ErrorOr<std::unique_ptr<MemoryBuffer>> Out =
@@ -272,4 +273,4 @@ bool deleteReplacementFiles(const TUReplacementFiles &Files,
} // end namespace replace
} // end namespace clang
-//
\ No newline at end of file
+ //
\ No newline at end of file
diff --git a/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp b/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp
index 016257e98f..9aa3806001 100644
--- a/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp
+++ b/clang-tools-extra/clangd/unittests/tweaks/AddUsingTests.cpp
@@ -44,7 +44,7 @@ public:
};
}
})cpp";
-EXPECT_AVAILABLE(Header + "void fun() { o^n^e^:^:^t^w^o^:^:^f^f(); }");
+ EXPECT_AVAILABLE(Header + "void fun() { o^n^e^:^:^t^w^o^:^:^f^f(); }");
EXPECT_AVAILABLE(Header + "void fun() { o^n^e^::^o^o(); }");
EXPECT_AVAILABLE(Header + "void fun() { o^n^e^:^:^t^w^o^:^:^e^e E; }");
EXPECT_AVAILABLE(Header + "void fun() { o^n^e^:^:^t^w^o:^:^c^c C; }");
@@ -292,7 +292,7 @@ void foo::fun() {
})cpp"},
// Inside a lambda.
{
- R"cpp(
+ R"cpp(
namespace NS {
void unrelated();
void foo();
@@ -302,7 +302,7 @@ auto L = [] {
using NS::unrelated;
NS::f^oo();
};)cpp",
- R"cpp(
+ R"cpp(
namespace NS {
void unrelated();
void foo();
@@ -312,7 +312,7 @@ auto L = [] {
using NS::foo;using NS::unrelated;
foo();
};)cpp",
-},
+ },
// If all other using are fully qualified, add ::
{R"cpp(
#include "test.hpp"
``````````
</details>
https://github.com/llvm/llvm-project/pull/79899
More information about the llvm-commits
mailing list