From a88ce501feb2b3527e0b8c55a98b455e23f92b14 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Thu, 24 Sep 2015 00:16:38 +0000 Subject: [PATCH] Use simpler interface for getting the pointee type for a node. llvm-svn: 248449 --- clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp index 774ecbbac5d3..cb6f7ce80c87 100644 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp @@ -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()->getPointeeType(); + auto ValueType = DerefType->getNonReferenceType(); Descriptor.DerefByConstRef = ValueType.isConstQualified(); Descriptor.IsTriviallyCopyable =