diff options
author | John Wiegley <johnw@boostpro.com> | 2011-04-28 00:16:57 +0000 |
---|---|---|
committer | John Wiegley <johnw@boostpro.com> | 2011-04-28 00:16:57 +0000 |
commit | 21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 (patch) | |
tree | 20931fe45571db1cd45ee16aef834ecb47f7a117 /lib/Parse/ParseExpr.cpp | |
parent | 6bdda82234ff106d561dc8c0ce5ca48b97726bbf (diff) |
Implementation of Embarcadero array type traits
Patch authored by John Wiegley.
These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 1c4a942780..8b9e5e752b 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -490,6 +490,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, /// [C++] 'this' [C++ 9.3.2] /// [G++] unary-type-trait '(' type-id ')' /// [G++] binary-type-trait '(' type-id ',' type-id ')' [TODO] +/// [EMBT] array-type-trait '(' type-id ',' integer ')' /// [clang] '^' block-literal /// /// constant: [C99 6.4.4] @@ -571,6 +572,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, /// '__is_convertible' /// '__is_same' /// +/// [Embarcadero] array-type-trait: +/// '__array_rank' +/// '__array_extent' +/// /// [Embarcadero] expression-trait: /// '__is_lvalue_expr' /// '__is_rvalue_expr' @@ -1072,6 +1077,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, case tok::kw___is_convertible_to: return ParseBinaryTypeTrait(); + case tok::kw___array_rank: + case tok::kw___array_extent: + return ParseArrayTypeTrait(); + case tok::kw___is_lvalue_expr: case tok::kw___is_rvalue_expr: return ParseExpressionTrait(); |