[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); ```
Loading
Please sign in to comment