-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Fix warning about mismatches between function parameter and call-site args names #89294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Troy-Butler <[email protected]>
Signed-off-by: Troy-Butler <[email protected]>
…m-project_tb into fix-redundancies
Signed-off-by: Troy-Butler <[email protected]>
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms Author: Troy Butler (Troy-Butler) ChangesAddresses issue #88716 Full diff: https://github.com/llvm/llvm-project/pull/89294.diff 5 Files Affected:
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
/// information will not be used.
virtual StoreRef invalidateRegions(Store store,
ArrayRef<SVal> Values,
- const Expr *E, unsigned Count,
+ const Expr *Ex, unsigned Count,
const LocationContext *LCtx,
const CallEvent *Call,
InvalidatedSymbols &IS,
RegionAndSymbolInvalidationTraits &ITraits,
- InvalidatedRegions *InvalidatedTopLevel,
+ InvalidatedRegions *TopLevelRegions,
InvalidatedRegions *Invalidated) = 0;
/// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
template <> struct MappingTraits<ExportSection> {
static void mapping(IO &IO, ExportSection &Section) {
const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext());
- assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+ assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits<ExportSection> {
template <> struct MappingTraits<UndefinedSection> {
static void mapping(IO &IO, UndefinedSection &Section) {
const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext());
- assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+ assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
IO.mapRequired("archs", Section.Architectures);
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index b9ad3a74007929..90293feb9c1b82 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
- Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+ Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
bool InvertFalseVal = false);
Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 22173954f7cec0..bd327d5fb8b605 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3070,8 +3070,8 @@ class VPlan {
private:
/// Add to the given dominator tree the header block and every new basic block
/// that was created between it and the latch block, inclusive.
- static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
- BasicBlock *LoopPreHeaderBB,
+ static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+ BasicBlock *LoopLatchBB,
BasicBlock *LoopExitBB);
};
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.h
index 9f92eecdf75cb6..85ca22e937b457 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorLevel.h
@@ -283,9 +283,9 @@ class SparseIterator {
};
/// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr<SparseTensorLevel> makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level l);
+std::unique_ptr<SparseTensorLevel> makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level lvl);
/// Helper function to create a simple SparseIterator object that iterate over
/// the SparseTensorLevel.
|
Corrected filename mismatch to resolve conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstCombine change looks good.
You can test this locally with the following command:git-clang-format --diff e772a268ef75332b72dd9b9ca0341a6af8b0db72 7742e6dc1b9cae750ff210e4b778750038275650 -- clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h llvm/lib/TextAPI/TextStub.cpp llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/Vectorize/VPlan.h mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h View the diff from clang-format here.diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index e60a49f68b..ef23b160a3 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -225,15 +225,11 @@ public:
/// invalidated. This should include any regions explicitly invalidated
/// even if they do not currently have bindings. Pass \c NULL if this
/// information will not be used.
- virtual StoreRef invalidateRegions(Store store,
- ArrayRef<SVal> Values,
- const Expr *Ex, unsigned Count,
- const LocationContext *LCtx,
- const CallEvent *Call,
- InvalidatedSymbols &IS,
- RegionAndSymbolInvalidationTraits &ITraits,
- InvalidatedRegions *TopLevelRegions,
- InvalidatedRegions *Invalidated) = 0;
+ virtual StoreRef invalidateRegions(
+ Store store, ArrayRef<SVal> Values, const Expr *Ex, unsigned Count,
+ const LocationContext *LCtx, const CallEvent *Call,
+ InvalidatedSymbols &IS, RegionAndSymbolInvalidationTraits &ITraits,
+ InvalidatedRegions *TopLevelRegions, InvalidatedRegions *Invalidated) = 0;
/// enterStackFrame - Let the StoreManager to do something when execution
/// engine is about to execute into a callee.
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 1668637c14..61220b5c78 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -287,7 +287,8 @@ private:
/// Helper function to create a TensorLevel object from given `tensor`.
std::unique_ptr<SparseTensorLevel> makeSparseTensorLevel(OpBuilder &b,
Location l, Value t,
- unsigned tid, Level lvl);
+ unsigned tid,
+ Level lvl);
/// Helper function to create a simple SparseIterator object that iterate over
/// the SparseTensorLevel.
|
Isn't the warning about a mismatch between declaration and definition, not call args? The InstCombine change does make the definition and declaration match.
…On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote:
***@***.**** commented on this pull request.
In llvm/lib/Transforms/InstCombine/InstCombineInternal.h <#89294 (comment)>:
> @@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
- Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
You could fix the warning by using vastly different names for the function parameters?
—
Reply to this email directly, view it on GitHub <#89294 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AABUYEAZJZLPIULGGF2GY3TY6DGDPAVCNFSM6AAAAABGN5RRXWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJQG44TSNJQGY>.
You are receiving this because your review was requested.Message ID: ***@***.***>
|
Sorry for my misreading. Would be better to add a header comment for the declaration of |
|
|
What do I need to change? |
I'm not sure of how it happened, but despite fetching the latest version of files, my clone/fork didn't fully update before I made this pull request, and it's causing issues that I'm not experienced enough to resolve. To be safe, I'm going to close this pull request, erase my fork/clone, and start again. I apologize. |
No description provided.