[clang-tools-extra] r248449 - Use simpler interface for getting the pointee type for a node.

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 17:16:38 PDT 2015


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 =




More information about the cfe-commits mailing list