[LLDB] CPlusPlusNameParser does not handles templated operator< properly
authorshafik <syaghmour@apple.com>
Fri, 27 Mar 2020 21:12:38 +0000 (14:12 -0700)
committershafik <syaghmour@apple.com>
Fri, 27 Mar 2020 21:46:39 +0000 (14:46 -0700)
commit8016d61e3cf4967dd28c8f6296cec685dadcaee6
tree1c8b0c3457ceb5154bd3eaaa8c69baf24f63f6a8
parent6eb345af5a1bb182a1292c8a285a6a509af61a94
[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
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp