aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-18 02:21:22 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-18 02:21:22 +0000
commitb2e400aae8c62c4e1616016f40618baace0da065 (patch)
tree5d12971e35ce12150941c682cc2fad8c1d84ceae /lib
parent2b785022973202ea6bafe304a50eb3cac1a0aeb8 (diff)
AST import for character literals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTImporter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index e064e78c1c..b57ef52f94 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -108,6 +108,7 @@ namespace {
// Importing expressions
Expr *VisitExpr(Expr *E);
Expr *VisitIntegerLiteral(IntegerLiteral *E);
+ Expr *VisitCharacterLiteral(CharacterLiteral *E);
Expr *VisitImplicitCastExpr(ImplicitCastExpr *E);
};
}
@@ -2598,6 +2599,16 @@ Expr *ASTNodeImporter::VisitIntegerLiteral(IntegerLiteral *E) {
IntegerLiteral(E->getValue(), T, Importer.Import(E->getLocation()));
}
+Expr *ASTNodeImporter::VisitCharacterLiteral(CharacterLiteral *E) {
+ QualType T = Importer.Import(E->getType());
+ if (T.isNull())
+ return 0;
+
+ return new (Importer.getToContext()) CharacterLiteral(E->getValue(),
+ E->isWide(), T,
+ Importer.Import(E->getLocation()));
+}
+
Expr *ASTNodeImporter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
QualType T = Importer.Import(E->getType());
if (T.isNull())