angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: klimek, cfe-commits.

Solve comment on rL248418.

http://reviews.llvm.org/D13129

Files:
  clang-tidy/modernize/LoopConvertCheck.cpp

Index: clang-tidy/modernize/LoopConvertCheck.cpp
===================================================================
--- clang-tidy/modernize/LoopConvertCheck.cpp
+++ 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;


Index: clang-tidy/modernize/LoopConvertCheck.cpp
===================================================================
--- clang-tidy/modernize/LoopConvertCheck.cpp
+++ 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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to