|
|
|
@ -2197,7 +2197,6 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
@@ -2197,7 +2197,6 @@ 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(); |
|
|
|
@ -2213,7 +2212,6 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
@@ -2213,7 +2212,6 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
|
|
|
|
|
assert (!FTInfo.isNull()); |
|
|
|
|
|
|
|
|
|
ParamStartLoc = FTInfo.getLParenLoc(); |
|
|
|
|
ParamEndLoc = FTInfo.getRParenLoc(); |
|
|
|
|
ResultLoc = FTInfo.getReturnLoc().getLocStart(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2222,17 +2220,7 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
@@ -2222,17 +2220,7 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, Function* F,
|
|
|
|
|
if (ResultLoc.isValid()) |
|
|
|
|
BeginLoc = ResultLoc; |
|
|
|
|
|
|
|
|
|
// For some weird reason 'kw_const' doesn't work; Clang considers the 'const' a 'raw_identifier'
|
|
|
|
|
clang::SourceLocation EndLoc = Lexer::findLocationAfterToken( |
|
|
|
|
ParamEndLoc, tok::TokenKind::raw_identifier, C->getSourceManager(), C->getLangOpts(), |
|
|
|
|
/*SkipTrailingWhitespaceAndNewLine=*/true); |
|
|
|
|
|
|
|
|
|
if (EndLoc.isValid()) |
|
|
|
|
EndLoc = EndLoc.getLocWithOffset(/*Offset=*/-1); |
|
|
|
|
else |
|
|
|
|
EndLoc = ParamEndLoc; |
|
|
|
|
|
|
|
|
|
clang::SourceRange Range(BeginLoc, EndLoc); |
|
|
|
|
clang::SourceRange Range(BeginLoc, FD->getLocEnd()); |
|
|
|
|
|
|
|
|
|
std::string Sig; |
|
|
|
|
if (GetDeclText(Range, Sig)) |
|
|
|
|