[ASTImporter] Friend class decl should not be visible in its context
authorGabor Marton <gabor.marton@ericsson.com>
Wed, 4 Dec 2019 16:12:08 +0000 (17:12 +0100)
committerGabor Marton <gabor.marton@ericsson.com>
Tue, 17 Dec 2019 13:48:55 +0000 (14:48 +0100)
commit4becf68c6f17fe143539ceac954b21175914e1c1
tree5ec118c2e37461f8eba080d9b85447b7f1228b32
parent4aee81c4f73359230e358108bc428e3b0cc59566
[ASTImporter] Friend class decl should not be visible in its context

Summary:
In the past we had to use DeclContext::makeDeclVisibleInContext to make
friend declarations available for subsequent lookup calls and this way
we could chain (redecl) the structurally equivalent decls.
By doing this we created an AST that improperly made declarations
visible in some contexts, so the AST was malformed.
Since we use the importer specific lookup this is no longer necessary,
because with that we can find every previous nodes.

Reviewers: balazske, a_sidorin, a.sidorin, shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71020
clang/lib/AST/ASTImporter.cpp
clang/unittests/AST/ASTImporterTest.cpp