Skip to content

Commit 7dc28d7

Browse files
committed
Fix clang-format issues with tests.
1 parent dde59df commit 7dc28d7

File tree

12 files changed

+70
-53
lines changed

12 files changed

+70
-53
lines changed

lldb/test/API/commands/frame/var-dil/basics/BitField/TestFrameVarDILBitField.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import time
1313

14+
1415
class TestFrameVarDILBitField(TestBase):
1516
# If your test case doesn't stress debug info, then
1617
# set this to true. That way it won't be run once for
@@ -19,8 +20,9 @@ class TestFrameVarDILBitField(TestBase):
1920

2021
def test_frame_var(self):
2122
self.build()
22-
lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here",
23-
lldb.SBFileSpec("main.cpp"))
23+
lldbutil.run_to_source_breakpoint(
24+
self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
25+
)
2426

2527
self.runCmd("settings set target.experimental.use-DIL true")
2628
self.expect_var_path("bf.a", value="1023")
@@ -34,5 +36,8 @@ def test_frame_var(self):
3436

3537
# Perform an operation to ensure we actually read the value.
3638
# Address-of is not allowed for bit-fields.
37-
self.expect("frame variable '&bf.a'", error=True,
38-
substrs=["'bf.a' doesn't have a valid address"])
39+
self.expect(
40+
"frame variable '&bf.a'",
41+
error=True,
42+
substrs=["'bf.a' doesn't have a valid address"],
43+
)

lldb/test/API/commands/frame/var-dil/basics/BitField/main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <cstdint>
22

3-
int
4-
main(int argc, char **argv)
5-
{
3+
int main(int argc, char **argv) {
64
enum BitFieldEnum : uint32_t { kZero, kOne };
75

86
struct BitFieldStruct {
@@ -38,7 +36,7 @@ main(int argc, char **argv)
3836
};
3937

4038
uint32_t data = ~0;
41-
AlignedBitFieldStruct abf = (AlignedBitFieldStruct&)data;
39+
AlignedBitFieldStruct abf = (AlignedBitFieldStruct &)data;
4240

4341
return 0; // Set a breakpoint here
4442
}

lldb/test/API/commands/frame/var-dil/basics/Indirection/TestFrameVarDILIndirection.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import time
1313

14+
1415
class TestFrameVarDILIndirection(TestBase):
1516
# If your test case doesn't stress debug info, then
1617
# set this to true. That way it won't be run once for
@@ -19,8 +20,9 @@ class TestFrameVarDILIndirection(TestBase):
1920

2021
def test_frame_var(self):
2122
self.build()
22-
lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here",
23-
lldb.SBFileSpec("main.cpp"))
23+
lldbutil.run_to_source_breakpoint(
24+
self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
25+
)
2426

2527
self.runCmd("settings set target.experimental.use-DIL true")
2628
self.expect_var_path("*p", value="1")
@@ -30,7 +32,15 @@ def test_frame_var(self):
3032
self.expect_var_path("*my_pr", type="int *")
3133
self.expect_var_path("my_pr", type="mypr")
3234

33-
self.expect("frame variable '*1'", error=True,
34-
substrs=["Unexpected token: <'1' (numeric_constant)>"])
35-
self.expect("frame variable '*val'", error=True,
36-
substrs=["dereference failed: not a pointer, reference or array type: (int) val"])
35+
self.expect(
36+
"frame variable '*1'",
37+
error=True,
38+
substrs=["Unexpected token: <'1' (numeric_constant)>"],
39+
)
40+
self.expect(
41+
"frame variable '*val'",
42+
error=True,
43+
substrs=[
44+
"dereference failed: not a pointer, reference or array type: (int) val"
45+
],
46+
)

