diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-11 04:42:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-11 04:42:12 +0000 |
commit | 8cf0d22420eab58b8b434fa5d3a6e83c63ddefdd (patch) | |
tree | 5dddb0070a2d58941f65fed944581d678d033494 /lib/Sema/SemaExprCXX.cpp | |
parent | 926df6cfabf3eaa4afc990c097fa4619b76a9b57 (diff) |
Fix order of operands for the warning about incompatible Objective-C
pointer assignment in C++. This was a longstanding problem spotted by
Jordy Rose.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 27659f6507..50462abd3a 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -2211,7 +2211,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, case ICK_Pointer_Conversion: { if (SCS.IncompatibleObjC && Action != AA_Casting) { // Diagnose incompatible Objective-C conversions - if (Action == AA_Initializing) + if (Action == AA_Initializing || Action == AA_Assigning) Diag(From->getSourceRange().getBegin(), diag::ext_typecheck_convert_incompatible_pointer) << ToType << From->getType() << Action |