This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2f906683ed14: clang-format.el: Make clang-format work in indirect buffers. (authored by phst, committed by sammccall).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120408/new/ https://reviews.llvm.org/D120408 Files: clang/tools/clang-format/clang-format.el Index: clang/tools/clang-format/clang-format.el =================================================================== --- clang/tools/clang-format/clang-format.el +++ clang/tools/clang-format/clang-format.el @@ -147,7 +147,7 @@ (setq style clang-format-style)) (unless assume-file-name - (setq assume-file-name buffer-file-name)) + (setq assume-file-name (buffer-file-name (buffer-base-buffer)))) (let ((file-start (clang-format--bufferpos-to-filepos start 'approximate 'utf-8-unix))
Index: clang/tools/clang-format/clang-format.el =================================================================== --- clang/tools/clang-format/clang-format.el +++ clang/tools/clang-format/clang-format.el @@ -147,7 +147,7 @@ (setq style clang-format-style)) (unless assume-file-name - (setq assume-file-name buffer-file-name)) + (setq assume-file-name (buffer-file-name (buffer-base-buffer)))) (let ((file-start (clang-format--bufferpos-to-filepos start 'approximate 'utf-8-unix))
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits