Skip to content
Unverified Commit c95d5813 authored by schenker's avatar schenker Committed by GitHub
Browse files

[clang-tidy] bugprone-assert-side-effect non-const operator methods (#71974)

With this PR, `bugprone-assert-side-effect` reports non-const calls to
`<<` and `>>` operators and does no longer consider any const operator
calls to have side effects.

E.g. the following snippet is now reported and was previously not:
```
std::stringstream ss;
assert(ss << 1);
```

The following snippet was previously a false-positive and is not
reported anymore:
```
struct {
  int operator+=(int i) const { return i; }
} t;
assert(t += 1);
```
parent aa4e34bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment