]> granicus.if.org Git - clang/commitdiff
Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.
authorDouglas Gregor <dgregor@apple.com>
Tue, 5 Oct 2010 20:41:58 +0000 (20:41 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 5 Oct 2010 20:41:58 +0000 (20:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115667 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/PCH/Inputs/namespaces.h
test/PCH/namespaces.cpp

index a68f562a3f04b3b9d97acdcae34ed02a2dea7f58..e42a5b4923db2f84f990e9e5a32d8efaf1178667 100644 (file)
@@ -658,6 +658,7 @@ void ASTDeclReader::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
 
 void ASTDeclReader::VisitNamespaceDecl(NamespaceDecl *D) {
   VisitNamedDecl(D);
+  D->IsInline = Record[Idx++];
   D->setLBracLoc(ReadSourceLocation(Record, Idx));
   D->setRBracLoc(ReadSourceLocation(Record, Idx));
   D->setNextNamespace(
index f8d584bb51cf26824d56c5562c763d338b945008..07520d802b57293f31e9c173af85d159a8da703b 100644 (file)
@@ -610,6 +610,7 @@ void ASTDeclWriter::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
 
 void ASTDeclWriter::VisitNamespaceDecl(NamespaceDecl *D) {
   VisitNamedDecl(D);
+  Record.push_back(D->isInline());
   Writer.AddSourceLocation(D->getLBracLoc(), Record);
   Writer.AddSourceLocation(D->getRBracLoc(), Record);
   Writer.AddDeclRef(D->getNextNamespace(), Record);
index 553aadd1f9ed643f86f52b6e873c7cc2274344ad..bd2c3ee9827102c3e8b539f346fc377b4e16b2ad 100644 (file)
@@ -38,3 +38,7 @@ using namespace N2::Inner;
 extern "C" {
   void ext();
 }
+
+inline namespace N4 { 
+  struct MemberOfN4;
+}
index b8a22e57a06eab51c6050d4f6d88ddf9c739b74e..6dd447318a0b0b170bc3a550d1f6728cd83f5d1b 100644 (file)
@@ -40,3 +40,6 @@ void (*pused)() = used_func;
 using N1::used_cls;
 used_cls s1;
 used_cls* ps1 = &s1;
+
+inline namespace N4 { }
+struct MemberOfN4 *mn4;