[clang-tools-extra] [clangd] Expand response files before CDB interpolation (PR #75753)

via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 17 14:42:56 PST 2023


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 a418be96de7872f6058207c695ef4698cb1dbb93 957951483dab19b0982a5dbe7d5370bd9061d931 -- clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
index 03ac1aa132..658efb619d 100644
--- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
+++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
@@ -249,11 +249,11 @@ parseJSON(PathRef Path, llvm::StringRef Data, std::string &Error) {
     // thread-safety guarantees, as the access to FS is not locked!
     // For now, use the real FS, which is known to be threadsafe (if we don't
     // use/change working directory, which ExpandResponseFilesDatabase doesn't).
-    // NOTE: response files have to be expanded before inference because inference
-    // needs full command line to check/fix driver mode and file type.
+    // NOTE: response files have to be expanded before inference because
+    // inference needs full command line to check/fix driver mode and file type.
     auto FS = llvm::vfs::getRealFileSystem();
     return tooling::inferMissingCompileCommands(
-            expandResponseFiles(std::move(CDB), std::move(FS)));
+        expandResponseFiles(std::move(CDB), std::move(FS)));
   }
   return nullptr;
 }

``````````

</details>


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


More information about the cfe-commits mailing list