summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-19 15:42:04 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-19 15:42:04 +0000
commitd08452f60a2731c279f3b845d84a4a8940844d99 (patch)
treefef20a1d72fc923018c89ab9a49977455bace01b /clang/lib/Parse/ParseStmt.cpp
parent3462c8ecdaf8bb18138c2ee2a99b213f7fd7cff9 (diff)
downloadbcm5719-llvm-d08452f60a2731c279f3b845d84a4a8940844d99.tar.gz
bcm5719-llvm-d08452f60a2731c279f3b845d84a4a8940844d99.zip
Added operator overloading for unary operators, post-increment, and
post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. llvm-svn: 59638
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 49b81809048..221ad90273d 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -386,7 +386,8 @@ Parser::StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
}
// Add the __extension__ node to the AST.
- Res = Actions.ActOnUnaryOp(ExtLoc, tok::kw___extension__, Res.Val);
+ Res = Actions.ActOnUnaryOp(CurScope, ExtLoc, tok::kw___extension__,
+ Res.Val);
if (Res.isInvalid)
continue;
OpenPOWER on IntegriCloud