HomePhabricator

[LLDB] CPlusPlusNameParser does not handles templated operator< properly

Authored by shafik on Mar 27 2020, 2:12 PM.

Description

[LLDB] CPlusPlusNameParser does not handles templated operator< properly

CPlusPlusNameParser is used in several places on of them is during IR execution and setting breakpoints to pull information C++ like the basename, the context and arguments.

Currently it does not handle templated operator< properly, because of idiosyncrasy is how clang generates debug info for these cases.

It uses clang::Lexer which will tokenize operator<<A::B> into:

tok::kw_operator
tok::lessless
tok::raw_identifier

Later on the parser in ConsumeOperator() does not handle this case properly and we end up failing to parse.

Differential Revision: https://reviews.llvm.org/D76168

Details