[lldb] Fix simple template names and template params with scope qualifiers
authorArthur Eubanks <aeubanks@google.com>
Mon, 7 Nov 2022 21:07:26 +0000 (13:07 -0800)
committerArthur Eubanks <aeubanks@google.com>
Wed, 16 Nov 2022 00:52:34 +0000 (16:52 -0800)
commitcb0ffa529a0f7f907fd89587fc2ab4f6ffd57cf5
treee6b18171be29ea01ad0ac9f708d76f6401b0a307
parent61e5c14fa8d157c59ca25246f601be4e1fcba35c
[lldb] Fix simple template names and template params with scope qualifiers

Followup to D134378.

With PrintingPolicy::SuppressScope, we'd also not print the scope in template params. The intention was only to skip the scope for the class because we expect template params to be fully qualified when comparing them for simple template names.

Instead, use `NamedDecl::getNameForDiagnostic` if we're dealing with a tag, which is what we actually use when emitting debug info in clang. That already has an option to suppress the scope on the base name.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D137583
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
lldb/test/API/lang/cpp/unique-types2/TestUniqueTypes2.py
lldb/test/API/lang/cpp/unique-types2/main.cpp