Minor bug in raw_svector_ostream

include/llvm/Support/raw_ostream.h, line 568:

  StringRef str() { return StringRef(OS.data(), OS.size()); }

Why str method is without "const" attribute? Any reasonable reason?

Thanks!
-Stepan

Why str method is without “const” attribute? Any reasonable reason?

Probably an accident; const is generally best-effort until someone needs a thing to be const :slight_smile:

Added in https://github.com/llvm/llvm-project/commit/2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf . Thanks!

George

Great! Thank you!
-Stepan