all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Matt Armstrong <matt@rfc20.org>
Cc: "João Távora" <joaotavora@gmail.com>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Emacs + bear + compile_commands.json + clangd
Date: Wed, 12 Oct 2022 06:32:34 +0200	[thread overview]
Message-ID: <m21qrd3bml.fsf@Mini.fritz.box> (raw)
In-Reply-To: <87k056w9b1.fsf@rfc20.org> (Matt Armstrong's message of "Tue, 11 Oct 2022 10:37:38 -0700")

Matt Armstrong <matt@rfc20.org> writes:

>> I've never had to use --force-wrapper or alter compile_commands.json.
>
> Regarding compile_commands.json, if I use the compile_commands.json
> generated by bear, with eglot, with clangd version "Debian clangd
> version 14.0.6-2", it works well for .c files but not .h files.
>
> E.g. I open src/buffer.h and I get these errors in flymake (this is a
> small subset):
>
>    26   9 error    e-f-b    clang [unknown_typename]: In included file: unknown type name 'INLINE_HEADER_BEGIN'
>     1   0 error    e-f-b    clang [fatal_too_many_errors]: Too many errors emitted, stopping now
>   283   4 error    e-f-b    clang [unknown_typename]: Unknown type name 'INTERVAL'
>   722   9 warning  e-f-b    clang [-Wimplicit-function-declaration]: Implicit declaration of function 'PSEUDOVECTORP' is invalid in C99
>   877   5 warning  e-f-b    clang [-Wimplicit-function-declaration]: Implicit declaration of function 'NILP' is invalid in C99
>  1079  26 error    e-f-b    clang [expr_not_ice]: Expression is not an integer constant expression
>  1256   7 error    e-f-b    clang [unknown_typename]: Unknown type name 'INTERVAL'
>  1573  14 warning  e-f-b    clang [-Wint-conversion]: Incompatible integer to pointer conversion initializing 'Lisp_Object' (aka 'struct Lisp_X *') with an expression of type 'int'
>  1573  21 warning  e-f-b    clang [-Wimplicit-function-declaration]: Implicit declaration of function 'CHAR_TABLE_REF' is invalid in C99
>
> I always assumed that this was becuase clangd didn't know how to compile
> src/buffer.h and is unable to figure it out:
>
> Given all this I have no idea how your experience with clangd could
> different, but I'm not a clangd expert 🤔.

I'm not an expert for anything, but I don't see such errors here.
Strange.

>> My current version is bear 3.0.20, on macOS 12.6.  What's your system?
>
> bear 3.0.20 on Debian/Bullseye (testing)

Thanks.
>
> My issue may have been related to building with Address Sanitizer, which
> I think also (might) play games with LD_PRELOAD.  I tried
> --force-wrapper and it worked for me.  ;-)

:-).  And BTW, I'm also using ASAN here, almost all the time, and don't
see this either.  This is with the system compiler, which is Apple clang
version 14.0.0 (clang-1400.0.29.102).

Maybe I'll try the lldb from LLVM 15 a try at some point.




      reply	other threads:[~2022-10-12  4:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 12:44 Lightning fast build Gerd Möllmann
2022-08-19 12:59 ` Alan Mackenzie
2022-08-21  2:47 ` Pankaj Jangid
2022-08-21  9:36 ` João Távora
2022-08-21 10:24   ` Gerd Möllmann
2022-10-11  4:09   ` Emacs + bear + compile_commands.json + clangd Matt Armstrong
2022-10-11  5:39     ` Gerd Möllmann
2022-10-11 17:37       ` Matt Armstrong
2022-10-12  4:32         ` Gerd Möllmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21qrd3bml.fsf@Mini.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=matt@rfc20.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.