rsmith added inline comments.

================
Comment at: include/clang/Serialization/ASTReader.h:551
 
+  llvm::SmallVector<serialization::DeclID, 8> PendingLazySpecializationIDs;
+
----------------
I'm not sure we can safely use global state for this: loading update records 
can trigger the import of a declaration and *its* update records, which would 
mean we'd attach the pending lazy specializations to the wrong declaration. Can 
you keep this list locally in `ASTReader::loadDeclUpdateRecords` instead, and 
pass it into `UpdateDecl`?


================
Comment at: include/clang/Serialization/ASTReader.h:1293-1295
+    // FIXME: A hack to access the protected getCommonPtr. This is because
+    // AddLazySpecializations should be called in the ASTReader which is not a
+    // friend of Class,Function,VarTemplateDecl.
----------------
Make this a static member of `ASTDeclReader` to avoid this hack.


https://reviews.llvm.org/D29951



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D29951: L... Richard Smith via Phabricator via cfe-commits

Reply via email to