diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-02-18 02:21:22 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-02-18 02:21:22 +0000 |
| commit | 623421d385acfcfca51900e8cb133c9242d50536 (patch) | |
| tree | 23db609ac3289732b68830cac02cbc5853f6bd9a /clang/lib/AST/ASTImporter.cpp | |
| parent | 0ceb68a5525eda5e89aea4ba97115b94d8dcc5f9 (diff) | |
| download | bcm5719-llvm-623421d385acfcfca51900e8cb133c9242d50536.tar.gz bcm5719-llvm-623421d385acfcfca51900e8cb133c9242d50536.zip | |
AST import for character literals
llvm-svn: 96557
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
| -rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index e064e78c1ce..b57ef52f94b 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/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()) |

