[PATCH] D156093: [ASTImporter] Add extra sorting round for keeping lexical order of all imported decls within record

Ding Fei via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 24 03:11:54 PDT 2023


danix800 created this revision.
danix800 added a project: clang.
Herald added a subscriber: martong.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
Herald added a project: All.
danix800 requested review of this revision.
Herald added a subscriber: cfe-commits.

Revision https://reviews.llvm.org/D154764 is still not complete. An extra sorting is needed
for keeping lexical order of all imported decls within a record. The final algorithm could be
summarized as the following:

1. Import all fields that'll be part of the layout;
2. Sort these fields to ensure correct layout;
3. Import everything else;
4. Final sort for correct lexical order.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156093

Files:
  clang/lib/AST/ASTImporter.cpp
  clang/unittests/AST/ASTImporterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156093.543444.patch
Type: text/x-patch
Size: 3923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230724/97a967be/attachment-0001.bin>


More information about the cfe-commits mailing list