[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 289607. aaronpuchert added a comment. Fix as suggested by @rsmith instead: set InvalidDecl directly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86207/new/ https://reviews.llvm.org/D86207 Files:

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Everything compiles with `ValueDecl* Decomp` instead of a `LazyDeclPtr`, but I'll leave it until we figure out whether we might actually need it. Maybe we want to store the decomposition for a binding, just like we store the bindings for a decomposition. Although

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. I'll go with what @rsmith proposed to fix the bug. If the entire deserialization process doesn't rely on invariants, the order should indeed be irrelevant. In D86207#2252557 , @riccibruno wrote: > I agree, but I think that

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:585 D->setLocation(ThisDeclLoc); D->setInvalidDecl(Record.readInt()); if (Record.readInt()) { // hasAttrs The bug is here: we should not be calling

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D86207#2252409 , @aaronpuchert wrote: > In D86207#2251802 , @riccibruno > wrote: > >> Is my comment on the deserialization of `BindingDecl`s in >>

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D86207#2251802 , @riccibruno wrote: > Is my comment on the deserialization of `BindingDecl`s in > https://reviews.llvm.org/D85613?id=284364 related to this change? Not sure. The `FIXME` comment on the code is correct,

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Is my comment on the deserialization of `BindingDecl`s in https://reviews.llvm.org/D85613?id=284364 related to this change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86207/new/ https://reviews.llvm.org/D86207

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-08-19 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. aaronpuchert requested review of this revision. When parsing a C++17 binding declaration, we first create the BindingDecls in