[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 01:23:05 PDT 2024


dtcxzyw wrote:

> 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)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>: > @@ -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)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>, 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 `matchSelectFromAndOr`.


https://github.com/llvm/llvm-project/pull/89294


More information about the cfe-commits mailing list