[PATCH] D59196: [NFC][clang][PCH] ASTStmtReader::VisitStmt(): fixup faulty assert.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 14:57:22 PDT 2019


riccibruno added a comment.

In D59196#1431473 <https://reviews.llvm.org/D59196#1431473>, @lebedev.ri wrote:

> In D59196#1429393 <https://reviews.llvm.org/D59196#1429393>, @riccibruno wrote:
>
> > I am not an expert in the serialization code (just did some modifications), but this seems reasonable to me.
>
>
> That's my thoughts too..
>  Unless of course it is also testing that `NumStmtFields` is zero.
>  Anyone with more knowledged opinion?


On further though I think the assert is fine if you view it as the last thing in `VisitStmt`, since it is checking that you did not forget a field. Instead just move the deserialization of the new bit you introduce in D59214 <https://reviews.llvm.org/D59214> so that the assert is last.


Repository:
  rC Clang

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

https://reviews.llvm.org/D59196





More information about the cfe-commits mailing list