aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2007-08-22 15:14:15 +0000
committerAnders Carlsson <andersca@mac.com>2007-08-22 15:14:15 +0000
commitf9bcf01f82dfd2688f81e57bcc6300c9b13c51a6 (patch)
tree88375a003a20043c1116cb4344c93209aaacab5f /Sema/SemaExpr.cpp
parent697e15f2a028f8997cccb24ecd05099988cfb1a9 (diff)
Parse @encode expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaExpr.cpp')
-rw-r--r--Sema/SemaExpr.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index da3bc3d94f..7fc6422ab7 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1658,8 +1658,7 @@ Sema::ExprResult Sema::ParseChooseExpr(SourceLocation BuiltinLoc, ExprTy *cond,
}
// TODO: Move this to SemaObjC.cpp
-Sema::ExprResult Sema::ParseObjCStringLiteral(ExprTy *string)
-{
+Sema::ExprResult Sema::ParseObjCStringLiteral(ExprTy *string) {
StringLiteral* S = static_cast<StringLiteral *>(string);
if (CheckBuiltinCFStringArgument(S))
@@ -1671,3 +1670,13 @@ Sema::ExprResult Sema::ParseObjCStringLiteral(ExprTy *string)
return new ObjCStringLiteral(S, t);
}
+
+Sema::ExprResult Sema::ParseObjCEncodeExpression(SourceLocation AtLoc,
+ SourceLocation LParenLoc,
+ TypeTy *Ty,
+ SourceLocation RParenLoc) {
+ QualType EncodedType = QualType::getFromOpaquePtr(Ty);
+
+ QualType t = Context.getPointerType(Context.CharTy);
+ return new ObjCEncodeExpr(t, EncodedType, AtLoc, RParenLoc);
+}