Skip to content

Commit 5d1a319

Browse files
authored
bug-2010995: added collapse exception for operator (#7246)
1 parent 8d819ee commit 5d1a319

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

socorro/signature/tests/test_rules.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@ def test_normalize_frame(self, args, expected):
392392
"23",
393393
"ShutdownWorkThreads::$::__invoke",
394394
),
395+
(
396+
"js::jit::CodePosition::operator<(js::jit::CodePosition) const",
397+
"23",
398+
"js::jit::CodePosition::operator<",
399+
),
400+
(
401+
"js::jit::CodePosition::operator<=>(js::jit::CodePosition const&) const",
402+
"23",
403+
"js::jit::CodePosition::operator<=>",
404+
),
395405
],
396406
)
397407
def test_normalize_cpp_function(self, function, line, expected):

socorro/signature/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def collapse_types(func_signature: str) -> str:
253253
def get_type_replacement(before, inside, after):
254254
if inside == "<name omitted>" or " as " in inside or " in " in inside:
255255
return inside
256+
if before.endswith("operator"):
257+
return inside
256258
if before.endswith("IPC::ParamTraits"):
257259
s_without_outer_tokens = inside[1:-1]
258260
inside_substring = collapse_types(s_without_outer_tokens)

0 commit comments

Comments
 (0)