aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 18:51:42 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 18:51:42 +0000
commitbbee00b6456e90a09f63c83c20233e6c5ad6000a (patch)
tree679de00fd95293991c271a0022eeabd5bdf3311c /lib/Sema
parent99890659385f052412d479e8569b10069ac2b12b (diff)
minor cleanups to StringLiteralParser: no need to pass target info
into its ctor. Also, make it handle validity checking of pascal strings instead of making clients do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaExpr.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 820326f77a..652397939c 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -295,7 +295,7 @@ Action::ExprResult
Sema::ActOnStringLiteral(const Token *StringToks, unsigned NumStringToks) {
assert(NumStringToks && "Must have at least one string!");
- StringLiteralParser Literal(StringToks, NumStringToks, PP, Context.Target);
+ StringLiteralParser Literal(StringToks, NumStringToks, PP);
if (Literal.hadError)
return ExprResult(true);
@@ -303,12 +303,6 @@ Sema::ActOnStringLiteral(const Token *StringToks, unsigned NumStringToks) {
for (unsigned i = 0; i != NumStringToks; ++i)
StringTokLocs.push_back(StringToks[i].getLocation());
- // Verify that pascal strings aren't too large.
- if (Literal.Pascal && Literal.GetStringLength() > 256)
- return Diag(StringToks[0].getLocation(), diag::err_pascal_string_too_long)
- << SourceRange(StringToks[0].getLocation(),
- StringToks[NumStringToks-1].getLocation());
-
QualType StrTy = Context.CharTy;
if (Literal.AnyWide) StrTy = Context.getWCharType();
if (Literal.Pascal) StrTy = Context.UnsignedCharTy;