MSVC build fix: forget some unneeded and incorrect friends.
authorJohn McCall <rjmccall@apple.com>
Sat, 14 Dec 2019 05:55:26 +0000 (00:55 -0500)
committerJohn McCall <rjmccall@apple.com>
Sat, 14 Dec 2019 06:02:09 +0000 (01:02 -0500)
On MSVC, friend declarations are (incorrectly) visible even if
not otherwise declared, which causes them to interfere with
lookup.  ASTTypeWriter is actually in an anonymous namespace
and cannot be ASTWriter's friend.  The others simply don't need
to be anymore.

clang/include/clang/Serialization/ASTReader.h
clang/include/clang/Serialization/ASTWriter.h

index 37c6467..3f321f0 100644 (file)
@@ -365,7 +365,6 @@ public:
   friend class ASTDeclReader;
   friend class ASTIdentifierIterator;
   friend class ASTRecordReader;
-  friend class ASTStmtReader;
   friend class ASTUnit; // ASTUnit needs to remap source locations.
   friend class ASTWriter;
   friend class PCHValidator;
index d465939..3f0e1e4 100644 (file)
@@ -106,8 +106,6 @@ class ASTWriter : public ASTDeserializationListener,
 public:
   friend class ASTDeclWriter;
   friend class ASTRecordWriter;
-  friend class ASTStmtWriter;
-  friend class ASTTypeWriter;
 
   using RecordData = SmallVector<uint64_t, 64>;
   using RecordDataImpl = SmallVectorImpl<uint64_t>;