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

Commit 01e32cd

Browse files
committed
Fixes #380: Implement Method now includes noexcept specifier if present
1 parent 521e563 commit 01e32cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/source_clang.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,11 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
14381438
result+=' ';
14391439

14401440
if(clang_CXXMethod_isConst(cursor.cx_cursor))
1441-
specifier=" const";
1441+
specifier+=" const";
1442+
1443+
auto exception_specification_kind=static_cast<CXCursor_ExceptionSpecificationKind>(clang_getCursorExceptionSpecificationType(cursor.cx_cursor));
1444+
if(exception_specification_kind==CXCursor_ExceptionSpecificationKind_BasicNoexcept)
1445+
specifier+=" noexcept";
14421446
}
14431447

14441448
auto name=cursor.get_spelling();

0 commit comments

Comments
 (0)