[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 13 08:43:30 PDT 2018


martong created this revision.
martong added reviewers: a.sidorin, a_sidorin, r.stahl.
Herald added subscribers: cfe-commits, dkrupp, rnkovacs.

Implementation functions call into the member functions of
ASTStructuralEquivalence, thus they can falsely alter the DeclsToCheck state
(they add decls).  This results that some leaf declarations can be stated as
inequivalent as a side effect of one inequivalent element in the DeclsToCheck
list.  And since we store the non-equivalencies, any (otherwise independent)
decls will be rendered as non-equivalent.  Solution: I tried to clearly
separate the implementation functions (the static ones) and the public
interface.  From now on, the implementation functions do not call any public
member functions, only other implementation functions.


Repository:
  rC Clang

https://reviews.llvm.org/D49300

Files:
  include/clang/AST/ASTStructuralEquivalence.h
  lib/AST/ASTImporter.cpp
  lib/AST/ASTStructuralEquivalence.cpp
  lib/Sema/SemaType.cpp
  unittests/AST/StructuralEquivalenceTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49300.155403.patch
Type: text/x-patch
Size: 11640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180713/c4cd88ac/attachment-0001.bin>


More information about the cfe-commits mailing list