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. 2
      src/source_clang.cc

2
src/source_clang.cc

@ -1440,9 +1440,11 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
if(clang_CXXMethod_isConst(cursor.cx_cursor))
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));
if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept)
specifier+=" noexcept";
#endif
}
auto name=cursor.get_spelling();

Loading…
Cancel
Save