RE: clangd cannot handle tree_nocb.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fangrui Song
> Sent: 19 April 2023 21:02
....
> Some information about Clang based language servers
> 
> It's good practice to ensure that a header file is self-contained. If
> not, for example, if a.c includes a.h, which is not self-contained,
> a.h is generally compiled on its own (as if using clang [options] a.h)
> to confine diagnostics/completion results to a.h and not to other
> headers included by a.c.
> 
> However, this design choice may cause language servers to emit
> diagnostics that you don't see when building the project.

That really doesn't work for .h files that contain program
generated data used to initialise arrays.

They may not even contain numbers, just references to
#defines that that including file is expected to define.

So there will always be .h files that are not compilable.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux