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
14 lines
249 B
C++
14 lines
249 B
C++
typedef int TTT;
|
|
typedef int &td_int_ref;
|
|
|
|
int main() {
|
|
int i = 0;
|
|
// references to typedefs
|
|
TTT &l_ref = i;
|
|
TTT &&r_ref = static_cast<TTT &&>(i);
|
|
// typedef of a reference
|
|
td_int_ref td_to_ref_type = i;
|
|
|
|
return l_ref; // break here
|
|
}
|