From: Ted Kremenek Date: Tue, 30 Oct 2007 21:03:09 +0000 (+0000) Subject: Tightened IgnoreParen. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59092d0b934bc5c28996cec294ba1016798928b3;p=clang Tightened IgnoreParen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43517 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index e5412d41ad..ac1c440885 100644 --- a/Sema/SemaExpr.cpp +++ b/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; }