aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@boostpro.com>2011-04-25 06:54:41 +0000
committerJohn Wiegley <johnw@boostpro.com>2011-04-25 06:54:41 +0000
commit552622067dc45013d240f73952fece703f5e63bd (patch)
tree05c7abd4e26f18ecddc4d05de7dd30af3408fa7e /lib/Parse/ParseExpr.cpp
parent62395c9666b84bcb0cb322d5f5183472712685f6 (diff)
t/clang/expr-traits
Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index cd8f9c53f7..12761e8d9f 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -555,6 +555,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
/// [GNU] '__is_base_of'
/// [MS] '__is_convertible_to'
///
+/// [Embarcadero] expression-trait:
+/// '__is_lvalue_expr'
+/// '__is_rvalue_expr'
+///
ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
bool isAddressOfOperand,
bool &NotCastExpr,
@@ -1021,6 +1025,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
case tok::kw___is_convertible_to:
return ParseBinaryTypeTrait();
+ case tok::kw___is_lvalue_expr:
+ case tok::kw___is_rvalue_expr:
+ return ParseExpressionTrait();
+
case tok::at: {
SourceLocation AtLoc = ConsumeToken();
return ParseObjCAtExpression(AtLoc);