diff --git a/include/cppast/libclang_parser.hpp b/include/cppast/libclang_parser.hpp index 6f206ed..e8dad1e 100644 --- a/include/cppast/libclang_parser.hpp +++ b/include/cppast/libclang_parser.hpp @@ -182,8 +182,9 @@ private: /// /// \returns If the database contains a configuration for the given file, returns that /// configuration. Otherwise removes the file extension of the file and tries the same procedure for -/// common C++ header and source file extensions. \notes This function is intended to be used as the -/// basis for a `get_config` function of +/// common C++ header and source file extensions. +/// +/// \notes This function is intended to be used as the basis for a `get_config` function of /// [cppast::parse_files](standardese://cppast::parse_files_basic/). type_safe::optional find_config_for( const libclang_compilation_database& database, std::string file_name); @@ -194,6 +195,9 @@ class libclang_parser final : public parser public: using config = libclang_compile_config; + /// The version of libclang used. + static int libclang_minor_version(); + /// \effects Creates a parser using the default logger. libclang_parser(); diff --git a/src/libclang/libclang_parser.cpp b/src/libclang/libclang_parser.cpp index bb17531..f8ed00b 100644 --- a/src/libclang/libclang_parser.cpp +++ b/src/libclang/libclang_parser.cpp @@ -434,6 +434,11 @@ type_safe::optional cppast::find_config_for( return type_safe::nullopt; } +int cppast::libclang_parser::libclang_minor_version() +{ + return CINDEX_VERSION_MINOR; +} + struct libclang_parser::impl { detail::cxindex index; @@ -553,7 +558,6 @@ unsigned get_line_no(const CXCursor& cursor) return line; } } // namespace - std::unique_ptr libclang_parser::do_parse(const cpp_entity_index& idx, std::string path, const compile_config& c) const try {