diff options
Diffstat (limited to 'src/libs/cplusplus/CppDocument.cpp')
-rw-r--r-- | src/libs/cplusplus/CppDocument.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index c347e5f431..2069dd9dc3 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -89,9 +89,8 @@ protected: bool preVisit(Symbol *s) { if (s->asBlock()) { - if (s->line() < line || (s->line() == line && s->column() <= column)) { + if (s->line() < line || (s->line() == line && s->column() <= column)) return true; - } // skip blocks } if (s->line() < line || (s->line() == line && s->column() <= column)) { symbol = s; @@ -594,13 +593,12 @@ void Document::check(CheckMode mode) if (! _translationUnit->ast()) return; // nothing to do. - if (TranslationUnitAST *ast = _translationUnit->ast()->asTranslationUnit()) { + if (TranslationUnitAST *ast = _translationUnit->ast()->asTranslationUnit()) semantic(ast, _globalNamespace); - } else if (ExpressionAST *ast = _translationUnit->ast()->asExpression()) { + else if (ExpressionAST *ast = _translationUnit->ast()->asExpression()) semantic(ast, _globalNamespace); - } else if (DeclarationAST *ast = translationUnit()->ast()->asDeclaration()) { + else if (DeclarationAST *ast = translationUnit()->ast()->asDeclaration()) semantic(ast, _globalNamespace); - } } void Document::keepSourceAndAST() |