[PATCH] D13129: Solve comment on rL248418.

Angel Garcia via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 24 05:31:07 PDT 2015


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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13129.35610.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150924/2053c151/attachment.bin>


More information about the cfe-commits mailing list