[clangd] clang-format the source code. NFC

llvm-svn: 320577
This commit is contained in:
Ilya Biryukov 2017-12-13 12:53:16 +00:00
parent 940901e8b1
commit 5a85b8e6dd
5 changed files with 15 additions and 24 deletions

View File

@ -23,25 +23,18 @@ ArrayRef<uint8_t> toArrayRef(StringRef S) {
SymbolID::SymbolID(llvm::StringRef USR)
: HashValue(llvm::SHA1::hash(toArrayRef(USR))) {}
SymbolSlab::const_iterator SymbolSlab::begin() const {
return Symbols.begin();
}
SymbolSlab::const_iterator SymbolSlab::begin() const { return Symbols.begin(); }
SymbolSlab::const_iterator SymbolSlab::end() const {
return Symbols.end();
}
SymbolSlab::const_iterator SymbolSlab::end() const { return Symbols.end(); }
SymbolSlab::const_iterator SymbolSlab::find(const SymbolID &SymID) const {
return Symbols.find(SymID);
}
void SymbolSlab::freeze() {
Frozen = true;
}
void SymbolSlab::freeze() { Frozen = true; }
void SymbolSlab::insert(Symbol S) {
assert(!Frozen &&
"Can't insert a symbol after the slab has been frozen!");
assert(!Frozen && "Can't insert a symbol after the slab has been frozen!");
Symbols[S.ID] = std::move(S);
}

View File

@ -94,9 +94,7 @@ bool SymbolCollector::handleDeclOccurence(
return true;
}
void SymbolCollector::finish() {
Symbols.freeze();
}
void SymbolCollector::finish() { Symbols.freeze(); }
} // namespace clangd
} // namespace clang

View File

@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
#include "ClangdServer.h"
#include "Compiler.h"
#include "Matchers.h"
#include "Context.h"
#include "Matchers.h"
#include "Protocol.h"
#include "TestFS.h"
#include "gmock/gmock.h"

View File

@ -8,25 +8,25 @@
//===----------------------------------------------------------------------===//
#include "index/SymbolCollector.h"
#include "clang/Index/IndexingAction.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/VirtualFileSystem.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Index/IndexingAction.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/MemoryBuffer.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <memory>
#include <string>
using testing::UnorderedElementsAre;
using testing::Eq;
using testing::Field;
using testing::UnorderedElementsAre;
// GMock helpers for matching Symbol.
MATCHER_P(QName, Name, "") { return arg.second.QualifiedName == Name; }