Browse Source

Only check for CXCursor_ExceptionSpecificationKind for libclang versions>=5.0.0

merge-requests/382/head
eidheim 8 years ago
parent
commit
64d877b6eb
  1. 4
      src/source_clang.cc

4
src/source_clang.cc

@ -1439,10 +1439,12 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
if(clang_CXXMethod_isConst(cursor.cx_cursor)) if(clang_CXXMethod_isConst(cursor.cx_cursor))
specifier+=" const"; specifier+=" const";
#if CINDEX_VERSION_MAJOR>0 || (CINDEX_VERSION_MAJOR==0 && CINDEX_VERSION_MINOR>=43)
auto exception_specification_kind=static_cast<CXCursor_ExceptionSpecificationKind>(clang_getCursorExceptionSpecificationType(cursor.cx_cursor)); auto exception_specification_kind=static_cast<CXCursor_ExceptionSpecificationKind>(clang_getCursorExceptionSpecificationType(cursor.cx_cursor));
if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept) if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept)
specifier+=" noexcept"; specifier+=" noexcept";
#endif
} }
auto name=cursor.get_spelling(); auto name=cursor.get_spelling();

Loading…
Cancel
Save