C++11: first set of changes for decltype.

Change-Id: I49d6ff7eb1805cd07bdfcb27bb37d4c6cadc9115
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-02-10 14:41:58 +01:00
parent 07d335b215
commit 3f5dc36a53
20 changed files with 181 additions and 3 deletions

View File

@@ -4313,3 +4313,33 @@ unsigned StaticAssertDeclarationAST::lastToken() const
return 1;
}
/** \generated */
unsigned DecltypeSpecifierAST::firstToken() const
{
if (decltype_token)
return decltype_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 DecltypeSpecifierAST::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 (decltype_token)
return decltype_token + 1;
return 1;
}