Use simpler interface for getting the pointee type for a node.

llvm-svn: 248449
This commit is contained in:
Manuel Klimek 2015-09-24 00:16:38 +00:00
parent 7d6266ead3
commit a88ce501fe
1 changed files with 1 additions and 1 deletions

View File

@ -601,7 +601,7 @@ void LoopConvertCheck::getIteratorLoopQualifiers(ASTContext *Context,
// A node will only be bound with DerefByRefResultName if we're dealing
// with a user-defined iterator type. Test the const qualification of
// the reference type.
auto ValueType = (*DerefType)->getAs<ReferenceType>()->getPointeeType();
auto ValueType = DerefType->getNonReferenceType();
Descriptor.DerefByConstRef = ValueType.isConstQualified();
Descriptor.IsTriviallyCopyable =