[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

Michael Buch via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 08:04:34 PST 2024


Michael137 wrote:

> I can not check what caused exactly the problems but the change looks correct and in change D154764 there seems to be no reason for re-ordering at non-record objects. As an improvement, some tests could be added that check for re-ordering at `RecordDecl` and (this is the more important) no re-ordering at `ObjCInterfaceDecl`.

Agreed it would be nice to get a test for this. We have a test that checks re-ordering of `RecordDecl`s (`CXXRecordDeclFieldOrderShouldNotDependOnImportOrder`). For `ObjCInterfaceDecl`s it's trickier because, AFAIK, they neither support in-class member initialisers nor function bodies that could trigger a different import order. Any ideas?

https://github.com/llvm/llvm-project/pull/77079


More information about the cfe-commits mailing list