forked from qt-creator/qt-creator
CppEditor: Fix possible use of uninitialized values
Change-Id: I138309e5e85c839250f5f93448530b9e12c5f6af Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
38f089c580
commit
81401ace26
@@ -3850,7 +3850,7 @@ public:
|
|||||||
result.file = refactoring.file(declFileName);
|
result.file = refactoring.file(declFileName);
|
||||||
ASTPath astPath(result.file->cppDocument());
|
ASTPath astPath(result.file->cppDocument());
|
||||||
const QList<AST *> path = astPath(s->line(), s->column());
|
const QList<AST *> path = astPath(s->line(), s->column());
|
||||||
SimpleDeclarationAST *simpleDecl;
|
SimpleDeclarationAST *simpleDecl = nullptr;
|
||||||
for (int idx = 0; idx < path.size(); ++idx) {
|
for (int idx = 0; idx < path.size(); ++idx) {
|
||||||
AST *node = path.at(idx);
|
AST *node = path.at(idx);
|
||||||
simpleDecl = node->asSimpleDeclaration();
|
simpleDecl = node->asSimpleDeclaration();
|
||||||
|
Reference in New Issue
Block a user