diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2008-10-23 23:30:52 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2008-10-23 23:30:52 +0000 |
| commit | 340b5ddcf9c58a0790ef3065cf09c163aad846ba (patch) | |
| tree | 9d2532e88d3436fa227a89b74e90e15817a6eecf /clang/lib/Sema | |
| parent | a6090204a190c445fa36ad123761e4a1bfb005a3 (diff) | |
| download | bcm5719-llvm-340b5ddcf9c58a0790ef3065cf09c163aad846ba.tar.gz bcm5719-llvm-340b5ddcf9c58a0790ef3065cf09c163aad846ba.zip | |
Fix regression in comparison of qualified id; == operator was being
created with LHS and RHS whose types didn't match.
llvm-svn: 58049
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 5cc234e6403..9f27f8d7cd0 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2153,6 +2153,7 @@ QualType Sema::CheckCompareOperands(Expr *&lex, Expr *&rex, SourceLocation loc, Diag(loc, diag::ext_typecheck_comparison_of_distinct_pointers, lType.getAsString(), rType.getAsString(), lex->getSourceRange(), rex->getSourceRange()); + ImpCastExprToType(rex, lType); return Context.IntTy; } if (ObjCQualifiedIdTypesAreCompatible(lType, rType, true)) { @@ -2161,8 +2162,9 @@ QualType Sema::CheckCompareOperands(Expr *&lex, Expr *&rex, SourceLocation loc, } else { if ((lType->isObjCQualifiedIdType() && rType->isObjCQualifiedIdType())) { Diag(loc, diag::warn_incompatible_qualified_id_operands, - lex->getType().getAsString(), rex->getType().getAsString(), + lType.getAsString(), rType.getAsString(), lex->getSourceRange(), rex->getSourceRange()); + ImpCastExprToType(rex, lType); return Context.IntTy; } } |

