vsapsai added inline comments.

================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1795
   CXXRecordDecl *Canon = D->getCanonicalDecl();
-  if (Canon->DefinitionData) {
+  if (Canon->DefinitionData && Canon->DefinitionData != DD) {
     MergeDefinitionData(Canon, std::move(*DD));
----------------
rsmith wrote:
> It's a little odd that we'll temporarily have two different declarations that 
> think they're the definition in this case, but I don't actually know of 
> anything that'll go wrong as a result.
> 
> (This seems easy to avoid, though, by checking whether there already is a 
> definition earlier.)
Uploaded a new patch. Is this what you had in mind by not having two different 
declarations that think they're the definition?


https://reviews.llvm.org/D43494



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to