[PATCH] D148918: [Test] Regenerate checks using update_test_checks.py

Philipp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 05:42:24 PDT 2023


phst updated this revision to Diff 515697.
phst added a comment.

Check for a ‘buffer’ type instead of ‘buffer-live’.

In Emacs 29, ‘buffer-live’ is no longer recognized as a type and generates a
compilation warning.  Every function that requires a live buffer already checks
whether the buffer is live, so we don’t need to check ourselves.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148918/new/

https://reviews.llvm.org/D148918

Files:
  clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el


Index: clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
===================================================================
--- clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
+++ clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
@@ -168,9 +168,9 @@
 only STDERR may be nil.  CALLBACK is called in the case of
 success; it is called with a single argument, STDOUT.  On
 failure, a buffer containing the error output is displayed."
-  (cl-check-type stdin buffer-live)
-  (cl-check-type stdout buffer-live)
-  (cl-check-type stderr (or null buffer-live))
+  (cl-check-type stdin buffer)
+  (cl-check-type stdout buffer)
+  (cl-check-type stderr (or null buffer))
   (cl-check-type callback function)
   (lambda (process event)
     (cl-check-type process process)
@@ -192,7 +192,7 @@
 
 (defun clang-include-fixer--replace-buffer (stdout)
   "Replace current buffer by content of STDOUT."
-  (cl-check-type stdout buffer-live)
+  (cl-check-type stdout buffer)
   (barf-if-buffer-read-only)
   (cond ((fboundp 'replace-buffer-contents) (replace-buffer-contents stdout))
         ((clang-include-fixer--insert-line stdout (current-buffer)))
@@ -207,8 +207,8 @@
 line missing from TO, insert that line into TO so that the buffer
 contents are equal and return non-nil.  Otherwise, do nothing and
 return nil.  Buffer restrictions are ignored."
-  (cl-check-type from buffer-live)
-  (cl-check-type to buffer-live)
+  (cl-check-type from buffer)
+  (cl-check-type to buffer)
   (with-current-buffer from
     (save-excursion
       (save-restriction


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148918.515697.patch
Type: text/x-patch
Size: 1596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230421/50a50eb8/attachment.bin>


More information about the cfe-commits mailing list