Commit 3adaa97f authored by Dmitri Gribenko's avatar Dmitri Gribenko
Browse files

Fix ForRangeCopyCheck not triggering on iterators returning elements by value in C++17.

Summary:
The AST is different in C++17 in that there is no MaterializeTemporaryExpr for in the AST for a loop variable that is initialized from an iterator that returns its elements by value.

Account for this by checking that the variable is not initialized by an operator* call that returns a value type.

Reviewers: gribozavr2

Reviewed By: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79440
parent ca09dab3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment