diff --git a/doc/qtcreator/images/qtcreator-clang-code-model-build-settings.png b/doc/qtcreator/images/qtcreator-clang-code-model-build-settings.png deleted file mode 100644 index c3a0c6b6306..00000000000 Binary files a/doc/qtcreator/images/qtcreator-clang-code-model-build-settings.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-clang-code-model-options.png b/doc/qtcreator/images/qtcreator-clang-code-model-options.png index db3d99af6ad..126f393c5d2 100644 Binary files a/doc/qtcreator/images/qtcreator-clang-code-model-options.png and b/doc/qtcreator/images/qtcreator-clang-code-model-options.png differ diff --git a/doc/qtcreator/images/qtcreator-diagnostics-configuration.png b/doc/qtcreator/images/qtcreator-diagnostics-configuration.png deleted file mode 100644 index 0a1e5341e75..00000000000 Binary files a/doc/qtcreator/images/qtcreator-diagnostics-configuration.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-options-clangd.png b/doc/qtcreator/images/qtcreator-options-clangd.png index ef955f4563d..b03a9e4d70d 100644 Binary files a/doc/qtcreator/images/qtcreator-options-clangd.png and b/doc/qtcreator/images/qtcreator-options-clangd.png differ diff --git a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc index d6f5709c372..1f56c8383e7 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc @@ -65,7 +65,7 @@ \endlist \QC comes with a plugin that provides some of these services - for C++ on top of \l{http://clang.llvm.org/}{Clang}. + for C++ on top of \l{https://clangd.llvm.org/}{Clangd}. \section1 About the Clang Code Model @@ -75,6 +75,8 @@ set or a close approximation, as when using the built-in \QC code model. Clang focuses on detailed information for diagnostics, which is really useful if the code contains typos, for example. + We make use of these libraries via the clangd tool, which implements + an \l{https://microsoft.github.io/language-server-protocol/}{LSP} server. Clang keeps up with the development of the C++ language. At the time of this writing, it supports C++98/03, C++11, C++14, C++17, C89, C99, Objective-C, @@ -98,14 +100,16 @@ \li \l{Using Clang Tools}{Diagnostics} \li Outline of symbols \li Tooltips - \li Renaming of local symbols + \li Following symbols + \li Renaming symbols + \li Finding occurrences of symbols \endlist - To use the built-in code model instead, select \uicontrol Help > - \uicontrol {About Plugins} > \uicontrol C++, and deselect the - \uicontrol ClangCodeModel check box. Select \uicontrol {Restart Now} - to restart \QC and have the changes take effect. + To use the built-in code model instead, select \uicontrol Tools > \uicontrol Options > + \uicontrol C++ > \uicontrol clangd, and deselect the \uicontrol {Use clangd} check box. + This setting also exists on the project level, so that you can have the clang-based + services generally enabled, but switch them off for for certain projects, or vice versa. You can configure Clang diagnostics either globally or separately for: @@ -138,13 +142,6 @@ edit the value for the \uicontrol {Do not index files greater than} check box. To index all files, deselect the check box. - \li The \uicontrol {Diagnostic Configuration} field shows the Clang - checks to perform. Click the value of the field to open the - \uicontrol {Diagnostic Configurations} dialog, where you can - select and edit the checks to perform. - - \image qtcreator-diagnostics-configuration.png - \endlist \section1 Configuring clangd @@ -179,6 +176,10 @@ \li In \uicontrol {Document update threshold}, specify the amount of time \QC waits before sending document changes to the server. If the document changes again while waiting, this timeout is reset. + \li The \uicontrol {Diagnostic Configuration} field shows the Clang + checks to perform. Click the value of the field to open the + \uicontrol {Diagnostic Configurations} dialog, where you can + select and edit the checks to perform. \endlist \section1 Clang Checks @@ -203,16 +204,7 @@ \section1 Specifying Clang Code Model Settings at Project Level You can specify Clang code model settings at project level by selecting - \uicontrol Projects > \uicontrol {Clang Code Model}. - - In addition to configuring the diagnostics, - you can select the \uicontrol {Enable MSVC-compliant template parsing} check - box to parse templates in a MSVC-compliant way. This enables Clang to parse - headers for example from Active Template Library (ATL) or Windows Runtime - Library (WRL). However, using the relaxed and extended rules means that no - highlighting or completion can be provided within template functions. - - \image qtcreator-clang-code-model-build-settings.png + \uicontrol Projects > \uicontrol {clangd}. \include creator-compilation-database.qdocinc using compilation databases diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc index 935c52d8947..4ebf5556eee 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc @@ -112,15 +112,15 @@ \li \l{Using Custom Output Parsers}{Custom Output Parsers} - \li \l{Parsing C++ Files with the Clang Code Model} - {Clang Code Model} - \li \l{Applying Refactoring Actions}{Quick Fixes} \li \l{Using Clang Tools}{Clang Tools} \li \l{To-Do Entries}{To-Do} (experimental) + \li \l{Parsing C++ Files with the Clang Code Model} + {Clangd} + \endlist If you have multiple projects open in \QC, select the project to configure