Re: [PATCH] Revert "scripts/clang-tools: Handle included .c files in gen_compile_commands"

From: Nathan Chancellor
Date: Wed Dec 17 2025 - 19:13:50 EST


On Wed, Dec 17, 2025 at 08:13:43PM +0100, Nicolas Schier wrote:
> This reverts commit 9362d34acf91a706c543d919ade3e651b9bd2d6f.
>
> Dmitry Vyukov reported that commit 9362d34acf91 ("scripts/clang-tools:
> Handle included .c files in gen_compile_commands") generates false
> entries in some cases for C files that are included in other C files but
> not meant for standalone compilation.
>
> For properly forking clangd, including .c files is discouraged.
>
> Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> Closes: https://lore.kernel.org/r/CACT4Y+Z8aCz0XcoJx9XXPHZSZHxGF8Kx9iUbFarhpTSEPDhMfg@xxxxxxxxxxxxxx
> Signed-off-by: Nicolas Schier <nsc@xxxxxxxxxx>

Acked-by: Nathan Chancellor <nathan@xxxxxxxxxx>