[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 20 03:21:33 PDT 2019


martong created this revision.
martong added a reviewer: a_sidorin.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
Herald added a project: clang.

Currently ASTImporter::NonEquivalentDecls member keeps its state and
shares it between consecutive calls of
StructuralEquivalenceContesxt::IsEquivalent().  Thus, we cache
inequivalent pairs from a previous snapshot of the AST. However, we
continuously build the AST and a pair which used to be inequivalent may
be equivalent later (or vica-versa).  NonEquivalentDecls behaves
similarly to other internal states of StructuralEquivalenceContext
(TentativeEquivalences, DeclsToCheck).  I.e this state too should be
reset before each IsEquivalent() call.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62131

Files:
  clang/include/clang/AST/ASTImporter.h
  clang/include/clang/AST/ASTStructuralEquivalence.h
  clang/lib/AST/ASTImporter.cpp
  clang/lib/AST/ASTStructuralEquivalence.cpp
  clang/lib/Sema/SemaType.cpp
  clang/test/ASTMerge/class-template/test.cpp
  clang/test/ASTMerge/enum/test.c
  clang/test/ASTMerge/struct/test.c
  clang/unittests/AST/StructuralEquivalenceTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62131.200233.patch
Type: text/x-patch
Size: 12960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190520/b61a041c/attachment-0001.bin>


More information about the cfe-commits mailing list