summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-08-14 20:30:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-08-14 20:30:52 +0000
commit462b6fc6dcd7dee1321fb933d4978fc0122a78ad (patch)
tree196f6432510dde7cbb895fbc4f7a729dad783dff /clang/lib/Serialization/ASTReaderDecl.cpp
parent015ebbc8c70866662685d1d367cd7bc4a4aa7265 (diff)
downloadbcm5719-llvm-462b6fc6dcd7dee1321fb933d4978fc0122a78ad.tar.gz
bcm5719-llvm-462b6fc6dcd7dee1321fb933d4978fc0122a78ad.zip
[modules] Turn off a broken optimization: we need to pick up implicit special
members from all redefinitions of a class that have them, in case the special member is defined in one module but only declared in another. llvm-svn: 215675
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index dcb747fe8d7..38837e2c067 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -1301,8 +1301,11 @@ void ASTDeclReader::MergeDefinitionData(
// If the new definition has new special members, let the name lookup
// code know that it needs to look in the new definition too.
- if ((MergeDD.DeclaredSpecialMembers & ~DD.DeclaredSpecialMembers) &&
- DD.Definition != MergeDD.Definition) {
+ //
+ // FIXME: We only need to do this if the merged definition declares members
+ // that this definition did not declare, or if it defines members that this
+ // definition did not define.
+ if (MergeDD.DeclaredSpecialMembers && DD.Definition != MergeDD.Definition) {
Reader.MergedLookups[DD.Definition].push_back(MergeDD.Definition);
DD.Definition->setHasExternalVisibleStorage();
}
OpenPOWER on IntegriCloud