From dca21299cb4354b458a0227c015384318231f826 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Thu, 4 Apr 2019 13:25:29 -0700 Subject: [PATCH] Fix a few warnings for missing parentheses around '||' and extra semicolons. -- PiperOrigin-RevId: 241994767 --- mlir/lib/Analysis/AffineStructures.cpp | 6 +++--- mlir/lib/StandardOps/Ops.cpp | 2 +- mlir/lib/Transforms/Vectorize.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp index 4553c3ae55d2..4a796299b2cc 100644 --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -1640,7 +1640,7 @@ FlatAffineConstraints::addLowerOrUpperBound(unsigned pos, AffineMap boundMap, assert(pos < getNumDimAndSymbolIds() && "invalid position"); // Equality follows the logic of lower bound except that we add an equality // instead of an inequality. - assert(!eq || boundMap.getNumResults() == 1 && "single result expected"); + assert((!eq || boundMap.getNumResults() == 1) && "single result expected"); if (eq) lower = true; @@ -2563,7 +2563,7 @@ void FlatAffineConstraints::projectOut(unsigned pos, unsigned num) { return; // 'pos' can be at most getNumCols() - 2 if num > 0. - assert(getNumCols() < 2 || pos <= getNumCols() - 2 && "invalid position"); + assert((getNumCols() < 2 || pos <= getNumCols() - 2) && "invalid position"); assert(pos + num < getNumCols() && "invalid range"); // Eliminate as many identifiers as possible using Gaussian elimination. @@ -2672,7 +2672,7 @@ static BoundCmpResult compareBounds(ArrayRef a, ArrayRef b) { return a.back() < b.back() ? Less : Greater; } -}; // namespace +} // namespace // Computes the bounding box with respect to 'other' by finding the min of the // lower bounds and the max of the upper bounds along each of the dimensions. diff --git a/mlir/lib/StandardOps/Ops.cpp b/mlir/lib/StandardOps/Ops.cpp index 592257f062ef..2b998e98e1ac 100644 --- a/mlir/lib/StandardOps/Ops.cpp +++ b/mlir/lib/StandardOps/Ops.cpp @@ -641,7 +641,7 @@ static inline const char *const *getPredicateNames() { /*UGT*/ "ugt", /*UGE*/ "uge"}; return predicateNames; -}; +} // Returns a value of the predicate corresponding to the given mnemonic. // Returns NumPredicates (one-past-end) if there is no such mnemonic. diff --git a/mlir/lib/Transforms/Vectorize.cpp b/mlir/lib/Transforms/Vectorize.cpp index bbee43bf5ca4..4d96cf725c60 100644 --- a/mlir/lib/Transforms/Vectorize.cpp +++ b/mlir/lib/Transforms/Vectorize.cpp @@ -1002,7 +1002,7 @@ static Value *vectorizeOperand(Value *operand, Operation *op, LLVM_DEBUG(dbgs() << "-> non-vectorizable"); LLVM_DEBUG(operand->print(dbgs())); return nullptr; -}; +} /// Encodes Operation-specific behavior for vectorization. In general we assume /// that all operands of an op must be vectorized but this is not always true.