diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-20 20:28:15 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-20 20:28:15 +0000 |
commit | b00ab27f64abd18a68fc41699b86d0bc36189e21 (patch) | |
tree | e28b6fb4d397d8819c44ac400a6342e80eab8874 /lib/Sema/SemaExprObjC.cpp | |
parent | 38caec48bc1c9816ca59b8d164a64447ee208c2e (diff) |
Patch to support transparent_union types on
objective-c methods. Fixes radar 7875968.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index ce06abec4d..1feca6d25c 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -216,6 +216,11 @@ bool Sema::CheckMessageArgumentTypes(Expr **Args, unsigned NumArgs, AssignConvertType Result = CheckSingleAssignmentConstraints(lhsType, argExpr); + if (Result == Incompatible && !getLangOptions().CPlusPlus && + CheckTransparentUnionArgumentConstraints(lhsType, argExpr) + == Sema::Compatible) + Result = Compatible; + if (Args[i] != argExpr) // The expression was converted. Args[i] = argExpr; // Make sure we store the converted expression. |