diff options
Diffstat (limited to 'lib/Serialization/ASTCommon.cpp')
-rw-r--r-- | lib/Serialization/ASTCommon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/ASTCommon.cpp b/lib/Serialization/ASTCommon.cpp index 9c6f03cd0b..7519dc239c 100644 --- a/lib/Serialization/ASTCommon.cpp +++ b/lib/Serialization/ASTCommon.cpp @@ -344,8 +344,8 @@ bool serialization::needsAnonymousDeclarationNumber(const NamedDecl *D) { return true; } - // Otherwise, we only care about anonymous class members. - if (D->getDeclName() || !isa<CXXRecordDecl>(D->getLexicalDeclContext())) + // Otherwise, we only care about anonymous class members / block-scope decls. + if (D->getDeclName() || D->getLexicalDeclContext()->isFileContext()) return false; return isa<TagDecl>(D) || isa<FieldDecl>(D); } |