ddpagan added a comment.

Thanks for reviewing the code, Aaron.



================
Comment at: clang/lib/Serialization/ASTWriter.cpp:5018
         Record.AddStmt(A->getAllocator());
+        Record.AddStmt(A->getAlignment());
         Record.AddSourceRange(A->getRange());
----------------
aaron.ballman wrote:
> This can potentially add a null statement to emit to the serialized form.
The same thing can occur with A->getAllocator(). However, it's expected 
behavior. When these values are read in later, the allocator and alignment 
values are use to set the appropriate fields in the allocate directive. Null 
values are okay as they indicate whether or not a field has been specified (via 
an align or allocator clause).


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:6224
+void OMPClauseWriter::VisitOMPAlignClause(OMPAlignClause *C) {
+  Record.AddStmt(C->getAlignment());
+  Record.AddSourceLocation(C->getLParenLoc());
----------------
aaron.ballman wrote:
> Same for this one, maybe?
This is called only when an align clause has been specified, so it's guaranteed 
to not be null.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112577/new/

https://reviews.llvm.org/D112577

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

Reply via email to