]> granicus.if.org Git - clang/commit
[ASTImporter] Fix unhandled cases in ASTImporterLookupTable
authorGabor Marton <gabor.marton@ericsson.com>
Tue, 11 Jun 2019 13:35:25 +0000 (13:35 +0000)
committerGabor Marton <gabor.marton@ericsson.com>
Tue, 11 Jun 2019 13:35:25 +0000 (13:35 +0000)
commit2293e82f66df72b030a0598638a0e7a8bc4be932
treec920dfa1ae03cffb5b4029e4ab79c08bb77f5bca
parent6f39021d93b241c9118b02a95fbbe006e0896eec
[ASTImporter] Fix unhandled cases in ASTImporterLookupTable

Summary:
In most cases the FriendDecl contains the declaration of the befriended
class as a child node, so it is discovered during the recursive
visitation. However, there are cases when the befriended class is not a
child, thus it must be fetched explicitly from the FriendDecl, and only
then can we add it to the lookup table.
(Note, this does affect only CTU and does not affect LLDB, because we
cannot and do not use the ASTImporterLookupTable in LLDB.)

Reviewers: a_sidorin, a.sidorin, shafik

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

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363062 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTImporter.cpp
lib/AST/ASTImporterLookupTable.cpp
unittests/AST/ASTImporterTest.cpp