diff options
author | Anders Carlsson <andersca@mac.com> | 2009-01-24 17:47:50 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-01-24 17:47:50 +0000 |
commit | 91b9f2072a20906dd34ac6cb83813debf3595328 (patch) | |
tree | ca292c2b79b3d1e5ef80def3bc2c1ae0d474441c /lib/Sema/SemaDecl.cpp | |
parent | 6da02c6ad8c3fc2e22fc27ffc73d4a6e54bb7f56 (diff) |
Ignore parens when determining if an expr is a string literal. Fixes PR3382.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index e766ca06a5..0fb939e23a 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1031,7 +1031,7 @@ bool Sema::CheckStringLiteralInit(StringLiteral *strLiteral, QualType &DeclT) { StringLiteral *Sema::IsStringLiteralInit(Expr *Init, QualType DeclType) { const ArrayType *AT = Context.getAsArrayType(DeclType); if (AT && AT->getElementType()->isCharType()) { - return dyn_cast<StringLiteral>(Init); + return dyn_cast<StringLiteral>(Init->IgnoreParens()); } return 0; } |