diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-04-11 08:26:13 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-04-11 08:26:13 +0000 |
commit | 5ff6747e04021d52f4ed654fe82007be14b8267b (patch) | |
tree | 7b73549557867928227215f498a8fa0a5b4dc26f /clang/lib/CodeGen/CGExpr.cpp | |
parent | 85eda12d093714bfc9f266d50254e82888c9e8c3 (diff) | |
download | bcm5719-llvm-5ff6747e04021d52f4ed654fe82007be14b8267b.tar.gz bcm5719-llvm-5ff6747e04021d52f4ed654fe82007be14b8267b.zip |
Remove redundant conditions of the form (A || (!A && B)) -> (A || B)
Found by cppcheck! PR27286 PR27287 PR27288 PR27289
llvm-svn: 265918
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 1b99f100de1..8329e52bde3 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2994,7 +2994,7 @@ LValue CodeGenFunction::EmitOMPArraySectionExpr(const OMPArraySectionExpr *E, else ResultExprTy = BaseTy->getPointeeType(); llvm::Value *Idx = nullptr; - if (IsLowerBound || (!IsLowerBound && E->getColonLoc().isInvalid())) { + if (IsLowerBound || E->getColonLoc().isInvalid()) { // Requesting lower bound or upper bound, but without provided length and // without ':' symbol for the default length -> length = 1. // Idx = LowerBound ?: 0; |