]> granicus.if.org Git - clang/commitdiff
Revert r133526 which re-orders the suggestions for -Wparentheses on ?:
authorChandler Carruth <chandlerc@gmail.com>
Tue, 21 Jun 2011 23:04:18 +0000 (23:04 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 21 Jun 2011 23:04:18 +0000 (23:04 +0000)
operators. There is a consistent design of having the "silence the
warning" option first.

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

lib/Sema/SemaExpr.cpp

index 3b77871fe4eb19585800196c5911d22e4ca5c85d..b830ba4731643d2f945e3f2b26e4322614b40ecd 100644 (file)
@@ -6376,14 +6376,14 @@ static void DiagnoseConditionalPrecedence(Sema &Self,
       << Condition->getSourceRange()
       << BinaryOperator::getOpcodeStr(CondOpcode);
 
-  SuggestParentheses(Self, OpLoc,
-    Self.PDiag(diag::note_precedence_conditional_first),
-    SourceRange(CondRHS->getLocStart(), RHS->getLocEnd()));
-
   SuggestParentheses(Self, OpLoc,
     Self.PDiag(diag::note_precedence_conditional_silence)
       << BinaryOperator::getOpcodeStr(CondOpcode),
     SourceRange(Condition->getLocStart(), Condition->getLocEnd()));
+
+  SuggestParentheses(Self, OpLoc,
+    Self.PDiag(diag::note_precedence_conditional_first),
+    SourceRange(CondRHS->getLocStart(), RHS->getLocEnd()));
 }
 
 /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null