Commit e3419dc5 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

C++: Save a Symbol::asScope() call

isScope() calls asScope().

Change-Id: I9ffe3bf2b9cff567b32a59cf27727097642b560b
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarChristian Stenger <>
parent 69504c25
......@@ -509,10 +509,8 @@ QString Document::functionAt(int line, int column, int *lineOpeningDeclaratorPar
// Find the enclosing function scope (which might be several levels up, or we might be standing
// on it)
Scope *scope;
if (symbol->isScope())
scope = symbol->asScope();
Scope *scope = symbol->asScope();
if (!scope)
scope = symbol->enclosingScope();
while (scope && !scope->isFunction() )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment