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 h,cpp -- 
clang-tools-extra/clangd/ClangdLSPServer.cpp 
clang-tools-extra/clangd/ClangdLSPServer.h 
clang-tools-extra/clangd/ConfigProvider.cpp 
clang-tools-extra/clangd/ConfigProvider.h 
clang-tools-extra/clangd/fuzzer/clangd-fuzzer.cpp 
clang-tools-extra/clangd/indexer/IndexerMain.cpp 
clang-tools-extra/clangd/tool/Check.cpp 
clang-tools-extra/clangd/tool/ClangdMain.cpp 
clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp 
clang-tools-extra/clangd/unittests/ConfigProviderTests.cpp 
--diff_from_common_commit
``````````

: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-tools-extra/clangd/ConfigProvider.h 
b/clang-tools-extra/clangd/ConfigProvider.h
index ccd2ed6ec..2a965cd8f 100644
--- a/clang-tools-extra/clangd/ConfigProvider.h
+++ b/clang-tools-extra/clangd/ConfigProvider.h
@@ -83,7 +83,7 @@ public:
   /// A provider that includes fragments from all the supplied providers.
   /// Order is preserved; later providers take precedence over earlier ones.
   static std::unique_ptr<Provider>
-  combine(std::vector<std::unique_ptr<Provider>>);
+      combine(std::vector<std::unique_ptr<Provider>>);
 
   /// Returns providers for the configuration files that clangd tools read by
   /// default: project config (ancestor `.clangd` files) and the user's
diff --git a/clang-tools-extra/clangd/indexer/IndexerMain.cpp 
b/clang-tools-extra/clangd/indexer/IndexerMain.cpp
index 4fd86f871..2bc4bfaf8 100644
--- a/clang-tools-extra/clangd/indexer/IndexerMain.cpp
+++ b/clang-tools-extra/clangd/indexer/IndexerMain.cpp
@@ -224,14 +224,15 @@ int main(int argc, const char **argv) {
           [Mangler = std::move(Mangler),
            ContextProvider = std::move(ContextProvider)](
               const std::vector<std::string> &Args, llvm::StringRef File) {
-            // Issue: If File is relative, it's relative to the compile 
command's
-            // "directory", not our CWD, but ToolExecutor doesn't expose
-            // "directory" here, so make_absolute can resolve it wrong and
-            // miss the .clangd file. See 
indexer-clangd-config-relative-path.test.
+            // Issue: If File is relative, it's relative to the compile
+            // command's "directory", not our CWD, but ToolExecutor doesn't
+            // expose "directory" here, so make_absolute can resolve it wrong
+            // and miss the .clangd file. See
+            // indexer-clangd-config-relative-path.test.
             llvm::SmallString<256> AbsFile(File);
             llvm::sys::fs::make_absolute(AbsFile);
-            // Issue: WithCfg only lives for this ArgumentsAdjuster call, so 
it's
-            // visible to Mangler below but not to the parse that follows.
+            // Issue: WithCfg only lives for this ArgumentsAdjuster call, so
+            // it's visible to Mangler below but not to the parse that follows.
             // That's harmless today since clangd-indexer doesn't consult
             // config during the parse, but a real fix would need libTooling
             // changes to keep the context alive for the whole invocation.

``````````

</details>


https://github.com/llvm/llvm-project/pull/214951
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to