summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
index 774ecbbac5d..cb6f7ce80c8 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<ReferenceType>()->getPointeeType();
+ auto ValueType = DerefType->getNonReferenceType();
Descriptor.DerefByConstRef = ValueType.isConstQualified();
Descriptor.IsTriviallyCopyable =
OpenPOWER on IntegriCloud