schenker wrote: @PiotrZSL I changed some things, please take another look.
All const operator calls are now considered to be side-effect free. This also fixes some false-positives, e.g. ``` struct t { int operator+=(int i) const { return i; } } t; assert(t += 1); ``` is no longer reported. I added `<<` and `>>` to the list of operators with side-effects. Only const calls are reported, so ``` std::stringstream ss; assert(ss << 1); ``` is reported, but ``` assert(5 << 1); ``` is not. There is no overlap with `CheckFunctionCalls`, `CXXOperatorCallExpr`s are not affected by the flag. https://github.com/llvm/llvm-project/pull/71974 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits