[PATCH] D75922: [ASTImporter] Compare the DC of the underlying type of a FriendDecl

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 07:32:16 PDT 2020


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

Currently, we do not check the scope of friend classes. This can result in some
cases with missing nodes in the imported AST. E.g.:

  class Container {
    friend class X; // A friend class ::X
    class X{ };
    friend class X; // Friend class Container::X
  };

... here either `::X` or `Container::X` is missing after importing `Container`.
This patch fixes the problem.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75922

Files:
  clang/lib/AST/ASTImporter.cpp
  clang/unittests/AST/ASTImporterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75922.249366.patch
Type: text/x-patch
Size: 4508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200310/b6fb9a05/attachment-0001.bin>


More information about the cfe-commits mailing list