Solve comment on rL248418.

Summary: Solve comment on rL248418.

Reviewers: alexfh

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D13129

llvm-svn: 248489
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
index cb6f7ce..56074f6 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
@@ -394,9 +394,7 @@
     // If VDec is a reference to a container, Dereference is false,
     // but we still need to check the const-ness of the underlying container
     // type.
-    if (const auto &RT = CType->getAs<ReferenceType>()) {
-      CType = RT->getPointeeType();
-    }
+    CType = CType.getNonReferenceType();
     return CType.isConstQualified();
   }
   return false;