[clang] [clang-tools-extra] [CodeCompletion] Consider header files without extension, if... (PR #166447)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 8 21:45:29 PST 2026


HighCommander4 wrote:

> I did spot check about thirty projects and the most common extensionless files I found were hidden files like `.gitignore`. Do we have special handling for files that begin with `.` to exclude those?

Yes, the [relevant check](https://searchfox.org/llvm/rev/3192fe2c7b08912cc72c86471a593165b615dc28/clang/lib/Sema/SemaCodeComplete.cpp#10403) is `ExtensionlessHeaders && !Filename.contains('.')`.

> CC @HighCommander4 @llvm-beanz as clangd maintainers for opinions

My 2 cents: I'm happy to accept this refinement to the heuristic to address someone's concrete use case. If we subsequently get issues filed about false positive completions introduced by this refinement, we can consider a further refinement (informed by what the false positives are) at that time.

https://github.com/llvm/llvm-project/pull/166447


More information about the cfe-commits mailing list