[all-commits] [llvm/llvm-project] 89cfee: [clang] fix structural comparison for dependent cl...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Thu Mar 27 18:09:57 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89cfeeb062577069d1da236d33810bb0416f1102
      https://github.com/llvm/llvm-project/commit/89cfeeb062577069d1da236d33810bb0416f1102
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M clang/include/clang/AST/ASTNodeTraverser.h
    M clang/lib/AST/ASTStructuralEquivalence.cpp
    M clang/test/AST/ast-dump-template-json-win32-mangler-crash.cpp
    M clang/test/AST/ast-dump-templates.cpp
    M clang/test/AST/ast-dump-types-json.cpp

  Log Message:
  -----------
  [clang] fix structural comparison for dependent class member pointer (#133343)

Fixes a regression introduced in
https://github.com/llvm/llvm-project/pull/130537 and reported here
https://github.com/llvm/llvm-project/issues/133144

This fixes a crash in ASTStructuralEquivalence where the non-null
precondition for IsStructurallyEquivalent would be violated, when
comparing member pointers with a dependent class.

This also drive-by fixes the ast node traverser for member pointers so
it doesn't traverse into the qualifier in case it's not a type, or the
class declaration in case it would be equivalent to what the qualifier
refers.

This avoids printing of `<<<NULL>>>` on the text node dumper, which is
redundant.

No release notes since the regression was never released.

Fixes https://github.com/llvm/llvm-project/issues/133144



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list