diff options
| author | Erik Verbruggen <[email protected]> | 2012-02-02 11:40:01 +0100 |
|---|---|---|
| committer | Erik Verbruggen <[email protected]> | 2012-02-02 12:22:20 +0100 |
| commit | dd4299073e55a21f593817316f7e013e02f62b4e (patch) | |
| tree | 26ffa0c085ba81f16c8fa6071f9873250203902b /src/libs/cplusplus/FindUsages.cpp | |
| parent | a2f9ee870e6b17d8526f365a56bc7621abda15dc (diff) | |
C++11: handle noexcept specifications.
Change-Id: I7da3affea2758b2e01124105e2521e1f2c5f6678
Reviewed-by: Roberto Raggi <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/FindUsages.cpp')
| -rw-r--r-- | src/libs/cplusplus/FindUsages.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libs/cplusplus/FindUsages.cpp b/src/libs/cplusplus/FindUsages.cpp index c581b4513ab..6e9c5257635 100644 --- a/src/libs/cplusplus/FindUsages.cpp +++ b/src/libs/cplusplus/FindUsages.cpp @@ -511,7 +511,7 @@ void FindUsages::enumerator(EnumeratorAST *ast) this->expression(ast->expression); } -bool FindUsages::visit(ExceptionSpecificationAST *ast) +bool FindUsages::visit(DynamicExceptionSpecificationAST *ast) { (void) ast; Q_ASSERT(!"unreachable"); @@ -523,13 +523,17 @@ void FindUsages::exceptionSpecification(ExceptionSpecificationAST *ast) if (! ast) return; - // unsigned throw_token = ast->throw_token; - // unsigned lparen_token = ast->lparen_token; - // unsigned dot_dot_dot_token = ast->dot_dot_dot_token; - for (ExpressionListAST *it = ast->type_id_list; it; it = it->next) { - this->expression(it->value); + if (DynamicExceptionSpecificationAST *dyn = ast->asDynamicExceptionSpecification()) { + // unsigned throw_token = ast->throw_token; + // unsigned lparen_token = ast->lparen_token; + // unsigned dot_dot_dot_token = ast->dot_dot_dot_token; + for (ExpressionListAST *it = dyn->type_id_list; it; it = it->next) { + this->expression(it->value); + } + // unsigned rparen_token = ast->rparen_token; + } else if (NoExceptSpecificationAST *no = ast->asNoExceptSpecification()) { + this->expression(no->expression); } - // unsigned rparen_token = ast->rparen_token; } bool FindUsages::visit(MemInitializerAST *ast) |
