This check flags uses of std::endl on streams and suggests using the newline character '\n' instead. std::endl performs two operations: it writes a newline character to the output stream and then flushes the stream buffer, which can be less efficient than writing a single newline character using '\n'.
This fixes llvm#35321
unnecessary limit... (in my project we use custom stream class for logging).
something like this should be sufficient...
If you do not plan to remove restriction for basic_ostream, make it configurable.
And other problem is that some << operators does not need to be methods, they can be functions, in such case you may run into issues, but you could just read of type from expr... instead processing argument, or class.
Like `cxxOperatorCallExpr(hasType(references(cxxRecordDecl(....`