CppEditor: Fix possible use of uninitialized values

Change-Id: I138309e5e85c839250f5f93448530b9e12c5f6af
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2016-11-29 13:07:01 +01:00
committed by Tim Jenssen
parent 38f089c580
commit 81401ace26

View File

@@ -3850,7 +3850,7 @@ public:
result.file = refactoring.file(declFileName);
ASTPath astPath(result.file->cppDocument());
const QList<AST *> path = astPath(s->line(), s->column());
SimpleDeclarationAST *simpleDecl;
SimpleDeclarationAST *simpleDecl = nullptr;
for (int idx = 0; idx < path.size(); ++idx) {
AST *node = path.at(idx);
simpleDecl = node->asSimpleDeclaration();