mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 08:34:59 +00:00
C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.
llvm-svn: 54850
This commit is contained in:
parent
37779ade44
commit
16d63a727e
@ -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.
|
||||
|
@ -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];
|
||||
}
|
Loading…
Reference in New Issue
Block a user