... and throw away old workarounds.
The current clangd version, to be shipped with Qt Creator 14, is 18.1, so
we can safely bump the minimum version to 17.
Change-Id: I74fd5997196d774b6c47dcb522284953ef82ad9c
Reviewed-by: David Schulz <david.schulz@qt.io>
Previously, the final highlighting results we showed were incomplete and
out of order.
Change-Id: If18062cc5a7f3156d6bb0b282aed33906cdef910
Reviewed-by: David Schulz <david.schulz@qt.io>
This feels better when stepping through the code but doesn't
really make a difference in the profile.
Change-Id: I2c30578bf1e990b039caadb8b8ce532f009b775d
Reviewed-by: David Schulz <david.schulz@qt.io>
We highlight concepts as types for now, as it's a pretty good fit. We can
always introduce a dedicated concept highlighting type later if there is
demand.
Task-number: QTCREATORBUG-28887
Change-Id: I405db5ca4351efd565b968e765fe8bca976a2800
Reviewed-by: David Schulz <david.schulz@qt.io>
As of a3af941adf, the built-in highlighter
can properly handle multi-line raw string literals, so we don't need to
abuse the semantic highlighter for this anymore.
Fixes: QTCREATORBUG-26693
Fixes: QTCREATORBUG-28284
Change-Id: If644767dfa8a97294e84a541eea44143e8d1bb88
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We now get a semantic token "operator" from clangd;
see https://reviews.llvm.org/D136594.
As a side effect, this results in the following subtle changes in what
exactly gets highlighted, both of which make sense:
- The type part of a conversion operator is now highlighted as
a type, not an operator.
- We no longer add special highlighting for the brackets in
operator new[] and operator delete[].
Change-Id: Ic149487496768762728a712c9fbcde5c9516529c
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>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
I've repeatedly encountered std::bad_alloc recently, and would like to
get more info about where it is triggered. The crash comes from Qt,
apparently after the original thread has alresdy finished, so the
original location is not found in the stack trace.
Change-Id: I7bbdcce6534ea0c846a69af33ad8634c3415572d
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>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This is a local variable, not a macro.
Also take into account the new upstream support for this (see
https://reviews.llvm.org/D131175), which required us to fix our
assumption that "static" always means "static member".
Change-Id: I69f3c98737571cbd55f9c64c02292426acb6031b
Reviewed-by: David Schulz <david.schulz@qt.io>
Macros are used like identifiers; there is no reason why they should need
to have the same highlighting as a preprocessor directive.
Fixes: QTCREATORBUG-23548
Change-Id: I186befc06ccb36a00451fd707c41e3687a84af14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
String literals that are adjacent after preprocessing are reported as a
single AST node, leading to potentially wrong highlighting.
We can catch this condition at least for the case where there are
semantic tokens in between the string components.
Fixes: QTCREATORBUG-27601
Change-Id: If023d06db74bd6cfefa670649f0e733ceaaede2d
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>