[llvm-branch-commits] [clang-tools-extra] [flang] [libc] [llvm] [clang] [compiler-rt] [NFC, Clangd] Refactor Check to have more explicit cli args. (PR #75867)

Andres Villegas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 20 10:11:27 PST 2023


https://github.com/avillega updated https://github.com/llvm/llvm-project/pull/75867

>From e31560e8462108869f80b39dfd186efcf45a77f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9s=20Villegas?= <andresvi at google.com>
Date: Mon, 18 Dec 2023 22:56:01 +0000
Subject: [PATCH] Run git clang-format

Created using spr 1.3.5
---
 clang-tools-extra/clangd/tool/Check.cpp      | 6 +++---
 clang-tools-extra/clangd/tool/ClangdMain.cpp | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/clang-tools-extra/clangd/tool/Check.cpp b/clang-tools-extra/clangd/tool/Check.cpp
index 7c04a2f16e5a30..5e9d8d53625b68 100644
--- a/clang-tools-extra/clangd/tool/Check.cpp
+++ b/clang-tools-extra/clangd/tool/Check.cpp
@@ -133,7 +133,8 @@ class Checker {
   // Number of non-fatal errors seen.
   unsigned ErrCount = 0;
 
-  Checker(llvm::StringRef File, const ClangdLSPServer::Options &Opts, const ClangdCheckOptions &CheckOpts)
+  Checker(llvm::StringRef File, const ClangdLSPServer::Options &Opts,
+          const ClangdCheckOptions &CheckOpts)
       : File(File), Opts(Opts), CheckOpts(CheckOpts) {}
 
   // Read compilation database and choose a compile command for the file.
@@ -473,8 +474,7 @@ bool check(llvm::StringRef File, const ThreadsafeFS &TFS,
     }
 
   public:
-    OverrideConfigProvider(bool CheckTidyTime)
-        : CheckTidyTime(CheckTidyTime) {}
+    OverrideConfigProvider(bool CheckTidyTime) : CheckTidyTime(CheckTidyTime) {}
 
   } OverrideConfig{CheckOpts.CheckTidyTime.has_value()};
 
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index 34a227b2dbb286..3b08e023236dc1 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -573,8 +573,7 @@ llvm::cl::opt<bool> CheckCompletion{
     llvm::cl::desc("Run code-completion at each point (slow)"),
     llvm::cl::init(false)};
 llvm::cl::opt<bool> CheckWarnings{
-    "check-warnings",
-    llvm::cl::desc("Print warnings as well as errors"),
+    "check-warnings", llvm::cl::desc("Print warnings as well as errors"),
     llvm::cl::init(false)};
 
 /// Supports a test URI scheme with relaxed constraints for lit tests.
@@ -1002,7 +1001,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
 
     ClangdCheckOptions CheckOpts;
     if (CheckTidyTime.getNumOccurrences())
-        CheckOpts.CheckTidyTime= std::make_optional(CheckTidyTime.ValueStr);
+      CheckOpts.CheckTidyTime = std::make_optional(CheckTidyTime.ValueStr);
 
     CheckOpts.CheckFileLines = CheckFileLines;
     CheckOpts.CheckCompletion = CheckCompletion;



More information about the llvm-branch-commits mailing list