================
@@ -413,8 +413,9 @@ static bool format(StringRef FileName, bool 
ErrorOnIncompleteFormat = false) {
   // On Windows, overwriting a file with an open file mapping doesn't work,
   // so read the whole file into memory when formatting in-place.
   ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
-      !OutputXML && Inplace ? MemoryBuffer::getFileAsStream(FileName)
-                            : MemoryBuffer::getFileOrSTDIN(FileName);
+      !OutputXML && Inplace
+          ? MemoryBuffer::getFileAsStream(FileName)
+          : MemoryBuffer::getFileOrSTDIN(FileName, /*IsText=*/true);
----------------
mydeveloperday wrote:

Yes I also was able to confirm there was no impact on windows i just wasn't 
sure so needed to prove it to myself, I'm ok if you want to commit this into 
clang-format, if you break stuff... we'll simply revert it ;-)

https://github.com/llvm/llvm-project/pull/90128
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to