[all-commits] [llvm/llvm-project] 07ab51: [clang][ASTImporter]Skip check depth of friend tem...

Qizhi Hu via All-commits all-commits at lists.llvm.org
Mon Aug 21 22:16:49 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07ab5140080eecdf9f0f6215f70377accb8696f1
  Author: huqizhi <836744285 at qq.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M clang/include/clang/AST/ASTStructuralEquivalence.h
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/ASTStructuralEquivalence.cpp
    M clang/unittests/AST/ASTImporterTest.cpp
    M clang/unittests/AST/StructuralEquivalenceTest.cpp

  Log Message:
  [clang][ASTImporter]Skip check depth of friend template parameter

Depth of the parameter of friend template class declaration in a
template class is 1, while in the specialization the depth is 0.
This will cause failure on 'IsStructurallyEquivalent' as a name
conflict in 'VisitClassTemplateDecl'(see testcase of
'SkipComparingFriendTemplateDepth'). The patch fix it by ignore
the depth only in this special case.

Reviewed By: balazske

Differential Revision: https://reviews.llvm.org/D156693

More information about the All-commits mailing list