This makes sure that the lsp filter gets enabled if a document is opened
before the corresponding clangd server was initialized. This happens
when loading a session with an open document.
Change-Id: I7987ea60c6fca8b5c070af3a7bcd5325667ed0c5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If an AST node contains no file info, then we must use the one of the
parent node, in order not to create highlighting results for tokens from
other files.
Fixes: QTCREATORBUG-27384
Change-Id: I7c6f0c06063df9ce76feef333907d9d4f07a38e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... in output argument highlighting.
If there is not enough information for clang to determine the const-ness
of the argument passing (as it can happen in templates), do not report
an output argument.
Change-Id: I8d0143042f02ac44d8d971398014828cff14697f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
We need to relax the range check: In expressions such as x.y->z, the
second argument for the operator->call is x.y, not just y.
Fixes: QTCREATORBUG-27352
Change-Id: Ida542c11c129630f0a1d301508ec5f8076eb9902
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... in completions. Apparently, clangd uses the LSP type "property" for
static members.
Task-number: QTCREATORBUG-27289
Change-Id: Ib296dbade6b2e7c38a761b27b2c024ea98a89523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
By setting QT_LOGGING_RULES=qtc.clangcodemodel.clangd.timing=true I can get
values like:
qtc.clangcodemodel.clangd.timing: highlighting: Start to end: 2953 ms
qtc.clangcodemodel.clangd.timing: ClangdCompletionAssistProcessor took: 7343 ms
The first tells you how long Creator took to turn clangd's semantic tokens into
full highlighting info, and the second how long it took for Ctrl+Space.
Change-Id: I99bd04c2889bb7da98c04537eab06d6ed6117167
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Unknown compiler flags are an unsuppressable error in clang.
But we do not want to maintain a blacklist of unsupported GCC and MSVC
options or a whitelist of supported clang options, as both would
constantly go out of date.
As clangd seems to work fine despite the error message, we simply filter
out this type of diagnostic.
Fixes: QTCREATORBUG-27113
Change-Id: Ib32601831eded60daf80eb0ca5cf01bbd71493fa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
... as output arguments with clangd.
We might want to do so in the future, but right now it's not intended.
Task-number: QTCREATORBUG-27111
Change-Id: Ie6941f18943a1d6942901c526c62999cba6c1125
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Since non project files get opened in project specific clients now, the
check whether we should add annotations needs to make sure that the
marks file is part of the client project.
Change-Id: I2790d0f7feb39162686efd06bb3542684d289b95
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When updating translations with
cmake --build . --target ts_de
(or other language ID)
- Qualifying with unknown namespace/class ::PluginSpecPrivate
- <class> lacks Q_OBJECT macro
Change-Id: Ic42d8dffea935e6b10e59223bdedb9a8a4dcf446
Reviewed-by: hjk <hjk@qt.io>
... with clangd.
As with operator++ etc, it's immediately obvious to a developer which
arguments are modified.
Change-Id: Ia2b15d5eef7848b7ed284f8d544f039fe2927292
Reviewed-by: David Schulz <david.schulz@qt.io>
This will help avoid confusion in case of multi-project sessions.
We also shorten the message a bit so it won't be cut off in the progress
bar before the project name.
Change-Id: I0e5885f89a976b14f758f9be77e7669f199cd887
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Depending on the kind of highlighting issue we want to debug, we may or
may not be interested in the actual tokens.
Change-Id: I412126d3e97949a31f1dd5f339dc09072f28be64
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This way, a warning about missing switch cases will be accompanied by a
matching code action, which allows the user to fix it right away by
clicking on the lightbulb.
Requires clangd >= 15; see https://reviews.llvm.org/D118976.
Change-Id: I11e82264c41e4154f979d28a5e44e72c8158595b
Reviewed-by: David Schulz <david.schulz@qt.io>
... when highlighting with clangd.
This value is only meant for enum values, not types.
Task-number: QTCREATORBUG-27059
Change-Id: I7bb68f5deb6bb215ee3c23d995207019850a7bfc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>