Files
llvm-project/clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp
Haojian Wu e641cb4807 [clang-tidy] Fix "Name is not a simple identifier" assertion in modernize-loop-convert check.
Summary:
Fix assertion failure: "Name is not a simple identifier".

`Decl::GetName` assumes the name should be an identifier. When the check
processes the function calling statement with speciail key name like
'it.operator->()', it will trigger the assert in `GetName`.

Rather than using `Decl::GetName`, we use `getNameAsString` which works
with special key names in C++.

Reviewers: bkramer

Subscribers: cfe-commits

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

llvm-svn: 263426
2016-03-14 12:41:24 +00:00

26 KiB