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

Krasimir Georgiev via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 01:13:26 PST 2017


Author: krasimir
Date: Wed Mar  8 03:13:25 2017
New Revision: 297265

URL: http://llvm.org/viewvc/llvm-project?rev=297265&view=rev
Log:
[clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about std::function copying; NFC

Modified:
    cfe/trunk/lib/Format/Format.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=297265&r1=297264&r2=297265&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Mar  8 03:13:25 2017
@@ -1552,8 +1552,8 @@ inline bool isHeaderDeletion(const tooli
 // 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,




More information about the cfe-commits mailing list