forked from qt-creator/qt-creator
C++11: handle noexcept specifications.
Change-Id: I7da3affea2758b2e01124105e2521e1f2c5f6678 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
34
src/libs/3rdparty/cplusplus/AST.cpp
vendored
34
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user