diff --git a/include/clang/Rewrite/Core/Rewriter.h b/include/clang/Rewrite/Core/Rewriter.h index f01e433f7fcce6cc0a066d59636d6518ba784fdf..2d2917b910b9414efa6f619393b678bb36377316 100644 --- a/include/clang/Rewrite/Core/Rewriter.h +++ b/include/clang/Rewrite/Core/Rewriter.h @@ -49,6 +49,9 @@ public: /// \brief Write to \p Stream the result of applying all changes to the /// original buffer. + /// Note that it isn't safe to use this function to overwrite memory mapped + /// files in-place (PR17960). Consider using a higher-level utility such as + /// Rewriter::overwriteChangedFiles() instead. /// /// The original buffer is not actually changed. raw_ostream &write(raw_ostream &Stream) const;