[clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about std::function copying; NFC

llvm-svn: 297265
This commit is contained in:
Krasimir Georgiev 2017-03-08 09:13:25 +00:00
parent bf5061b18c
commit 317c539e19
1 changed files with 3 additions and 3 deletions

View File

@ -1552,8 +1552,8 @@ inline bool isHeaderDeletion(const tooling::Replacement &Replace) {
// tokens and returns an offset after the sequence.
unsigned getOffsetAfterTokenSequence(
StringRef FileName, StringRef Code, const FormatStyle &Style,
std::function<unsigned(const SourceManager &, Lexer &, Token &)>
GetOffsetAfterSequense) {
llvm::function_ref<unsigned(const SourceManager &, Lexer &, Token &)>
GetOffsetAfterSequence) {
std::unique_ptr<Environment> Env =
Environment::CreateVirtualEnvironment(Code, FileName, /*Ranges=*/{});
const SourceManager &SourceMgr = Env->getSourceManager();
@ -1562,7 +1562,7 @@ unsigned getOffsetAfterTokenSequence(
Token Tok;
// Get the first token.
Lex.LexFromRawLexer(Tok);
return GetOffsetAfterSequense(SourceMgr, Lex, Tok);
return GetOffsetAfterSequence(SourceMgr, Lex, Tok);
}
// Check if a sequence of tokens is like "#<Name> <raw_identifier>". If it is,