Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46129 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaChecking.cpp b/Sema/SemaChecking.cpp
index 61c67f0..44c559b 100644
--- a/Sema/SemaChecking.cpp
+++ b/Sema/SemaChecking.cpp
@@ -751,8 +751,8 @@
void Sema::CheckFloatComparison(SourceLocation loc, Expr* lex, Expr *rex) {
bool EmitWarning = true;
- Expr* LeftExprSansParen = IgnoreParen(lex);
- Expr* RightExprSansParen = IgnoreParen(rex);
+ Expr* LeftExprSansParen = lex->IgnoreParens();
+ Expr* RightExprSansParen = lex->IgnoreParens();
// Special case: check for x == x (which is OK).
// Do not emit warnings for such cases.