Skip to content

[clangd] Add llvm-formatv-string to TidyFastChecks#197829

Merged
kastiglione merged 1 commit into
llvm:mainfrom
kastiglione:clangd-Add-llvm-formatv-string-to-TidyFastChecks
May 16, 2026
Merged

[clangd] Add llvm-formatv-string to TidyFastChecks#197829
kastiglione merged 1 commit into
llvm:mainfrom
kastiglione:clangd-Add-llvm-formatv-string-to-TidyFastChecks

Conversation

@kastiglione
Copy link
Copy Markdown
Contributor

@kastiglione kastiglione commented May 14, 2026

Enables llvm-formatv-string (#195974) in clangd.

@llvmorg-github-actions
Copy link
Copy Markdown

llvmorg-github-actions Bot commented May 14, 2026

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clangd

Author: Dave Lee (kastiglione)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/197829.diff

1 Files Affected:

  • (modified) clang-tools-extra/clangd/TidyFastChecks.inc (+1)
diff --git a/clang-tools-extra/clangd/TidyFastChecks.inc b/clang-tools-extra/clangd/TidyFastChecks.inc
index e36ed8f383a0d..95a3390143b91 100644
--- a/clang-tools-extra/clangd/TidyFastChecks.inc
+++ b/clang-tools-extra/clangd/TidyFastChecks.inc
@@ -274,6 +274,7 @@ FAST(google-runtime-operator, 1.0)
 FAST(google-upgrade-googletest-case, 1.0)
 FAST(linuxkernel-must-check-errs, 0.0)
 FAST(llvm-else-after-return, 2.0)
+FAST(llvm-formatv-string, 2.0)
 FAST(llvm-header-guard, 0.0)
 FAST(llvm-include-order, -1.0)
 FAST(llvm-namespace-comment, 1.0)

@kastiglione
Copy link
Copy Markdown
Contributor Author

kastiglione commented May 14, 2026

I ran TidyFastChecks.py. In addition to adding this entry for llvm-formatv-string, it updated the values of many entries in TidyFastChecks.inc. Since my goal is to include this one new tidy check, I didn't want to update dozens and dozens of data points.

Copy link
Copy Markdown
Contributor

@ArcsinX ArcsinX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default TidyFastChecks.py runs checks on clang/lib/Sema/Sema.cpp file.
But we have no llvm::formatv calls there, this can be the reason why llvm-formatv-string is reported as a fast check.

Can you please check llvm-formatv-string performance on a relatively big file with several llvm::formatv calls? Maybe this one https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/Quality.cpp ?
You can use --source argument of TidyFastChecks.py script to do this.

@kastiglione
Copy link
Copy Markdown
Contributor Author

@ArcsinX I have run TidyFastChecks on Quality.cpp and generally get an output of 1%, sometimes 0%, and once it was 3%.

Copy link
Copy Markdown
Contributor

@ArcsinX ArcsinX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@kastiglione kastiglione merged commit f8fcded into llvm:main May 16, 2026
13 checks passed
@kastiglione kastiglione deleted the clangd-Add-llvm-formatv-string-to-TidyFastChecks branch May 16, 2026 14:09
pedroMVicente pushed a commit to pedroMVicente/llvm-project that referenced this pull request May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants