[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 22 16:44:07 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 2e0506f83bfde6db93454bdf28e4a71c160d4f5b 642525847da7d874a127f94f155fd738e3d78196 --extensions cpp -- lldb/examples/formatter-bytecode/test/MyOptional.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/examples/formatter-bytecode/test/MyOptional.cpp b/lldb/examples/formatter-bytecode/test/MyOptional.cpp
index 54fe7f5ccb..abba34439d 100644
--- a/lldb/examples/formatter-bytecode/test/MyOptional.cpp
+++ b/lldb/examples/formatter-bytecode/test/MyOptional.cpp
@@ -1,22 +1,22 @@
// A bare-bones llvm::Optional reimplementation.
-template<typename T> struct MyOptionalStorage {
+template <typename T> struct MyOptionalStorage {
MyOptionalStorage(T val) : value(val), hasVal(true) {}
MyOptionalStorage() {}
T value;
bool hasVal = false;
};
-template<typename T> struct MyOptional {
+template <typename T> struct MyOptional {
MyOptionalStorage<T> Storage;
MyOptional(T val) : Storage(val) {}
MyOptional() {}
- T& operator*() { return Storage.value; }
+ T &operator*() { return Storage.value; }
};
void stop() {}
-int main(int argc, char** argv) {
+int main(int argc, char **argv) {
MyOptional<int> x, y = 42;
stop(); // break here
return *y;
``````````
</details>
https://github.com/llvm/llvm-project/pull/113398
More information about the lldb-commits
mailing list