mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-18 08:51:52 +08:00
clang-tidy module: fix offset issue with last string concat operand
This commit is contained in:
@@ -156,7 +156,8 @@ void StringConcatenationUseCmstrcatCheck::issueCorrection(
|
||||
ExprNode = *It;
|
||||
|
||||
StringRef LastToken = Lexer::getSourceText(
|
||||
CharSourceRange::getTokenRange(ExprNode->getArg(1)->getSourceRange()),
|
||||
CharSourceRange::getTokenRange(
|
||||
ExprNode->getArg(1)->getSourceRange().getEnd()),
|
||||
Result.Context->getSourceManager(), Result.Context->getLangOpts());
|
||||
FixIts.push_back(FixItHint::CreateInsertion(
|
||||
ExprNode->getEndLoc().getLocWithOffset(LastToken.str().size()), ")"));
|
||||
|
Reference in New Issue
Block a user