diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index eadfb864..d490dfd3 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -2142,6 +2142,7 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F, F->Mangled = Mangled; clang::SourceLocation ParamStartLoc = FD->getLocStart(); + clang::SourceLocation ParamEndLoc = FD->getLocEnd(); clang::SourceLocation ResultLoc; auto FTSI = FD->getTypeSourceInfo(); @@ -2156,12 +2157,13 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F, auto FTInfo = FTL.castAs(); assert (!FTInfo.isNull()); - ParamStartLoc = FTInfo.getRParenLoc(); + ParamStartLoc = FTInfo.getLParenLoc(); + ParamEndLoc = FTInfo.getRParenLoc(); ResultLoc = FTInfo.getReturnLoc().getLocStart(); } } - clang::SourceRange Range(FD->getLocStart(), ParamStartLoc); + clang::SourceRange Range(FD->getLocStart(), ParamEndLoc); if (ResultLoc.isValid()) Range.setBegin(ResultLoc);