forked from qt-creator/qt-creator
C++ function link: The symbol can be unavailable on parser error.
Change-Id: I7a95adcaafff5ff845ae0fdef5bea8c3846a6ffe Reviewed-on: http://codereview.qt.nokia.com/3599 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -371,15 +371,14 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
|
||||
newDeclDoc->check();
|
||||
|
||||
// extract the function symbol
|
||||
if (!newDeclDoc->translationUnit()->ast()) {
|
||||
if (!newDeclDoc->translationUnit()->ast())
|
||||
return changes;
|
||||
}
|
||||
FunctionDefinitionAST *newDef = newDeclDoc->translationUnit()->ast()->asFunctionDefinition();
|
||||
if (!newDef) {
|
||||
if (!newDef)
|
||||
return changes;
|
||||
}
|
||||
Function *newFunction = newDef->symbol;
|
||||
QTC_ASSERT(newFunction, return changes); // check() should always create this symbol
|
||||
if (!newFunction)
|
||||
return changes;
|
||||
|
||||
const LookupContext &sourceContext = typeOfExpression.context();
|
||||
LookupContext targetContext(targetFile->cppDocument(), snapshot);
|
||||
|
Reference in New Issue
Block a user