Skip to content

Commit 28e2d4d

Browse files
committed
Update formating of gdb_api.cpp to fit clang rules
1 parent fa1be19 commit 28e2d4d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/memory-analyzer/gdb_api.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,12 @@ std::string gdb_apit::extract_memory(const std::string &line)
191191
const std::regex pointer_pattern(
192192
std::string(shared_prefix) + pointer_type_info + R"(\s()" + memory_address +
193193
R"()(\s\S+)?)");
194-
const std::regex null_pointer_pattern(std::string(shared_prefix) + R"((0x0))");
194+
const std::regex null_pointer_pattern(
195+
std::string(shared_prefix) + R"((0x0))");
195196
// Char pointer output the memory adress followed by the string in there.
196197
const std::regex char_pointer_pattern(
197-
std::string(shared_prefix) + R"(()" + memory_address + R"()\s"[\S[:s:]]*")");
198+
std::string(shared_prefix) + R"(()" + memory_address +
199+
R"()\s"[\S[:s:]]*")");
198200

199201
std::smatch result;
200202
if(regex_search(line, result, char_pointer_pattern))
@@ -222,13 +224,15 @@ std::string gdb_apit::get_value(const std::string &variable)
222224
std::string gdb_apit::extract_value(const std::string &line)
223225
{
224226
// This pattern matches primitive int values and bools.
225-
const std::regex value_pattern(std::string(shared_prefix) + R"(((?:-)?\d+|true|false))");
227+
const std::regex value_pattern(
228+
std::string(shared_prefix) + R"(((?:-)?\d+|true|false))");
226229
// This pattern matches the char pointer content.
227230
// It is printed behind the address.
228231
const std::regex char_value_pattern(
229232
std::string(shared_prefix) + memory_address + "\\s\"([\\S ]*)\"");
230233
// An enum entry just prints the name of the value on the commandline.
231-
const std::regex enum_value_pattern(std::string(shared_prefix) + R"(([\S]+)(?:\n|$))");
234+
const std::regex enum_value_pattern(
235+
std::string(shared_prefix) + R"(([\S]+)(?:\n|$))");
232236
// A void pointer outputs it type first, followed by the memory address it
233237
// is pointing to. This pattern should extract the address.
234238
const std::regex void_pointer_pattern(

0 commit comments

Comments
 (0)