Use llvm::isa rathen that QualType::isXYZ as the later reports about the canonical type while we are interested in the direct type. Make sure to recurse if needed after removing the typedefs
git-svn-id: http://root.cern.ch/svn/root/trunk@46675 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
d132d3d5ba
commit
51a176173b
@ -210,7 +210,7 @@ namespace utils {
|
||||
|
||||
// In case of Int_t* we need to strip the pointer first, desugar and attach
|
||||
// the pointer once again.
|
||||
if (QT->isPointerType()) {
|
||||
if (isa<PointerType>(QT.getTypePtr())) {
|
||||
// Get the qualifiers.
|
||||
Qualifiers quals = QT.getQualifiers();
|
||||
QT = GetPartiallyDesugaredType(Ctx, QT->getPointeeType(), TypesToSkip,
|
||||
@ -223,7 +223,7 @@ namespace utils {
|
||||
|
||||
// In case of Int_t& we need to strip the pointer first, desugar and attach
|
||||
// the pointer once again.
|
||||
if (QT->isReferenceType()) {
|
||||
if (isa<ReferenceType>(QT.getTypePtr())) {
|
||||
// Get the qualifiers.
|
||||
bool isLValueRefTy = isa<LValueReferenceType>(QT.getTypePtr());
|
||||
Qualifiers quals = QT.getQualifiers();
|
||||
@ -273,6 +273,14 @@ namespace utils {
|
||||
return QT;
|
||||
}
|
||||
|
||||
// If we have a reference or pointer we still need to
|
||||
// desugar what they point to.
|
||||
if (isa<PointerType>(QT.getTypePtr()) ||
|
||||
isa<ReferenceType>(QT.getTypePtr()) ) {
|
||||
return GetPartiallyDesugaredType(Ctx, QT, TypesToSkip,
|
||||
fullyQualify);
|
||||
}
|
||||
|
||||
NestedNameSpecifier* prefix = 0;
|
||||
const ElaboratedType* etype
|
||||
= llvm::dyn_cast<ElaboratedType>(QT.getTypePtr());
|
||||
|
Loading…
Reference in New Issue
Block a user