Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 64d877b

Browse files
committed
Only check for CXCursor_ExceptionSpecificationKind for libclang versions>=5.0.0
1 parent 01e32cd commit 64d877b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/source_clang.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,10 +1439,12 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
14391439

14401440
if(clang_CXXMethod_isConst(cursor.cx_cursor))
14411441
specifier+=" const";
1442-
1442+
1443+
#if CINDEX_VERSION_MAJOR>0 || (CINDEX_VERSION_MAJOR==0 && CINDEX_VERSION_MINOR>=43)
14431444
auto exception_specification_kind=static_cast<CXCursor_ExceptionSpecificationKind>(clang_getCursorExceptionSpecificationType(cursor.cx_cursor));
14441445
if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept)
14451446
specifier+=" noexcept";
1447+
#endif
14461448
}
14471449

14481450
auto name=cursor.get_spelling();

0 commit comments

Comments
 (0)