CppEditor: Fix reference to temporary

Change-Id: I3e2d7cb046e645e03ce5da7f18c48d6ce05fc76a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-08-01 08:54:12 +02:00
parent 0bd07243ed
commit c2d36c9387

View File

@@ -3729,7 +3729,7 @@ void ExtractFunction::match(const CppQuickFixInterface &interface, QuickFixOpera
// Identify what would be parameters for the new function and its return value, if any.
Symbol *funcReturn = nullptr;
QList<QPair<QString, QString> > relevantDecls;
const SemanticInfo::LocalUseMap &localUses = interface.semanticInfo().localUses;
const SemanticInfo::LocalUseMap localUses = interface.semanticInfo().localUses;
for (auto it = localUses.cbegin(), end = localUses.cend(); it != end; ++it) {
bool usedBeforeExtraction = false;
bool usedAfterExtraction = false;