summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/Sema/SemaExprCXX.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/Sema/SemaExprCXX.cpp b/clang/Sema/SemaExprCXX.cpp
index e0a98ef737e..a88ec3d8793 100644
--- a/clang/Sema/SemaExprCXX.cpp
+++ b/clang/Sema/SemaExprCXX.cpp
@@ -26,7 +26,7 @@ Sema::ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
CXXCastExpr::Opcode Op;
switch (Kind) {
- default: assert(0 && "Unknown C++ cast!"); abort();
+ default: assert(0 && "Unknown C++ cast!");
case tok::kw_const_cast: Op = CXXCastExpr::ConstCast; break;
case tok::kw_dynamic_cast: Op = CXXCastExpr::DynamicCast; break;
case tok::kw_reinterpret_cast: Op = CXXCastExpr::ReinterpretCast; break;
@@ -35,3 +35,11 @@ Sema::ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
return new CXXCastExpr(Op, TypeRef::getFromOpaquePtr(Ty), (Expr*)E);
}
+
+/// ParseCXXBoolLiteral - Parse {true,false} literals.
+Action::ExprResult
+Sema::ParseCXXBoolLiteral(SourceLocation, tok::TokenKind Kind) {
+ assert((Kind != tok::kw_true || Kind != tok::kw_false) &&
+ "Unknown C++ Boolean value!");
+ return new CXXBoolLiteralExpr(Kind == tok::kw_true);
+}
OpenPOWER on IntegriCloud