[clangd] Use default format style and fallback style. NFC
authorEric Liu <ioeric@google.com>
Tue, 3 Jul 2018 14:51:23 +0000 (14:51 +0000)
committerEric Liu <ioeric@google.com>
Tue, 3 Jul 2018 14:51:23 +0000 (14:51 +0000)
llvm-svn: 336203

clang-tools-extra/clangd/CodeComplete.cpp

index 248c96b..7e07c3f 100644 (file)
@@ -955,10 +955,10 @@ public:
     CodeCompleteResult Output;
     auto RecorderOwner = llvm::make_unique<CompletionRecorder>(Opts, [&]() {
       assert(Recorder && "Recorder is not set");
-      // FIXME(ioeric): needs more consistent style support in clangd server.
       auto Style =
-          format::getStyle("file", SemaCCInput.FileName, "LLVM",
-                           SemaCCInput.Contents, SemaCCInput.VFS.get());
+          format::getStyle(format::DefaultFormatStyle, SemaCCInput.FileName,
+                           format::DefaultFallbackStyle, SemaCCInput.Contents,
+                           SemaCCInput.VFS.get());
       if (!Style) {
         log("Failed to get FormatStyle for file" + SemaCCInput.FileName + ": " +
             llvm::toString(Style.takeError()) + ". Fallback is LLVM style.");