================ @@ -358,3 +358,46 @@ Complete example code .. _Index.h: https://github.com/llvm/llvm-project/blob/main/clang/include/clang-c/Index.h + +.. _Stability: + +ABI and API Stability +--------------------- + +The C interfaces in libclang are intended to be relatively stable. This allows +a programmer to use libclang without having to worry as much about Clang +upgrades breaking existing code. However, the library is not unchanging. For +example, the library will gain new interfaces over time as needs arise, +existing APIs may be deprecated for eventual removal, etc. Also, the underlying +implementation of the facilities by Clang may change behavior as bugs are +fixed, features get implemented, etc. + +The library should be ABI and API stable over time, but ABI- and API-breaking +changes can happen in the following situations: + +* Adding new enumerator to an enumeration (can be ABI-breaking in C++). +* Removing an explicitly deprecated API after a suitably long deprecation + period. +* Uses of implementation details, such names or comments that say something is + "private", "reserved", "internal", etc. ---------------- DeinAlptraum wrote:
Is this list meant to be exhaustive? If not, perhaps the wording should be changed. If so, perhaps the case of bugs should be added? I'm coming only from the Python-bindings perspective, but we did have a number of "potentially breaking changes" over the last two releases, although they are expected to have very small impact. See [LLVM 19](https://releases.llvm.org/19.1.0/tools/clang/docs/ReleaseNotes.html#clang-python-bindings-potentially-breaking-changes) and [LLVM 20](https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html#clang-python-bindings-potentially-breaking-changes). Examples include changing the values of enum variants because they were duplicated, and other behaviors that are obviously (benign) bugs https://github.com/llvm/llvm-project/pull/141657 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits