C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.

llvm-svn: 54850
This commit is contained in:
Argyrios Kyrtzidis 2008-08-16 19:45:32 +00:00
parent 37779ade44
commit 16d63a727e
2 changed files with 8 additions and 1 deletions

View File

@ -538,7 +538,9 @@ Parser::ExprResult Parser::ParseCastExpression(bool isUnaryExpression) {
case tok::kw_dynamic_cast:
case tok::kw_reinterpret_cast:
case tok::kw_static_cast:
return ParseCXXCasts();
Res = ParseCXXCasts();
// These can be followed by postfix-expr pieces.
return ParsePostfixExpressionSuffix(Res);
case tok::kw_this:
Res = ParseCXXThis();
// This can be followed by postfix-expr pieces.

View File

@ -29,3 +29,8 @@ double static_cast_test(int i)
{
return static_cast<double>(i);
}
char postfix_expr_test()
{
return reinterpret_cast<char*>(0xdeadbeef)[0];
}