[lldb] Unwrap the type when dereferencing the value
authorAndy Yankovsky <weratt@gmail.com>
Thu, 11 Nov 2021 14:39:49 +0000 (15:39 +0100)
committerAndy Yankovsky <weratt@gmail.com>
Mon, 15 Nov 2021 13:48:19 +0000 (14:48 +0100)
commit95102b7dc3c1b5b3f1b688221d9aa28cb1e17974
tree7de3af7d4b642b12008a6895d67c6428be89942c
parent2a299e4f0636bd6664ddabb36a8a1dfa8cbd59e5
[lldb] Unwrap the type when dereferencing the value

The value type can be a typedef of a reference (e.g. `typedef int& myint`).
In this case `GetQualType(type)` will return `clang::Typedef`, which cannot
be casted to `clang::ReferenceType`.

Fix a regression introduced in https://reviews.llvm.org/D103532.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D113673
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/test/API/lang/cpp/dereferencing_references/TestCPPDereferencingReferences.py
lldb/test/API/lang/cpp/dereferencing_references/main.cpp