vedgy added a comment. In D139774#4096695 <https://reviews.llvm.org/D139774#4096695>, @aaron.ballman wrote:
> There's three scenarios when a field is added to the structure: 1) library > and app are matching versions, 2) library is newer than app, 3) app is newer > than library. #1 is the happy path most folks will hopefully be on. For #2 > and #3, the app will either be sending more or less data than the library > expects, but the library will know how much of the structure is valid based > on the size field. If the size is too small and the library can't get data it > needs, it can catch that and report an error instead of reading past a > buffer. And if the size is too large, the library can ignore anything it > doesn't know about or it can give an error due to not knowing how to support > the semantics of the newer interface. In the second case, the library ideally should assume that the missing struct members are not specified and behave as the corresponding older version. In the third case, the app can support older libclang versions by passing successively smaller structs until libclang returns a valid `CIndex`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139774/new/ https://reviews.llvm.org/D139774 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits