summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-05-30 12:41:19 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-05-30 12:41:19 +0000
commit370f922dcd196f41f323a97bcd81dcc903dab7ba (patch)
tree1e038c8dffe904420861e2274017d9bcc29bd8c4
parent9fd1f2caba7500fa5c3d4c35d1ec9f3c9dbf4da3 (diff)
[clangd] clang-format the source code. NFC
-rw-r--r--clang-tools-extra/clangd/AST.h2
-rw-r--r--clang-tools-extra/clangd/Quality.h4
-rw-r--r--clang-tools-extra/clangd/Trace.h2
-rw-r--r--clang-tools-extra/clangd/URI.h5
-rw-r--r--clang-tools-extra/clangd/index/CanonicalIncludes.h2
-rw-r--r--clang-tools-extra/clangd/index/Index.h42
-rw-r--r--clang-tools-extra/clangd/index/SymbolYAML.h2
7 files changed, 29 insertions, 30 deletions
diff --git a/clang-tools-extra/clangd/AST.h b/clang-tools-extra/clangd/AST.h
index b8cf0746c68..aeeb22d2660 100644
--- a/clang-tools-extra/clangd/AST.h
+++ b/clang-tools-extra/clangd/AST.h
@@ -26,7 +26,7 @@ namespace clangd {
///
/// The returned location is usually the spelling location where the name of the
/// decl occurs in the code.
-SourceLocation findNameLoc(const clang::Decl* D);
+SourceLocation findNameLoc(const clang::Decl *D);
} // namespace clangd
} // namespace clang
diff --git a/clang-tools-extra/clangd/Quality.h b/clang-tools-extra/clangd/Quality.h
index 1d5a580bbad..a67af4cd7b7 100644
--- a/clang-tools-extra/clangd/Quality.h
+++ b/clang-tools-extra/clangd/Quality.h
@@ -116,8 +116,8 @@ private:
Compare Greater;
};
-/// Returns a string that sorts in the same order as (-Score, Tiebreak), for LSP.
-/// (The highest score compares smallest so it sorts at the top).
+/// Returns a string that sorts in the same order as (-Score, Tiebreak), for
+/// LSP. (The highest score compares smallest so it sorts at the top).
std::string sortText(float Score, llvm::StringRef Tiebreak = "");
} // namespace clangd
diff --git a/clang-tools-extra/clangd/Trace.h b/clang-tools-extra/clangd/Trace.h
index 55a31ada4bf..131ace55908 100644
--- a/clang-tools-extra/clangd/Trace.h
+++ b/clang-tools-extra/clangd/Trace.h
@@ -45,7 +45,7 @@ public:
// The Context returned by beginSpan is active, but Args is not ready.
// Tracers should not override this unless they need to observe strict
// per-thread nesting. Instead they should observe context destruction.
- virtual void endSpan() {};
+ virtual void endSpan(){};
/// Called for instant events.
virtual void instant(llvm::StringRef Name, json::obj &&Args) = 0;
diff --git a/clang-tools-extra/clangd/URI.h b/clang-tools-extra/clangd/URI.h
index ff4bc2d31fb..112264f7102 100644
--- a/clang-tools-extra/clangd/URI.h
+++ b/clang-tools-extra/clangd/URI.h
@@ -107,9 +107,8 @@ public:
/// Returns the include path of the file (e.g. <path>, "path"), which can be
/// #included directly. See URI::includeSpelling for details.
- virtual llvm::Expected<std::string>
- getIncludeSpelling(const URI& U) const {
- return ""; // no customized include path for this scheme.
+ virtual llvm::Expected<std::string> getIncludeSpelling(const URI &U) const {
+ return ""; // no customized include path for this scheme.
}
};
diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.h b/clang-tools-extra/clangd/index/CanonicalIncludes.h
index 791136b437a..a2fdb04ec7b 100644
--- a/clang-tools-extra/clangd/index/CanonicalIncludes.h
+++ b/clang-tools-extra/clangd/index/CanonicalIncludes.h
@@ -90,4 +90,4 @@ void addSystemHeadersMapping(CanonicalIncludes *Includes);
} // namespace clangd
} // namespace clang
-#endif //LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_HEADERMAPCOLLECTOR_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_HEADERMAPCOLLECTOR_H
diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h
index e416dbfddd8..b406097da85 100644
--- a/clang-tools-extra/clangd/index/Index.h
+++ b/clang-tools-extra/clangd/index/Index.h
@@ -228,27 +228,27 @@ public:
// SymbolSlab::Builder is a mutable container that can 'freeze' to SymbolSlab.
// The frozen SymbolSlab will use less memory.
class Builder {
- public:
- // Adds a symbol, overwriting any existing one with the same ID.
- // This is a deep copy: underlying strings will be owned by the slab.
- void insert(const Symbol& S);
-
- // Returns the symbol with an ID, if it exists. Valid until next insert().
- const Symbol* find(const SymbolID &ID) {
- auto I = SymbolIndex.find(ID);
- return I == SymbolIndex.end() ? nullptr : &Symbols[I->second];
- }
-
- // Consumes the builder to finalize the slab.
- SymbolSlab build() &&;
-
- private:
- llvm::BumpPtrAllocator Arena;
- // Intern table for strings. Contents are on the arena.
- llvm::DenseSet<llvm::StringRef> Strings;
- std::vector<Symbol> Symbols;
- // Values are indices into Symbols vector.
- llvm::DenseMap<SymbolID, size_t> SymbolIndex;
+ public:
+ // Adds a symbol, overwriting any existing one with the same ID.
+ // This is a deep copy: underlying strings will be owned by the slab.
+ void insert(const Symbol &S);
+
+ // Returns the symbol with an ID, if it exists. Valid until next insert().
+ const Symbol *find(const SymbolID &ID) {
+ auto I = SymbolIndex.find(ID);
+ return I == SymbolIndex.end() ? nullptr : &Symbols[I->second];
+ }
+
+ // Consumes the builder to finalize the slab.
+ SymbolSlab build() &&;
+
+ private:
+ llvm::BumpPtrAllocator Arena;
+ // Intern table for strings. Contents are on the arena.
+ llvm::DenseSet<llvm::StringRef> Strings;
+ std::vector<Symbol> Symbols;
+ // Values are indices into Symbols vector.
+ llvm::DenseMap<SymbolID, size_t> SymbolIndex;
};
private:
diff --git a/clang-tools-extra/clangd/index/SymbolYAML.h b/clang-tools-extra/clangd/index/SymbolYAML.h
index ed17cbf608b..9d16cc5d4f4 100644
--- a/clang-tools-extra/clangd/index/SymbolYAML.h
+++ b/clang-tools-extra/clangd/index/SymbolYAML.h
@@ -40,7 +40,7 @@ std::string SymbolToYAML(Symbol Sym);
// Convert symbols to a YAML-format string.
// The YAML result is safe to concatenate if you have multiple symbol slabs.
-void SymbolsToYAML(const SymbolSlab& Symbols, llvm::raw_ostream &OS);
+void SymbolsToYAML(const SymbolSlab &Symbols, llvm::raw_ostream &OS);
} // namespace clangd
} // namespace clang