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

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 01:36:00 PDT 2020


balazske added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:3679
+    if (FromFriendDC) { // The underlying friend type is not dependent.
+      ExpectedDecl FriendDCDeclOrErr = import(cast<Decl>(*FromFriendDC));
+      if (!FriendDCDeclOrErr)
----------------
Computing `FriendDC` can be moved out of the loop.


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:4035
+      )";
+  Decl *FromTu = getTuDecl(Code, Lang_CXX, "from.cc");
+
----------------
Use `ToTU` and `FromTU` as is in other tests.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75922/new/

https://reviews.llvm.org/D75922





More information about the cfe-commits mailing list