]> granicus.if.org Git - clang/commitdiff
Fix the starting location of the Fix-It note for suspicious precedence
authorDouglas Gregor <dgregor@apple.com>
Wed, 22 Jun 2011 18:41:08 +0000 (18:41 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 22 Jun 2011 18:41:08 +0000 (18:41 +0000)
issues between a bitwise operator and a comparison operator. Fixes
<rdar://problem/9637759>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133630 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index b830ba4731643d2f945e3f2b26e4322614b40ecd..521f19c8cb57a5c2279b7f5f646303d01036c860 100644 (file)
@@ -9142,7 +9142,8 @@ static void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc,
     SuggestParentheses(Self, OpLoc,
       Self.PDiag(diag::note_precedence_bitwise_first)
         << BinOp::getOpcodeStr(Opc),
-      SourceRange(lhs->getLocEnd(), cast<BinOp>(rhs)->getLHS()->getLocStart()));
+      SourceRange(lhs->getLocStart(), 
+                  cast<BinOp>(rhs)->getLHS()->getLocStart()));
   }
 }