From 01e32cd3e2257c636a37360d96957a52fa5229c0 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 20 May 2018 15:35:17 +0200 Subject: [PATCH] Fixes #380: Implement Method now includes noexcept specifier if present --- src/source_clang.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/source_clang.cc b/src/source_clang.cc index 06917ad..b892f81 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -1438,7 +1438,11 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file result+=' '; if(clang_CXXMethod_isConst(cursor.cx_cursor)) - specifier=" const"; + specifier+=" const"; + + auto exception_specification_kind=static_cast(clang_getCursorExceptionSpecificationType(cursor.cx_cursor)); + if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept) + specifier+=" noexcept"; } auto name=cursor.get_spelling();