From 78036cdd5ccdfc15e68d612ccda37f7df1a08ae7 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 30 Oct 2007 21:03:09 +0000 Subject: [PATCH] Tightened IgnoreParen. llvm-svn: 43517 --- clang/Sema/SemaExpr.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index e5412d41adfb..ac1c440885f9 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -1194,13 +1194,8 @@ inline QualType Sema::CheckShiftOperands( // C99 6.5.7 // Utility method to plow through parentheses to get the first nested // non-ParenExpr expr. static inline Expr* IgnoreParen(Expr* E) { - - while (true) { - if (ParenExpr* P = dyn_cast(E)) - E = P->getSubExpr(); - else - break; - } + while (ParenExpr* P = dyn_cast(E)) + E = P->getSubExpr(); return E; }