forked from OSchip/llvm-project
[clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself
llvm-svn: 329873
This commit is contained in:
parent
8f296478eb
commit
dfaa021e99
|
@ -11,6 +11,7 @@
|
|||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/ASTMatchers/ASTMatchFinder.h"
|
||||
#include "clang/ASTMatchers/ASTMatchers.h"
|
||||
#include "clang/Lex/Lexer.h"
|
||||
#include "clang/Tooling/FixIt.h"
|
||||
|
||||
using namespace clang;
|
||||
|
@ -419,8 +420,8 @@ void UseAutoCheck::replaceExpr(
|
|||
SourceRange Range(Loc.getSourceRange());
|
||||
|
||||
if (MinTypeNameLength != 0 &&
|
||||
tooling::fixit::getText(Loc.getSourceRange(), FirstDecl->getASTContext())
|
||||
.size() < MinTypeNameLength)
|
||||
Lexer::MeasureTokenLength(Loc.getLocStart(), Context->getSourceManager(),
|
||||
getLangOpts()) < MinTypeNameLength)
|
||||
return;
|
||||
|
||||
auto Diag = diag(Range.getBegin(), Message);
|
||||
|
|
Loading…
Reference in New Issue