diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-01-06 01:07:05 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-01-06 01:07:05 +0000 |
commit | a263c346e568e15dde95ad2d1417444c5cda134f (patch) | |
tree | 5033028c647c91413c416e61e51382bf8202e149 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | 0f74d273b009240bd71c10e8e5487f0add521048 (diff) | |
download | bcm5719-llvm-a263c346e568e15dde95ad2d1417444c5cda134f.tar.gz bcm5719-llvm-a263c346e568e15dde95ad2d1417444c5cda134f.zip |
Serialize the IDNS for a UsingShadowDecl rather than recomputing it.
Attempting to recompute it are doomed to fail because the IDNS of a declaration
is not necessarily preserved across serialization and deserialization (in turn
because whether a friend declaration is visible depends on whether some prior
non-friend declaration exists).
llvm-svn: 321921
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index efbaf92a849..0cf9afb0759 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1500,7 +1500,8 @@ void ASTDeclReader::VisitUsingPackDecl(UsingPackDecl *D) { void ASTDeclReader::VisitUsingShadowDecl(UsingShadowDecl *D) { RedeclarableResult Redecl = VisitRedeclarable(D); VisitNamedDecl(D); - D->setTargetDecl(ReadDeclAs<NamedDecl>()); + D->Underlying = ReadDeclAs<NamedDecl>(); + D->IdentifierNamespace = Record.readInt(); D->UsingOrNextShadow = ReadDeclAs<NamedDecl>(); UsingShadowDecl *Pattern = ReadDeclAs<UsingShadowDecl>(); if (Pattern) |