clang-format
authorKadir Cetinkaya <kadircet@google.com>
Thu, 15 Nov 2018 10:31:15 +0000 (10:31 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Thu, 15 Nov 2018 10:31:15 +0000 (10:31 +0000)
llvm-svn: 346939

clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/unittests/clangd/BackgroundIndexTests.cpp

index 69399ba..a972454 100644 (file)
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/SHA1.h"
+#include <memory>
+#include <queue>
 #include <random>
 #include <string>
-#include <queue>
-#include <memory>
 
 using namespace llvm;
 namespace clang {
index c79184d..ee8aa67 100644 (file)
@@ -82,7 +82,7 @@ TEST(BackgroundIndexTest, ShardStorageTest) {
   class MemoryShardStorage : public ShardStorage {
     mutable std::mutex StorageMu;
     llvm::StringMap<std::string> &Storage;
-    size_tCacheHits;
+    size_t &CacheHits;
 
   public:
     MemoryShardStorage(llvm::StringMap<std::string> &Storage, size_t &CacheHits)
@@ -103,7 +103,7 @@ TEST(BackgroundIndexTest, ShardStorageTest) {
         return llvm::make_error<llvm::StringError>(
             "Shard not found.", llvm::inconvertibleErrorCode());
       auto IndexFile = readIndexFile(Storage[ShardIdentifier]);
-      if(!IndexFile)
+      if (!IndexFile)
         return IndexFile;
       CacheHits++;
       return IndexFile;