Unverified Commit 415a82c6 authored by Clement Courbet's avatar Clement Courbet Committed by GitHub
Browse files

[clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (#94362)

…and operators that have non-const overloads.

This allows  `unnecessary-copy-initialization` to warn on more cases.

The common case is a class with a a set of const/non-sconst overloads
(e.g. std::vector::operator[]).

```
void F() {
  std::vector<Expensive> v;
  // ...

  const Expensive e = v[i];
}
```
parent c9fd7b1a
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