Skip to content

Use explicit operator== call for DenseMapInfo<mlir::TypeRange> to avoid C++20 says that these are ambiguous, even though the second is reversed warning - #218713

Open
anmyachev wants to merge 1 commit into
llvm:mainfrom
anmyachev:patch-1
Open

Use explicit operator== call for DenseMapInfo<mlir::TypeRange> to avoid C++20 says that these are ambiguous, even though the second is reversed warning#218713
anmyachev wants to merge 1 commit into
llvm:mainfrom
anmyachev:patch-1

Conversation

@anmyachev

Copy link
Copy Markdown
Contributor

Fix #81769

… avoid `C++20 says that these are ambiguous, even though the second is reversed` warning
@llvmorg-github-actions llvmorg-github-actions Bot added mlir:core MLIR Core Infrastructure mlir labels Aug 25, 2026
@llvmorg-github-actions

llvmorg-github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: Anatoly Myachev (anmyachev)

Changes

Fix #81769


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

1 Files Affected:

  • (modified) mlir/include/mlir/IR/TypeRange.h (+1-1)
diff --git a/mlir/include/mlir/IR/TypeRange.h b/mlir/include/mlir/IR/TypeRange.h
index 916d5788c36fa..7f43a27d64508 100644
--- a/mlir/include/mlir/IR/TypeRange.h
+++ b/mlir/include/mlir/IR/TypeRange.h
@@ -208,7 +208,7 @@ struct DenseMapInfo<mlir::TypeRange> {
   static unsigned getHashValue(mlir::TypeRange val) { return hash_value(val); }
 
   static bool isEqual(mlir::TypeRange lhs, mlir::TypeRange rhs) {
-    return lhs == rhs;
+    return operator==(lhs, rhs);
   }
 };
 

@anmyachev

Copy link
Copy Markdown
Contributor Author

Hi @usx95, could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir:core MLIR Core Infrastructure mlir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++20 says that these are ambiguous, even though the second is reversed

1 participant