From 636faf30db175784814a2c5d1df3abc8829dc017 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 18 Jan 2024 11:10:39 +0100 Subject: [PATCH] CppEditor: Do not look for unnamed function parameters in comments Task-number: QTCREATORBUG-30155 Change-Id: Idc0c7b7c68c99ffda52a4fee2c3dfe5ee52ce099 Reviewed-by: Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/cppeditor/cppfunctiondecldeflink.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp index 7055b00d038..f64e5df9e4a 100644 --- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp +++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp @@ -863,6 +863,8 @@ ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targetOffse const QStringView docView = QStringView(content); for (auto it = renamedTargetParameters.cbegin(); it != renamedTargetParameters.cend(); ++it) { + if (!it.key()->name()) + continue; const QString paramName = Overview().prettyName(it.key()->name()); for (const Token &tok : functionComments) { const TranslationUnit * const tu = targetFile->cppDocument()->translationUnit();