[Lldb-commits] [PATCH] D45348: Don't return error for settings set .experimental. settings that are absent

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 6 02:07:22 PDT 2018

labath added inline comments.

Comment at: packages/Python/lldbsuite/test/settings/TestSettings.py:544-545
+        # the actual name and via .experimental.
+        cmdinterp.HandleCommand("settings set target.arg0 first-value", result)
+        self.assertEqual(result.Succeeded(), True)
+        cmdinterp.HandleCommand("settings show target.arg0", result)
Isn't this basically what `self.expect` would do (only with better logging and error messages)?

Comment at: source/Interpreter/OptionValueProperties.cpp:210-215
+  llvm::SmallVector<llvm::StringRef, 8> components;
+  name.split(components, '.');
+  bool name_contains_experimental = false;
+  for (const auto &part : components)
+    if (Properties::IsSettingExperimental(part))
+      name_contains_experimental = true;
Not a big deal, but I would expect that the magicness of `experimental` would kick in only for the components which are come after `experimental` keyword.
So something like `target.experimental.non-existant-setting` should be subject to the magic behavior, but `target.non-existant-setting.experimental.foo` should not (?)



More information about the lldb-commits mailing list