head 1.3; access; symbols pkgsrc-2021Q2:1.2.0.18 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.16 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.14 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.12 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.10 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.6 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.8 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.4 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.2 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.1.0.2 pkgsrc-2019Q1-base:1.1; locks; strict; comment @# @; 1.3 date 2021.07.12.18.45.07; author adam; state dead; branches; next 1.2; commitid LYPmKItCjBWuhJ0D; 1.2 date 2019.06.02.08.41.18; author adam; state Exp; branches; next 1.1; commitid zbwWBLIEOZZsIApB; 1.1 date 2019.03.27.06.24.22; author adam; state Exp; branches; next ; commitid H2HEMKXYprYs7YgB; desc @@ 1.3 log @clang-tools-extra: updated to 12.0.1 Improvements to clangd Performance clangd’s memory usage is significantly reduced on most Linux systems. In particular, memory usage should not increase dramatically over time. The standard allocator on most systems is glibc’s ptmalloc2, and it creates disproportionately large heaps when handling clangd’s allocation patterns. By default, clangd will now periodically call malloc_trim to release free pages on glibc systems. Users of other allocators (such as jemalloc or tcmalloc) on glibc systems can disable this using --malloc_trim=0 or the CMake flag -DCLANGD_MALLOC_TRIM=0. Added the $/memoryUsage request: an LSP extension. This provides a breakdown of the memory clangd thinks it is using (excluding malloc overhead etc). The clangd VSCode extension supports showing the memory usage tree. Parsing and selection Improved navigation of broken code in C using Recovery AST. (This has been enabled for C++ since clangd 11). Types are understood more often in broken code. (This is the first release where Recovery AST preserves speculated types). Heuristic resolution for dependent names in templates. Code completion Higher priority for symbols that were already used in this file, and symbols from namespaces mentioned in this file. (Estimated 3% accuracy improvement) Introduced a ranking algorithm trained on snippets from a large C++ codebase. Use the flag --ranking-model=decision_forest to try this (Estimated 6% accuracy improvement). This mode is likely to become the default in future. Note: this is a generic model, not specialized for your code. clangd does not collect any data from your code to train code completion. Signature help works with functions with template-dependent parameter types. Go to definition Selecting an auto or decltype keyword will attempt to navigate to a definition of the deduced type. Improved handling of aliases: navigate to the underlying entity more often. Better understanding of declaration vs definition for Objective-C classes and protocols. Selecting a pure-virtual method shows its overrides. Find references Indexes are smarter about not returning stale references when code is deleted. References in implementation files are always indexed, so results should be more complete. Find-references on a virtual method shows references to overridden methods. New navigation features Call hierarchy (textDocument/callHierarchy) is supported. Only incoming calls are available. Go to implementation (textDocument/implementation) is supported on abstract classes, and on virtual methods. Symbol search (workspace/symbol) queries may be partially qualified. That is, typing b::Foo will match the symbol a::b::c::Foo. Refactoring New refactoring: populate switch statement with cases. (This acts as a fix for the -Wswitch-enum warning). Renaming templates is supported, and many other complex cases were fixed. Attempting to rename to an invalid or conflicting name can produce an error message rather than broken code. (Not all cases are detected!) The accuracy of many code actions has been improved. Hover Hovers for auto and decltype show the type in the same style as other hovers. this is also now supported. Displayed type names are more consistent and idiomatic. Semantic highlighting Inactive preprocessor regions (#ifdef) are highlighted as comments. clangd 12 is the last release with support for the non-standard textDocument/semanticHighlights notification. Clients sholud migrate to the textDocument/semanticTokens request added in LSP 3.16. Remote index (alpha) clangd can now connect to a remote index server instead of building a project index locally. This saves resources in large codebases that are slow to index. The server program is clangd-index-server, and it consumes index files produced by clangd-indexer. This feature requires clangd to be built with the CMake flag -DCLANGD_ENABLE_REMOTE=On, which requires GRPC libraries and is not enabled by default. Unofficial releases of the remote-index-enabled client and server tools are at https://github.com/clangd/clangd/releases Large projects can deploy a shared server, and check in a .clangd file to enable it (in the Index.External section). We hope to provide such a server for llvm-project itself in the near future. Configuration Static and remote indexes can be configured in the Index.External section. Different static indexes can now be used for different files. (Obsoletes the flag --index-file). Diagnostics can be filtered or suppressed in the Diagnostics section. Clang-tidy checks can be enabled/disabled in the Diagnostics.ClangTidy section. (Obsoletes the flag --clang-tidy-checks). The compilation database directory can be configured in the CompileFlags section. Different compilation databases can now be specified for different files. (Obsoletes the flag --compile-commands-dir). Errors in loaded configuration files are published as LSP diagnostics, and so should be shown in your editor. Full reference of configuration options System integration Changes to compile_commands.json and compile_flags.txt will take effect the next time a file is parsed, without restarting clangd. clangd --check= can be run on the command-line to simulate opening a file without actually using an editor. This can be useful to reproduce crashes or aother problems. Various fixes to handle filenames correctly (and case-insensitively) on windows. If incoming LSP messages are malformed, the logs now contain details. Miscellaneous “Show AST” request (textDocument/ast) added as an LSP extension. This displays a simplified view of the clang AST for selected code. The clangd VSCode extension supports this. clangd should no longer crash while loading old or corrupt index files. The flags --index, --recovery-ast and -suggest-missing-includes have been retired. These features are now always enabled. Too many stability and correctness fixes to mention. @ text @$NetBSD: patch-tools_extra_clangd_CMakeLists.txt,v 1.2 2019/06/02 08:41:18 adam Exp $ Do not look for libatomic. --- tools/extra/clangd/CMakeLists.txt.orig 2019-01-16 00:24:22.000000000 +0000 +++ tools/extra/clangd/CMakeLists.txt @@@@ -16,9 +16,6 @@@@ if(CLANG_BUILT_STANDALONE) endif() set(CLANGD_ATOMIC_LIB "") -if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) - list(APPEND CLANGD_ATOMIC_LIB "atomic") -endif() add_clang_library(clangDaemon AST.cpp @ 1.2 log @clang-tools-extra: updated to 8.0.0 Clang Tools 8.0.0: Improvements to clangd clangd now adds namespace qualifiers in code completion, for example, if you type “vec”, the list of completions will include “std::vector”. When a global index is available, clangd will use it to augment the results of “go to definition” and “find references” queries. Global index also enables global code completion, which suggests symbols that are not imported in the current file and automatically inserts the missing #include directives. clangd stores the symbol index on disk in a new compact binary serialization format. It is 10x more compact than YAML and 40% more compact than gzipped YAML. clangd has a new efficient symbol index suitable for complex and fuzzy queries and large code bases (e.g., LLVM, Chromium). This index is used for code completion, go to definition, and cross-references. The architecture of the index allows for complex and fuzzy retrieval criteria and sophisticated scoring. clangd has a new LSP extension that communicates information about activity on clangd’s per-file worker thread. This information can be displayed to users to let them know that the language server is busy with something. For example, in clangd, building the AST blocks many other operations. clangd has a new LSP extension that allows the client to supply the compilation commands over LSP, instead of finding compile_commands.json on disk. clangd has a new LSP extension that allows the client to request fixes to be sent together with diagnostics, instead of asynchronously. clangd has a new LSP extension that allows the client to resolve a symbol in a light-weight manner, without retrieving further information (like definition location, which may require consulting an index). Improvements to clang-query A new command line parameter --preload was added to run commands from a file and then start the interactive interpreter. The command q can was added as an alias for quit to exit the clang-query interpreter. It is now possible to bind to named values (the result of let expressions). It is now possible to write comments in clang-query code. This is primarily useful when using script-mode. Comments are all content following the # character on a line. The new set print-matcher true command now causes clang-query to print the evaluated matcher together with the resulting bindings. A new output mode detailed-ast was added to clang-query. The existing dump output mode is now a deprecated alias for detailed-ast Output modes can now be enabled or disabled non-exclusively. Improvements to clang-tidy New abseil-duration-comparison check. Checks for comparisons which should be done in the absl::Duration domain instead of the float of integer domains. New abseil-duration-division check. Checks for uses of absl::Duration division that is done in a floating-point context, and recommends the use of a function that returns a floating-point value. New abseil-duration-factory-float check. Checks for cases where the floating-point overloads of various absl::Duration factory functions are called when the more-efficient integer versions could be used instead. New abseil-duration-factory-scale check. Checks for cases where arguments to absl::Duration factory functions are scaled internally and could be changed to a different factory function. New abseil-duration-subtraction check. Checks for cases where subtraction should be performed in the absl::Duration domain. New abseil-faster-strsplit-delimiter check. Finds instances of absl::StrSplit() or absl::MaxSplits() where the delimiter is a single character string literal and replaces with a character. New abseil-no-internal-dependencies check. Gives a warning if code using Abseil depends on internal details. New abseil-no-namespace check. Ensures code does not open namespace absl as that violates Abseil’s compatibility guidelines. New abseil-redundant-strcat-calls check. Suggests removal of unnecessary calls to absl::StrCat when the result is being passed to another absl::StrCat or absl::StrAppend. New abseil-str-cat-append check. Flags uses of absl::StrCat() to append to a std::string. Suggests absl::StrAppend() should be used instead. New abseil-upgrade-duration-conversions check. Finds calls to absl::Duration arithmetic operators and factories whose argument needs an explicit cast to continue compiling after upcoming API changes. New bugprone-too-small-loop-variable check. Detects those for loops that have a loop variable with a “too small” type which means this type can’t represent all values which are part of the iteration range. New cppcoreguidelines-macro-usage check. Finds macro usage that is considered problematic because better language constructs exist for the task. New google-objc-function-naming check. Checks that function names in function declarations comply with the naming conventions described in the Google Objective-C Style Guide. New misc-non-private-member-variables-in-classes check. Finds classes that not only contain the data (non-static member variables), but also have logic (non-static member functions), and diagnoses all member variables that have any other scope other than private. New modernize-avoid-c-arrays check. Finds C-style array types and recommend to use std::array<> / std::vector<>. New modernize-concat-nested-namespaces check. Checks for uses of nested namespaces in the form of namespace a { namespace b { ... }} and offers change to syntax introduced in C++17 standard: namespace a::b { ... }. New modernize-deprecated-ios-base-aliases check. Detects usage of the deprecated member types of std::ios_base and replaces those that have a non-deprecated equivalent. New modernize-use-nodiscard check. Adds [[nodiscard]] attributes (introduced in C++17) to member functions to highlight at compile time which return values should not be ignored. New readability-const-return-type check. Checks for functions with a const-qualified return type and recommends removal of the const keyword. New readability-isolate-decl check. Detects local variable declarations declaring more than one variable and tries to refactor the code to one statement per declaration. New readability-magic-numbers check. Detects usage of magic numbers, numbers that are used as literals instead of introduced via constants or symbols. New readability-redundant-preprocessor check. Finds potentially redundant preprocessor directives. New readability-uppercase-literal-suffix check. Detects when the integral literal or floating point literal has non-uppercase suffix, and suggests to make the suffix uppercase. The list of destination suffixes can be optionally provided. New alias cert-dcl16-c to readability-uppercase-literal-suffix added. New alias cppcoreguidelines-avoid-c-arrays to modernize-avoid-c-arrays added. New alias cppcoreguidelines-non-private-member-variables-in-classes to misc-non-private-member-variables-in-classes added. New alias hicpp-avoid-c-arrays to modernize-avoid-c-arrays added. New alias hicpp-uppercase-literal-suffix to readability-uppercase-literal-suffix added. The cppcoreguidelines-narrowing-conversions check now detects more narrowing conversions: - integer to narrower signed integer (this is compiler implementation defined), - integer - floating point narrowing conversions, - floating point - integer narrowing conversions, - constants with narrowing conversions (even in ternary operator). The objc-property-declaration check now ignores the Acronyms and IncludeDefaultAcronyms options. The readability-redundant-smartptr-get check does not warn about calls inside macros anymore by default. The readability-uppercase-literal-suffix check does not warn about literal suffixes inside macros anymore by default. @ text @d1 1 a1 1 $NetBSD: patch-tools_extra_clangd_CMakeLists.txt,v 1.1 2019/03/27 06:24:22 adam Exp $ @ 1.1 log @clang-tools-extra: added version 7.0.1 Extra tools built using Clang's tooling APIs. @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- tools/extra/clangd/CMakeLists.txt.orig 2019-03-25 08:39:03.000000000 +0000 d7 2 a8 2 @@@@ -3,9 +3,6 @@@@ set(LLVM_LINK_COMPONENTS ) @