C++11: handle noexcept specifications.

Change-Id: I7da3affea2758b2e01124105e2521e1f2c5f6678
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-02-02 11:40:01 +01:00
parent a2f9ee870e
commit dd4299073e
18 changed files with 197 additions and 33 deletions

View File

@@ -1161,7 +1161,7 @@ unsigned ExceptionDeclarationAST::lastToken() const
}
/** \generated */
unsigned ExceptionSpecificationAST::firstToken() const
unsigned DynamicExceptionSpecificationAST::firstToken() const
{
if (throw_token)
return throw_token;
@@ -1178,7 +1178,7 @@ unsigned ExceptionSpecificationAST::firstToken() const
}
/** \generated */
unsigned ExceptionSpecificationAST::lastToken() const
unsigned DynamicExceptionSpecificationAST::lastToken() const
{
if (rparen_token)
return rparen_token + 1;
@@ -4239,3 +4239,33 @@ unsigned PointerLiteralAST::lastToken() const
return 1;
}
/** \generated */
unsigned NoExceptSpecificationAST::firstToken() const
{
if (noexcept_token)
return noexcept_token;
if (lparen_token)
return lparen_token;
if (expression)
if (unsigned candidate = expression->firstToken())
return candidate;
if (rparen_token)
return rparen_token;
return 0;
}
/** \generated */
unsigned NoExceptSpecificationAST::lastToken() const
{
if (rparen_token)
return rparen_token + 1;
if (expression)
if (unsigned candidate = expression->lastToken())
return candidate;
if (lparen_token)
return lparen_token + 1;
if (noexcept_token)
return noexcept_token + 1;
return 1;
}