[Lldb-commits] [lldb] [lldb] Support alternatives for scope format entries (PR #137751)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 30 02:21:14 PDT 2025


================
@@ -8,16 +8,36 @@
 
 #include "lldb/Core/FormatEntity.h"
 #include "lldb/Utility/Status.h"
-
+#include "lldb/Utility/StreamString.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Testing/Support/Error.h"
 #include "gtest/gtest.h"
 
 using namespace lldb_private;
+using namespace llvm;
 
 using Definition = FormatEntity::Entry::Definition;
 using Entry = FormatEntity::Entry;
 
-TEST(FormatEntityTest, DefinitionConstructionNameAndType) {
+namespace {
+class FormatEntityTest : public ::testing::Test {
+public:
+  Expected<std::string> Format(StringRef format_str) {
----------------
labath wrote:

As there's (still) no state, you could just make this a static helper function.

```suggestion
static  Expected<std::string> Format(StringRef format_str) {
```

https://github.com/llvm/llvm-project/pull/137751


More information about the lldb-commits mailing list