[clang-tidy] Fix an assert failure in `modernize-loop-convert`.
authorHaojian Wu <hokein@google.com>
Tue, 16 Feb 2016 10:36:51 +0000 (10:36 +0000)
committerHaojian Wu <hokein@google.com>
Tue, 16 Feb 2016 10:36:51 +0000 (10:36 +0000)
commit6b4c0b5b663841f3c6702e5c1999b599bf1687ca
tree44635e960914f9610e60ebf59077618810ef9dbb
parent67f880641c7ae3aa19bb9e7cce415f4bd727ee27
[clang-tidy] Fix an assert failure in `modernize-loop-convert`.

Summary:
The test code will trigger following an assert failure:

assert.h assertion failed at LoopConvertUtils.cpp:560 in
bool clang::tidy::modernize::ForLoopIndexUseVisitor::TraverseMemberExpr(clang::MemberExpr*): ExprType->isPointerType() && "Operator-> returned non-pointer type"

Reviewers: alexfh

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

llvm-svn: 260953
clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
clang-tools-extra/test/clang-tidy/modernize-loop-convert-assert-failure.cpp [new file with mode: 0644]