[clang-tools-extra] r333537 - [clangd] clang-format the source code. NFC

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Wed May 30 05:41:19 PDT 2018


Author: ibiryukov
Date: Wed May 30 05:41:19 2018
New Revision: 333537

URL: http://llvm.org/viewvc/llvm-project?rev=333537&view=rev
Log:
[clangd] clang-format the source code. NFC

Modified:
    clang-tools-extra/trunk/clangd/AST.h
    clang-tools-extra/trunk/clangd/Quality.h
    clang-tools-extra/trunk/clangd/Trace.h
    clang-tools-extra/trunk/clangd/URI.h
    clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h
    clang-tools-extra/trunk/clangd/index/Index.h
    clang-tools-extra/trunk/clangd/index/SymbolYAML.h

Modified: clang-tools-extra/trunk/clangd/AST.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/AST.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/AST.h (original)
+++ clang-tools-extra/trunk/clangd/AST.h Wed May 30 05:41:19 2018
@@ -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

Modified: clang-tools-extra/trunk/clangd/Quality.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Quality.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Quality.h (original)
+++ clang-tools-extra/trunk/clangd/Quality.h Wed May 30 05:41:19 2018
@@ -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

Modified: clang-tools-extra/trunk/clangd/Trace.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Trace.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Trace.h (original)
+++ clang-tools-extra/trunk/clangd/Trace.h Wed May 30 05:41:19 2018
@@ -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;

Modified: clang-tools-extra/trunk/clangd/URI.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/URI.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/URI.h (original)
+++ clang-tools-extra/trunk/clangd/URI.h Wed May 30 05:41:19 2018
@@ -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.
   }
 };
 

Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h (original)
+++ clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h Wed May 30 05:41:19 2018
@@ -90,4 +90,4 @@ void addSystemHeadersMapping(CanonicalIn
 } // namespace clangd
 } // namespace clang
 
-#endif //LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_HEADERMAPCOLLECTOR_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_HEADERMAPCOLLECTOR_H

Modified: clang-tools-extra/trunk/clangd/index/Index.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Index.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/Index.h (original)
+++ clang-tools-extra/trunk/clangd/index/Index.h Wed May 30 05:41:19 2018
@@ -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);
+  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];
-     }
+    // 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() &&;
+    // 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:
+    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:

Modified: clang-tools-extra/trunk/clangd/index/SymbolYAML.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/SymbolYAML.h?rev=333537&r1=333536&r2=333537&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/SymbolYAML.h (original)
+++ clang-tools-extra/trunk/clangd/index/SymbolYAML.h Wed May 30 05:41:19 2018
@@ -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




More information about the cfe-commits mailing list