diff options
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Core/Debugger.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 5ce2eae0735..4ae2265c86a 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -2358,7 +2358,29 @@ FormatPromptRecurse if (args.GetSize() > 0) { const char *open_paren = strchr (cstr, '('); - const char *close_paren = NULL; + const char *close_paren = nullptr; + const char *generic = strchr(cstr, '<'); + // if before the arguments list begins there is a template sign + // then scan to the end of the generic args before you try to find + // the arguments list + if (generic && open_paren && generic < open_paren) + { + int generic_depth = 1; + ++generic; + for (; + *generic && generic_depth > 0; + generic++) + { + if (*generic == '<') + generic_depth++; + if (*generic == '>') + generic_depth--; + } + if (*generic) + open_paren = strchr(generic, '('); + else + open_paren = nullptr; + } if (open_paren) { if (IsToken (open_paren, "(anonymous namespace)")) |

