rsmith added a comment.

I reverted this in r284081, and relanded with fixes described here as r284284.

Comment at: lib/Sema/SemaDecl.cpp:9712
+      // Demote the newly parsed definition to a fake declaration.
+      if (!VDecl->isThisDeclarationADemotedDefinition())
We also need to do this work when MergeVarDecls encounters the same condition.

Comment at: lib/Serialization/ASTReaderDecl.cpp:3087
+          CurD->isThisDeclarationADefinition()) {
+        VD->demoteThisDefinitionToDeclaration();
+        break;
When we do this, we need to tell the ASTContext we merged the definitions, so 
that the old definition will be made visible whenever the new one is.

cfe-commits mailing list

Reply via email to