This revision was automatically updated to reflect the committed changes.
Closed by commit rC328153: [Modules] Fix creating fake definition data for
lambdas. (authored by vsapsai, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43494?vs=138059&id=139372#toc
Repository:
rC
vsapsai added a comment.
I think we have agreement on this change. If there are no objections, I plan to
commit it on Wednesday, March 21.
https://reviews.llvm.org/D43494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org
vsapsai marked 6 inline comments as done.
vsapsai added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1798
+ // already done some merging. Either way, just merge into it.
+ if (Canon->DefinitionData && Canon->DefinitionData != DD) {
MergeDefinition
vsapsai updated this revision to Diff 138059.
vsapsai added a comment.
- Some more cleanup. NFC.
https://reviews.llvm.org/D43494
Files:
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Modules/Inputs/self-referencing-lambda/a.h
clang/test/Modules/Inputs/self-referencing-lambda/module.
vsapsai added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1811
if (Update || Canon != D) {
Canon->DefinitionData = D->DefinitionData;
Reader.PendingDefinitions.insert(D);
This store seems to be dead too. Need to spend more
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/l
vsapsai updated this revision to Diff 137801.
vsapsai added a comment.
- Claim the definition data more eagerly.
Not sure that added "different" in the existing comment is actually useful.
It makes sense to me but don't know about others.
https://reviews.llvm.org/D43494
Files:
clang/lib/Seri
rsmith added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1790
+// set fake one.
+D->DefinitionData = DD;
ReadCXXDefinitionData(*DD, D);
I think it would make sense to "claim" the definition more eagerly here, by
also updatin
vsapsai added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1795
CXXRecordDecl *Canon = D->getCanonicalDecl();
- if (Canon->DefinitionData) {
+ if (Canon->DefinitionData && Canon->DefinitionData != DD) {
MergeDefinitionData(Canon, std::move(*DD)
vsapsai updated this revision to Diff 137299.
vsapsai added a comment.
- Don't set to-be-deserialized definition data if there is another decl with
definition data.
https://reviews.llvm.org/D43494
Files:
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Modules/Inputs/self-referencing-l
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1795
CXXRecordDecl *Canon = D->getCanonicalDecl();
- if (Canon->DefinitionData) {
+ if (Canon->DefinitionData &
vsapsai added a comment.
Ping.
https://reviews.llvm.org/D43494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vsapsai updated this revision to Diff 135179.
vsapsai added a comment.
- Set `D->DefinitionData` early.
We already call `MergeDefinitionData` after definition data deserialization is
complete. And I removed previously added `IsBeingDefined`, so left the "all the
bits must match" checks in `MergeD
rsmith added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2969
+if (!DD && RD->isBeingDefined())
+ return nullptr;
vsapsai wrote:
> vsapsai wrote:
> > aprantl wrote:
> > > Perhaps add a comment explaining what's going on in th
vsapsai added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2969
+if (!DD && RD->isBeingDefined())
+ return nullptr;
vsapsai wrote:
> aprantl wrote:
> > Perhaps add a comment explaining what's going on in this early exit?
> Whi
vsapsai added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2969
+if (!DD && RD->isBeingDefined())
+ return nullptr;
aprantl wrote:
> Perhaps add a comment explaining what's going on in this early exit?
While I was trying to ex
aprantl added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2969
+if (!DD && RD->isBeingDefined())
+ return nullptr;
Perhaps add a comment explaining what's going on in this early exit?
https://reviews.llvm.org/D43494
vsapsai created this revision.
vsapsai added reviewers: rsmith, bruno.
Herald added a subscriber: jkorous-apple.
During reading C++ definition data for lambda we can access
CXXRecordDecl representing lambda before we finished reading the
definition data. This can happen by reading a captured varia
18 matches
Mail list logo