ClangCodeModel: Do not ignore highlighting for raw string literals

Also add the special handling for prefix and suffix like in CppHighlighter,
as not to re-introduce QTCREATORBUG-19119.

Fixes: QTCREATORBUG-16183
Change-Id: Ie264946782220a8e5a862c1d4550bcd49bc2349f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2020-10-19 18:03:31 +02:00
parent dbb6201605
commit baf25e4cdb
4 changed files with 102 additions and 19 deletions

View File

@@ -197,13 +197,8 @@ void HighlightingResultReporter::run_internal()
using ClangBackEnd::HighlightingType;
for (const auto &tokenInfo : m_tokenInfos) {
const HighlightingType mainType = tokenInfo.types.mainHighlightingType;
if (mainType == HighlightingType::StringLiteral)
continue;
for (const auto &tokenInfo : qAsConst(m_tokenInfos))
reportChunkWise(toHighlightingResult(tokenInfo));
}
if (isCanceled())
return;