summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 9a860033dfd..3133a8f42c2 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -27,10 +27,27 @@ using namespace clang;
// Primary Expressions.
//===----------------------------------------------------------------------===//
+PredefinedExpr* PredefinedExpr::Clone(ASTContext &C) const {
+ return new (C) PredefinedExpr(Loc, getType(), Type);
+}
+
IntegerLiteral* IntegerLiteral::Clone(ASTContext &C) const {
return new (C) IntegerLiteral(Value, getType(), Loc);
}
+CharacterLiteral* CharacterLiteral::Clone(ASTContext &C) const {
+ return new (C) CharacterLiteral(Value, IsWide, getType(), Loc);
+}
+
+FloatingLiteral* FloatingLiteral::Clone(ASTContext &C) const {
+ bool exact = IsExact;
+ return new (C) FloatingLiteral(Value, &exact, getType(), Loc);
+}
+
+GNUNullExpr* GNUNullExpr::Clone(ASTContext &C) const {
+ return new (C) GNUNullExpr(getType(), TokenLoc);
+}
+
/// getValueAsApproximateDouble - This returns the value as an inaccurate
/// double. Note that this may cause loss of precision, but is useful for
/// debugging dumps, etc.
OpenPOWER on IntegriCloud