[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

Maksim Ivanov via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 30 08:02:16 PDT 2025


================
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode {
   }
 
   void Profile(llvm::FoldingSetNodeID &ID) {
-    Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl());
+    Profile(ID, getPointeeType(), getQualifier(), getCXXRecordDecl());
----------------
emaxx-google wrote:

The issue is transient - the reproducibility rate on the reproducer (https://pastebin.com/6aL6rmBe) is only 1%. Also it's not the pointer we have here that's problematic, but rather the fact of extra AST node loading inside the `FoldingSet` hash calculation operation.

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


More information about the cfe-commits mailing list