diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-19 17:40:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-19 17:40:08 +0000 |
commit | 47d3f2742a3b69e1231aa09d0daf9eed3d8163c9 (patch) | |
tree | ad803fe30ac0aeb021276735427d90071c1fcda5 /clang/lib/Sema/SemaExpr.cpp | |
parent | 324de7ba46c961e5cce879f30f9be57a040c6a3e (diff) | |
download | bcm5719-llvm-47d3f2742a3b69e1231aa09d0daf9eed3d8163c9.tar.gz bcm5719-llvm-47d3f2742a3b69e1231aa09d0daf9eed3d8163c9.zip |
Allow downcasts of pointers to Objective-C interfaces, with a
warning. This matches GCC's behavior and addresses
<rdar://problem/6458293>.
llvm-svn: 61246
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index d31855e36bd..da0354886c1 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2138,7 +2138,8 @@ Sema::CheckSingleAssignmentConstraints(QualType lhsType, Expr *&rExpr) { // C++ 5.17p3: If the left operand is not of class type, the // expression is implicitly converted (C++ 4) to the // cv-unqualified type of the left operand. - if (PerformImplicitConversion(rExpr, lhsType.getUnqualifiedType())) + if (PerformImplicitConversion(rExpr, lhsType.getUnqualifiedType(), + "assigning")) return Incompatible; else return Compatible; |