rsmith added inline comments.

================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1789
+  // set fake one.
+  if (!Canon->DefinitionData) {
+    Canon->DefinitionData = DD;
----------------
No braces around single-line `if` bodies, please.


================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1798
+  // already done some merging. Either way, just merge into it.
+  if (Canon->DefinitionData && Canon->DefinitionData != DD) {
     MergeDefinitionData(Canon, std::move(*DD));
----------------
`Canon->DefinitionData` can't be null here, so the first half of this check is 
redundant. If you're concerned about that, you can add an assert that it's 
equal to `D->DefinitionData` (and that both are non-null).


================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1800
     MergeDefinitionData(Canon, std::move(*DD));
     D->DefinitionData = Canon->DefinitionData;
     return;
----------------
This store is dead.


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