From: Krasimir Georgiev Date: Wed, 8 Mar 2017 09:13:25 +0000 (+0000) Subject: [clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about std::function... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8c6b08bf7894896e79539fb63203a0fc70ac1a0;p=clang [clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about std::function copying; NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297265 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 8de3355bd5..7431feb8f5 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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 - GetOffsetAfterSequense) { + llvm::function_ref + GetOffsetAfterSequence) { std::unique_ptr 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 "# ". If it is,