diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-02 17:17:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-02 17:17:33 +0000 |
commit | b1f7398b1c115f3f595a56109def486e5997f21e (patch) | |
tree | db889b43634e0ab18d4505db8722f25f3f389247 /clang/lib/Sema/SemaExprObjC.cpp | |
parent | 6f6d226f63b9356660e0aa141b643b37bce29e83 (diff) | |
download | bcm5719-llvm-b1f7398b1c115f3f595a56109def486e5997f21e.tar.gz bcm5719-llvm-b1f7398b1c115f3f595a56109def486e5997f21e.zip |
properly handle array decay in objc message exprs.
llvm-svn: 49098
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 00361658f75..ec6e41bf39f 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -114,13 +114,13 @@ bool Sema::CheckMessageArgumentTypes(Expr **Args, unsigned NumArgs, QualType rhsType = argExpr->getType(); // If necessary, apply function/array conversion. C99 6.7.5.3p[7,8]. - if (const ArrayType *ary = lhsType->getAsArrayType()) - lhsType = Context.getPointerType(ary->getElementType()); + if (lhsType->isArrayType()) + lhsType = Context.getArrayDecayedType(lhsType); else if (lhsType->isFunctionType()) lhsType = Context.getPointerType(lhsType); - AssignConvertType Result = CheckSingleAssignmentConstraints(lhsType, - argExpr); + AssignConvertType Result = + CheckSingleAssignmentConstraints(lhsType, argExpr); if (Args[i] != argExpr) // The expression was converted. Args[i] = argExpr; // Make sure we store the converted expression. |