[modules] Sometimes we can deserialize a class member but not have yet
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 24 Jan 2015 01:07:20 +0000 (01:07 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 24 Jan 2015 01:07:20 +0000 (01:07 +0000)
commit8a63989728b67584e64800e1f4c586f8c0acbfa7
treebbff117d868c80a4ba00d6ecf8ede1ade84e6cba
parentad363ad8042f44e8006554a6447fc46807d1a9ed
[modules] Sometimes we can deserialize a class member but not have yet
encountered any definition for the class; this happens when the definition is
added by an update record that is not yet loaded. In such a case, eagerly pick
the original parent of the member as the canonical definition of the class
rather than muddling through with the canonical declaration (the latter can
lead to us failing to merge properly later if the canonical definition turns
out to be some other declaration).

llvm-svn: 226977
clang/include/clang/Serialization/ASTReader.h
clang/lib/AST/ASTDumper.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Modules/Inputs/merge-nested-templates/a.h [new file with mode: 0644]
clang/test/Modules/Inputs/merge-nested-templates/b.h [new file with mode: 0644]
clang/test/Modules/Inputs/merge-nested-templates/c.h [new file with mode: 0644]
clang/test/Modules/Inputs/merge-nested-templates/module.modulemap [new file with mode: 0644]
clang/test/Modules/Inputs/merge-nested-templates/string.ii [new file with mode: 0644]
clang/test/Modules/merge-nested-templates.cpp [new file with mode: 0644]