forked from qt-creator/qt-creator
C++: Support alignas in C++11 mode.
Change-Id: Ifa81a481bf92b5b71495a105ae292f3e9895f704 Task-number: QTCREATORBUG-9279 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
d2db54b451
commit
45b1169d06
42
src/libs/3rdparty/cplusplus/AST.cpp
vendored
42
src/libs/3rdparty/cplusplus/AST.cpp
vendored
@@ -68,7 +68,7 @@ bool AST::match(AST *pattern, ASTMatcher *matcher)
|
||||
return match0(pattern, matcher);
|
||||
}
|
||||
|
||||
unsigned AttributeSpecifierAST::firstToken() const
|
||||
unsigned GnuAttributeSpecifierAST::firstToken() const
|
||||
{
|
||||
return attribute_token;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ unsigned AsmDefinitionAST::lastToken() const
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned AttributeAST::firstToken() const
|
||||
unsigned GnuAttributeAST::firstToken() const
|
||||
{
|
||||
if (identifier_token)
|
||||
return identifier_token;
|
||||
@@ -259,7 +259,7 @@ unsigned AttributeAST::firstToken() const
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned AttributeAST::lastToken() const
|
||||
unsigned GnuAttributeAST::lastToken() const
|
||||
{
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
@@ -4194,7 +4194,7 @@ unsigned WhileStatementAST::lastToken() const
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned AttributeSpecifierAST::lastToken() const
|
||||
unsigned GnuAttributeSpecifierAST::lastToken() const
|
||||
{
|
||||
if (second_rparen_token)
|
||||
return second_rparen_token + 1;
|
||||
@@ -4524,3 +4524,37 @@ unsigned DotDesignatorAST::lastToken() const
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned AlignmentSpecifierAST::firstToken() const
|
||||
{
|
||||
if (align_token)
|
||||
return align_token;
|
||||
if (lparen_token)
|
||||
return lparen_token;
|
||||
if (typeIdExprOrAlignmentExpr)
|
||||
if (unsigned candidate = typeIdExprOrAlignmentExpr->firstToken())
|
||||
return candidate;
|
||||
if (ellipses_token)
|
||||
return ellipses_token;
|
||||
if (rparen_token)
|
||||
return rparen_token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \generated */
|
||||
unsigned AlignmentSpecifierAST::lastToken() const
|
||||
{
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
if (ellipses_token)
|
||||
return ellipses_token + 1;
|
||||
if (typeIdExprOrAlignmentExpr)
|
||||
if (unsigned candidate = typeIdExprOrAlignmentExpr->lastToken())
|
||||
return candidate;
|
||||
if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
if (align_token)
|
||||
return align_token + 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user