forked from qt-creator/qt-creator
C++11: add support for static_assert.
Change-Id: I82d8d60acaa9265fd25e0a3734855b19bdef9c06 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
44
src/libs/3rdparty/cplusplus/AST.cpp
vendored
44
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -4269,3 +4269,47 @@ unsigned NoExceptSpecificationAST::lastToken() const
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned StaticAssertDeclarationAST::firstToken() const
|
||||
{
|
||||
if (static_assert_token)
|
||||
return static_assert_token;
|
||||
if (lparen_token)
|
||||
return lparen_token;
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->firstToken())
|
||||
return candidate;
|
||||
if (comma_token)
|
||||
return comma_token;
|
||||
if (string_literal)
|
||||
if (unsigned candidate = string_literal->firstToken())
|
||||
return candidate;
|
||||
if (rparen_token)
|
||||
return rparen_token;
|
||||
if (semicolon_token)
|
||||
return semicolon_token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned StaticAssertDeclarationAST::lastToken() const
|
||||
{
|
||||
if (semicolon_token)
|
||||
return semicolon_token + 1;
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
if (string_literal)
|
||||
if (unsigned candidate = string_literal->lastToken())
|
||||
return candidate;
|
||||
if (comma_token)
|
||||
return comma_token + 1;
|
||||
if (expression)
|
||||
if (unsigned candidate = expression->lastToken())
|
||||
return candidate;
|
||||
if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
if (static_assert_token)
|
||||
return static_assert_token + 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user