Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

llvm::all_of already returns bool.

Identified with readability-redundant-casting.

llvm::all_of already returns bool. Identified with readability-redundant-casting.
@llvmbot
Copy link
Member

llvmbot commented Nov 15, 2025

@llvm/pr-subscribers-mlir-bufferization

@llvm/pr-subscribers-mlir

Author: Kazu Hirata (kazutakahirata)

Changes

llvm::all_of already returns bool.

Identified with readability-redundant-casting.


Full diff: https://github.com/llvm/llvm-project/pull/168241.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp (+1-1)
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp b/mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp index 9ccbfd363b1df..5dfe3e632b340 100644 --- a/mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp @@ -497,7 +497,7 @@ static bool matchesInsertDestination(const AnalysisState &state, // terminates. All of them must be equivalent subsets. SetVector<Value> backwardSlice = state.findValueInReverseUseDefChain(opOperand, matchingSubset); - return static_cast<bool>(llvm::all_of(backwardSlice, matchingSubset)); + return llvm::all_of(backwardSlice, matchingSubset); } /// Return "true" if the given "read" and potentially conflicting "write" are 
@kazutakahirata kazutakahirata merged commit edbf9e4 into llvm:main Nov 15, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251115a_clang_tidy_readability-redundant-casting_mlir branch November 15, 2025 23:01
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
llvm::all_of already returns bool. Identified with readability-redundant-casting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir:bufferization Bufferization infrastructure mlir

3 participants