HomePhabricator

Make the modernize-loop-convert's const-detection smarter.

Description

Make the modernize-loop-convert's const-detection smarter.

Summary:
Now, it detects that several kinds of usages are can't modify the elements. Examples:
-When an usage is a call to a const member function or operator of the element.
-If the element is used as an argument to a function or constructor that takes a const-reference or a value.
-LValue to RValue conversion, if the element is a fundamental type (which allows the use of most of the builtin operators).

Reviewers: klimek

Subscribers: cfe-commits, alexfh

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

Details

Committed
angelgarciaNov 2 2015, 9:02 AM
Differential Revision
D14198: Make the modernize-loop-convert's const-detection smarter.
Parents
rL251807: Fix another crash in the redundant-void-arg check.
Branches
Unknown
Tags
Unknown