Author: klimek
Date: Wed Sep 23 19:16:38 2015
New Revision: 248449

URL: http://llvm.org/viewvc/llvm-project?rev=248449&view=rev
Log:
Use simpler interface for getting the pointee type for a node.

Modified:
    clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp

Modified: clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp?rev=248449&r1=248448&r2=248449&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp Wed Sep 
23 19:16:38 2015
@@ -601,7 +601,7 @@ void LoopConvertCheck::getIteratorLoopQu
       // 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 =


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to