diff --git a/lib/ffi/clang/version.rb b/lib/ffi/clang/version.rb index 5134433..2ded82f 100644 --- a/lib/ffi/clang/version.rb +++ b/lib/ffi/clang/version.rb @@ -10,6 +10,6 @@ module FFI # @namespace module Clang - VERSION = "0.15.1" + VERSION = "0.15.2" end end diff --git a/readme.md b/readme.md index be22d48..92dd423 100644 --- a/readme.md +++ b/readme.md @@ -41,78 +41,6 @@ For example, to use a specific LLVM installation: Please see the [project releases](https://socketry.github.io/ffi-clang/releases/index) for all releases. -### v0.15.1 - - - Use `-isystem` instead of `-I` for auto-discovered MSVC system include paths so that `in_system_header?` correctly identifies system headers. - -### v0.15.0 - - - [Platform Support](https://socketry.github.io/ffi-clang/releases/index#platform-support) - - [Breaking Changes](https://socketry.github.io/ffi-clang/releases/index#breaking-changes) - - [Bug Fixes](https://socketry.github.io/ffi-clang/releases/index#bug-fixes) - - [New APIs](https://socketry.github.io/ffi-clang/releases/index#new-apis) - -### v0.14.0 - - - Helper method that returns a cursor's FFI::Clang::Cursor\#qualified\_display\_name. - - Add release notes and documentation tooling. - - Modernize code and achieve 100% documentation coverage. - - Update minimum Ruby version to 3.2. - -### v0.13.0 - - - Add support for `clang_Type_getNamedType`. (\#90) - - Try clang v18 + add Ruby v3.4 to test matrix. (\#91) - -### v0.12.0 - - - Prefer `LIBCLANG` and `LLVM_CONFIG` overrides over Xcode. (\#88) - -### v0.11.0 - - - Restore `visit_children` method. Fixes \#82. (\#84) - - Expose Clang's exception specification API. (\#87) - - Support iterating over `Type::Function` args and expose `Lib.get_non_reference_type`. (\#85) - - Fix qualified name. (\#83) - - Update clang version. (\#86) - -### v0.10.0 - - - Expose libclang's anonymous methods. (\#79) - - Use Enumerable. (\#80) - - Split `FFI::Clang::Type` into a number of more cohesive subclasses inheriting from `FFI::Clang::Types::Type`. (\#81) - -### v0.9.0 - - - Remove duplicate mapping of `clang_getEnumDeclIntegerType`. (\#67) - - Update bitmask options based on enums to always be an array of symbols. (\#69) - - Add support for `parse_translation_unit2` API. (\#70) - - Cursor improvements, Type improvements, Printing support. (\#72) - - Fix finalizer exception in `FFI::Clang::CodeCompletion::Results`. (\#74) - - Fix Clang 16 compatibility. (\#76) - - Cursor location methods. (\#78) - -### v0.8.0 - - - Modernize gem. (\#58) - - Test on clang 5.0+. (\#59) - - Fix `CXCursor_TranslationUnit` enum value to 350. (\#61) - - Add `Cursor#hash` and `Cursor#eql?`. (\#62) - - Set `cursor_translation_unit` enum value based on the Clang version. (\#64) - - Add various C++ introspection methods. (\#66) - -### v0.7.0 - - - Fix incorrect return type of `clang_getTranslationUnitSpelling`. - - Fix `compilation_database_spec`. - - Fix libclang lookup for Xcode. - - Fix warning on class re-definition. - - Update cursor kinds. - - Find `libclang.dll` under Windows. - - Allow retrieval of list of references from a Cursor. - - Implement libclang `findReferencesInFile` functionality. - - Allow `TranslationUnit#file` to return the main file. - ## Contributing We welcome contributions to this project. diff --git a/releases.md b/releases.md index 2018272..5b69cf4 100644 --- a/releases.md +++ b/releases.md @@ -1,5 +1,19 @@ # Releases +## v0.15.2 + +### New APIs + + - Add {ruby FFI::Clang::Types::Type\#intrinsic_type}, which strips references and follows pointer indirection until reaching a non-pointer type and then drops cv-qualifiers. This mirrors Rice's `intrinsic_type` metafunction and is useful for skip-list and bindability checks that want to ask "what does this type ultimately denote?" without dispatching on every reference/pointer/cv combination separately. + - Add {ruby FFI::Clang::Types::Type\#reference?}, a one-liner predicate over `:type_lvalue_ref` and `:type_rvalue_ref`. Pairs with the existing {ruby FFI::Clang::Types::Type\#non_reference_type} unwrap so callers can ask "is this a reference?" without repeating the kind check. + - Add {ruby FFI::Clang::Cursor\#copyable?} and {ruby FFI::Clang::Types::Type\#copyable?}. The cursor predicate returns true when a class/struct has an accessible copy constructor (none deleted or private) and every base class is copyable; it returns true on non-class cursors so callers can ask uniformly without dispatching on kind. The type wrapper strips references first. + - {ruby FFI::Clang::Types::Type\#fully_qualified_name} now works on libclang versions earlier than 21 via a Ruby shim that composes existing libclang APIs (declaration, qualified_name, template arguments, pointer/array/reference unwrapping). On libclang 21+ the public method continues to dispatch to `clang_getFullyQualifiedName`. Closes [\#131](https://github.com/socketry/ffi-clang/issues/131). + +### Bug Fixes + + - Guard {ruby FFI::Clang::Types::Type\#unqualified_type} against `:type_invalid` input. `clang_getUnqualifiedType` dereferences the underlying `QualType` without a null check and segfaults libclang on invalid types; the wrapper now returns the invalid type unchanged instead of entering libclang. + - Guard {ruby FFI::Clang::Types::Type\#non_reference_type} against `:type_invalid` input. Same shape of bug as the `unqualified_type` fix above; same shape of fix. + ## v0.15.1 - Use `-isystem` instead of `-I` for auto-discovered MSVC system include paths so that `in_system_header?` correctly identifies system headers.