[clang-tools-extra] [emacs] Check for a 'buffer' type instead of 'buffer-live' (PR #128385)

Roi Martin via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 22 17:21:11 PST 2025


https://github.com/jroimartin created https://github.com/llvm/llvm-project/pull/128385

This is a follow-up to commit f69110dcc973 ("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.

>From 0c53396e1d1f5e21aa56b69ec87cf3c81cc02b0d Mon Sep 17 00:00:00 2001
From: Roi Martin <jroi.martin at gmail.com>
Date: Sun, 23 Feb 2025 02:02:29 +0100
Subject: [PATCH] [emacs] Check for a 'buffer' type instead of 'buffer-live'

This is a follow-up to commit f69110dcc973 ("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.
---
 .../clang-include-fixer/tool/clang-include-fixer.el             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
index f3a949f8c1b55..1cb9a0340b5e3 100644
--- a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
+++ b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
@@ -249,7 +249,7 @@ Add a missing header if there is any.  If there are multiple
 possible headers the user can select one of them to be included.
 Temporarily highlight the affected symbols.  Asynchronously call
 clang-include-fixer to insert the selected header."
-  (cl-check-type stdout buffer-live)
+  (cl-check-type stdout buffer)
   (let ((context (clang-include-fixer--parse-json stdout)))
     (let-alist context
       (cond



More information about the cfe-commits mailing list