summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2017-03-08 09:13:25 +0000
committerKrasimir Georgiev <krasimir@google.com>2017-03-08 09:13:25 +0000
commit317c539e19120e54771bdd23edc41a1c286dee60 (patch)
tree082d3b3a714d0de637e40717913b5246a21d3763 /clang/lib/Format/Format.cpp
parentbf5061b18cb4f1d055de7de6a961e45b6509dea9 (diff)
downloadbcm5719-llvm-317c539e19120e54771bdd23edc41a1c286dee60.tar.gz
bcm5719-llvm-317c539e19120e54771bdd23edc41a1c286dee60.zip
[clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about std::function copying; NFC
llvm-svn: 297265
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 8de3355bd5f..7431feb8f59 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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<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,
OpenPOWER on IntegriCloud