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 | 877aaa9706e8bed893cebfc292a2ca305ec30663 (patch) | |
| tree | 17ca29b377e14076ba9aa7ee782dc8dc7b02b86d /clang/lib/Sema | |
| parent | 4dd125e27889222ebfd85dee9fbf2a7d411ed168 (diff) | |
| download | bcm5719-llvm-877aaa9706e8bed893cebfc292a2ca305ec30663.tar.gz bcm5719-llvm-877aaa9706e8bed893cebfc292a2ca305ec30663.zip | |
Patch to support transparent_union types on
objective-c methods. Fixes radar 7875968.
llvm-svn: 101935
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index ce06abec4d4..1feca6d25c1 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/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. |

