forked from qt-creator/qt-creator
ClangCodeModel: Make use of clangd's non-const ref parameter tagging
clangd 14 will tag non-const reference parameters for us (https:// reviews.llvm.org/D108320), so let's make use of that at least as a shortcut. Change-Id: I0162b5d7b9fecc3e6ce0338e896980cd5b363ceb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -2427,6 +2427,8 @@ static void semanticHighlighter(QFutureInterface<TextEditor::HighlightingResult>
|
||||
|
||||
QTextDocument doc(docContents);
|
||||
const auto isOutputParameter = [&ast](const ExpandedSemanticToken &token) {
|
||||
if (token.modifiers.contains("usedAsMutableReference"))
|
||||
return true;
|
||||
if (token.type != "variable" && token.type != "property" && token.type != "parameter")
|
||||
return false;
|
||||
const Position pos(token.line - 1, token.column - 1);
|
||||
|
Reference in New Issue
Block a user