llvm-project/clang-tools-extra
Adam Czachorowski 55a79318c6 [clang][clangd] Improve signature help for variadic functions.
This covers both C-style variadic functions and template variadic w/
parameter packs.

Previously we would return no signatures when working with template
variadic functions once activeParameter reached the position of the
parameter pack (except when it was the only param, then we'd still
show it when no arguments were given). With this commit, we now show
signathure help correctly.

Additionally, this commit fixes the activeParameter value in LSP output
of clangd in the presence of variadic functions (both kinds). LSP does
not allow the activeParamter to be higher than the number of parameters
in the active signature. With "..." or parameter pack being just one
argument, for all but first argument passed to "..." we'd report
incorrect activeParameter value. Clients such as VSCode would then treat
it as 0, as suggested in the spec) and highlight the wrong parameter.

In the future, we should add support for per-signature activeParamter
value, which exists in LSP since 3.16.0. This is not part of this
commit.

Differential Revision: https://reviews.llvm.org/D111318
2021-11-18 15:50:47 +01:00
..
clang-apply-replacements [clang-apply-replacements] Correctly handle relative paths 2021-11-11 18:28:43 +00:00
clang-change-namespace Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
clang-doc [clang-doc] Pass Record argument by const-ref. NFCI. 2021-09-24 10:06:13 +01:00
clang-include-fixer Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
clang-move [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
clang-query [clang-query] Add check to prevent setting srcloc when no introspection is available. 2021-04-28 11:21:35 +01:00
clang-reorder-fields [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-tidy [clangd] Fix assertion crashes on unmatched NOLINTBEGIN comments. 2021-11-17 15:31:38 +01:00
clangd [clang][clangd] Improve signature help for variadic functions. 2021-11-18 15:50:47 +01:00
docs [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
modularize Use StringRef::contains (NFC) 2021-10-23 20:41:46 -07:00
pp-trace [clang] Let PPCallbacks::PragmaWarning() pass specifier as enum instead of string 2021-09-28 19:47:27 -04:00
test Fix false positive in `bugprone-throw-keyword-missing` check 2021-11-16 07:09:17 -05:00
tool-template [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
unittests [clang-tidy] Fix llvm-header-guard so that it works with Windows paths 2021-11-10 18:35:57 +13:00
.gitignore
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
CODE_OWNERS.TXT [clangd] add CODE_OWNERS 2020-01-29 12:43:19 +01:00
LICENSE.TXT
README.txt

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/