From e089497121ddbcbed3131ee2e064c7434164dc46 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 18 Apr 2013 01:04:37 +0000 Subject: Switch the note order for -Woverloaded-shift-op-parentheses so that the note with the silence fix-it comes first. This is more consistent with the rest of the warnings in -Wparentheses. llvm-svn: 179742 --- clang/lib/Sema/SemaExpr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index ce60f9171fd..fb0e9ef687c 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -8894,14 +8894,14 @@ static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc, S.Diag(OpLoc, diag::warn_overloaded_shift_in_comparison) << LHSExpr->getSourceRange() << RHSExpr->getSourceRange() << (Kind == OO_LessLess); - SuggestParentheses(S, OpLoc, - S.PDiag(diag::note_evaluate_comparison_first), - SourceRange(OCE->getArg(1)->getLocStart(), - RHSExpr->getLocEnd())); SuggestParentheses(S, OCE->getOperatorLoc(), S.PDiag(diag::note_precedence_silence) << (Kind == OO_LessLess ? "<<" : ">>"), OCE->getSourceRange()); + SuggestParentheses(S, OpLoc, + S.PDiag(diag::note_evaluate_comparison_first), + SourceRange(OCE->getArg(1)->getLocStart(), + RHSExpr->getLocEnd())); } /// DiagnoseBinOpPrecedence - Emit warnings for expressions with tricky -- cgit v1.2.3