lldb/test/API/commands/frame/var-dil/basics/Indirection/main.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
int
2-
main(int argc, char **argv)
3-
{
1+
int main(int argc, char **argv) {
42
int val = 1;
5-
int* p = &val;
3+
int *p = &val;
64

7-
typedef int* myp;
5+
typedef int *myp;
86
myp my_p = &val;
97

10-
typedef int*& mypr;
8+
typedef int *&mypr;
119
mypr my_pr = p;
1210

1311
return 0; // Set a breakpoint here

lldb/test/API/commands/frame/var-dil/basics/PointerDereference/TestFrameVarDILPointerDereference.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import time
1313

14+
1415
class TestFrameVarDILPointerDereference(TestBase):
1516
NO_DEBUG_INFO_TESTCASE = True
1617

@@ -26,5 +27,8 @@ def test_frame_var(self):
2627
self.expect_var_path("&pp_void0[2]", type="void **")
2728
self.expect_var_path("**pp_int0", value="0")
2829
self.expect_var_path("&**pp_int0", type="int *")
29-
self.expect("frame variable '&p_void[0]'", error=True,
30-
substrs=["subscript of pointer to incomplete type 'void'"])
30+
self.expect(
31+
"frame variable '&p_void[0]'",
32+
error=True,
33+
substrs=["subscript of pointer to incomplete type 'void'"],
34+
)

lldb/test/API/commands/frame/var-dil/basics/PointerDereference/main.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
#include <cstddef>
22

3-
int main (int argc, char **argv) {
4-
int* p_null = nullptr;
5-
const char* p_char1 = "hello";
3+
int main(int argc, char **argv) {
4+
int *p_null = nullptr;
5+
const char *p_char1 = "hello";
66

7-
typedef const char* my_char_ptr;
7+
typedef const char *my_char_ptr;
88
my_char_ptr my_p_char1 = p_char1;
99

1010
int offset = 5;
1111
int array[10];
1212
array[0] = 0;
1313
array[offset] = offset;
1414

15-
int(&array_ref)[10] = array;
15+
int (&array_ref)[10] = array;
1616

17-
int* p_int0 = &array[0];
18-
int** pp_int0 = &p_int0;
19-
const int* cp_int0 = &array[0];
20-
const int* cp_int5 = &array[offset];
17+
int *p_int0 = &array[0];
18+
int **pp_int0 = &p_int0;
19+
const int *cp_int0 = &array[0];
20+
const int *cp_int5 = &array[offset];
2121

22-
typedef int* td_int_ptr_t;
22+
typedef int *td_int_ptr_t;
2323
td_int_ptr_t td_int_ptr0 = &array[0];
2424

25-
void* p_void = (void*)p_char1;
26-
void** pp_void0 = &p_void;
27-
void** pp_void1 = pp_void0 + 1;
25+
void *p_void = (void *)p_char1;
26+
void **pp_void0 = &p_void;
27+
void **pp_void1 = pp_void0 + 1;
2828

2929
std::nullptr_t std_nullptr_t = nullptr;
3030

lldb/test/API/commands/frame/var-dil/basics/QualifiedId/TestFrameVarDILQualifiedId.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import time
1313

14+
1415
class TestFrameVarDILQualifiedId(TestBase):
1516
# If your test case doesn't stress debug info, then
1617
# set this to true. That way it won't be run once for
@@ -19,8 +20,9 @@ class TestFrameVarDILQualifiedId(TestBase):
1920

2021
def test_frame_var(self):
2122
self.build()
22-
lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here",
23-
lldb.SBFileSpec("main.cpp"))
23+
lldbutil.run_to_source_breakpoint(
24+
self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
25+
)
2426

2527
self.runCmd("settings set target.experimental.use-DIL true")
2628
self.expect_var_path("::ns::i", value="1")

lldb/test/API/commands/frame/var-dil/basics/QualifiedId/main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ namespace ns {
66

77
int i = 2;
88

9-
} // namespace ns
9+
} // namespace ns
1010

11-
} // namespace ns
11+
} // namespace ns
1212

13-
int
14-
main(int argc, char **argv)
15-
{
13+
int main(int argc, char **argv) {
1614

1715
return 0; // Set a breakpoint here
1816
}

lldb/test/API/commands/frame/var-dil/basics/SharedPtr/TestFrameVarDILSharedPtrDeref.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import shutil
1212
import time
1313

14+
1415
class TestFrameVarDILSharedPtrDeref(TestBase):
1516
# If your test case doesn't stress debug info, then
1617
# set this to true. That way it won't be run once for
@@ -19,8 +20,9 @@ class TestFrameVarDILSharedPtrDeref(TestBase):
1920

2021
def test_frame_var(self):
2122
self.build()
22-
lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here",
23-
lldb.SBFileSpec("main.cpp"))
23+
lldbutil.run_to_source_breakpoint(
24+
self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
25+
)
2426

2527
self.runCmd("settings set target.experimental.use-DIL true")
2628
self.expect_var_path("ptr_node->value", value="1")

lldb/test/API/commands/frame/var-dil/basics/SharedPtr/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <memory>
22

3-
int
4-
main(int argc, char **argv)
5-
{
3+
int main(int argc, char **argv) {
64

75
struct NodeS {
86
std::shared_ptr<NodeS> next;

0 commit comments

Comments
 (0)