This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2772fc806af: [C++20] [Modules] Disable preferred_name when
writing a C++20 Module interface (authored by ChuanqiXu).
Changed prior to commit:
ChuanqiXu added inline comments.
Comment at: clang/lib/Serialization/ASTWriter.cpp:4353
+ // https://github.com/llvm/llvm-project/issues/56490 for example.
+ if (!A || (isa(A) && Writer->isWritingNamedModules()))
return Record.push_back(0);
tahonermann
tahonermann accepted this revision.
tahonermann added inline comments.
Comment at: clang/lib/Serialization/ASTWriter.cpp:4353
+ // https://github.com/llvm/llvm-project/issues/56490 for example.
+ if (!A || (isa(A) && Writer->isWritingNamedModules()))
return
tahonermann added a comment.
I guess this is probably ok as a short term fix for the Clang 15 release. It
still makes me nervous though.
Comment at: clang/lib/Serialization/ASTWriter.cpp:4353
+ // https://github.com/llvm/llvm-project/issues/56490 for example.
+ if (!A ||
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
I'm okay with this approach, but please be sure to add a release note
explaining the behavior and update AttrDocs.td as well, so that users have some
notice as to what's broken.
ChuanqiXu added a comment.
Sorry for the frequent ping since 15.x is going to be branched. @aaron.ballman
@tahonermann I know this might not look good to you. But I want to ask if there
is any objection? Personally, the preferred_name attribute is not so important
and it blocks something
ChuanqiXu added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2925-2926
for (unsigned I = 0, E = readInt(); I != E; ++I)
-Attrs.push_back(readAttr());
+if (auto *Attr = readAttr())
+ Attrs.push_back(Attr);
}
tahonermann
ChuanqiXu updated this revision to Diff 447185.
ChuanqiXu added a comment.
Add more tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130331/new/
https://reviews.llvm.org/D130331
Files:
clang/include/clang/Serialization/ASTWriter.h
clang/lib/Serialization/ASTReaderDecl.cpp
tahonermann added inline comments.
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2925-2926
for (unsigned I = 0, E = readInt(); I != E; ++I)
-Attrs.push_back(readAttr());
+if (auto *Attr = readAttr())
+ Attrs.push_back(Attr);
}
erichkeane added a comment.
So this is perhaps the 'most acceptable' version of this workaround or me.
What do you think @aaron.ballman and @tahonermann ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130331/new/
https://reviews.llvm.org/D130331
ChuanqiXu added inline comments.
Comment at: clang/lib/Serialization/ASTWriter.cpp:4353
+ // https://github.com/llvm/llvm-project/issues/56490 for example.
+ if (!A || (isa(A) && Writer->isWritingNamedModules()))
return Record.push_back(0);
The
ChuanqiXu created this revision.
ChuanqiXu added reviewers: erichkeane, tahonermann, aaron.ballman.
ChuanqiXu added a project: clang-modules.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This is an
12 matches
Mail list logo