[clangd] Clean up LSP structs around configuration. NFC, no protocol changes.

 - align struct names/comments with LSP, remove redundant "clangd" prefixes.
 - don't map config structs as Optional<> when their presence/absence
   doesn't signal anything and all fields must have sensible "absent" values
 - be more lax around parsing of 'any'-typed messages

llvm-svn: 345235
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index d489268..1bb5961 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -663,20 +663,22 @@
          O.map("compilationCommand", CDbUpdate.compilationCommand);
 }
 
-bool fromJSON(const json::Value &Params,
-              ClangdConfigurationParamsChange &CCPC) {
+bool fromJSON(const json::Value &Params, ConfigurationSettings &S) {
   json::ObjectMapper O(Params);
-  return O &&
-         O.map("compilationDatabaseChanges", CCPC.compilationDatabaseChanges);
+  if (!O)
+    return true; // 'any' type in LSP.
+  O.map("compilationDatabaseChanges", S.compilationDatabaseChanges);
+  return true;
 }
 
-bool fromJSON(const json::Value &Params, ClangdInitializationOptions &Opts) {
-  if (!fromJSON(Params, Opts.ParamsChange)) {
-    return false;
-  }
-
+bool fromJSON(const json::Value &Params, InitializationOptions &Opts) {
   json::ObjectMapper O(Params);
-  return O && O.map("compilationDatabasePath", Opts.compilationDatabasePath);
+  if (!O)
+    return true; // 'any' type in LSP.
+
+  fromJSON(Params, Opts.ConfigSettings);
+  O.map("compilationDatabasePath", Opts.compilationDatabasePath);
+  return true;
 }
 
 bool fromJSON(const json::Value &Params, ReferenceParams &R) {