CppEditor: Use "auto" in AssignToLocalVariableOperation

Fixes: QTCREATORBUG-9577
Fixes: QTCREATORBUG-18412
Change-Id: I46a925611939a3dade142eaf76e20090ae203856
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2022-05-16 13:58:49 +02:00
parent 6d1ec54679
commit 15665680df
2 changed files with 10 additions and 7 deletions

View File

@@ -6760,6 +6760,9 @@ private:
QString deduceType() const
{
if (m_file->cppDocument()->languageFeatures().cxx11Enabled)
return "auto " + m_originalName;
TypeOfExpression typeOfExpression;
typeOfExpression.init(semanticInfo().doc, snapshot(), context().bindings());
typeOfExpression.setExpandTemplates(true);