Compilation
clice compiles each open file with its command from the compilation database, as the build would. The sections below cover what that takes on real projects: the flags a command passes, languages beside C and C++, file encodings, files that change on disk, and the cache that outlives a restart.
Compile Flags
Flags of a file's command that change what it compiles, such as -include, apply in the editor as in the build.
Forced includes
Headers a command forces in with -include work like the ones a file includes itself
Build systems force headers in for configuration macros and precompiled headers. Their macros hover and navigate, and editing them reaches every file they are forced into.
Precompiled headers
The units of a target with precompiled headers share its PCH, built by clice from the build's command
CMake gives every unit of such a target the precompiled header it builds from cmake_pch.hxx.cxx. The file on disk may come from another compiler, so clice builds its own from the same command, once, function bodies and all, for the files open and the index alike: that build is the compile of cmake_pch.hxx.cxx and indexes it. Editing one of the target's headers rebuilds it and reaches every unit.
Deferred template bodies
A command that asks clang to defer template bodies has them deferred in every compile
clice parses a template's body where it is written, even on MSVC targets, where clang's default before C++20 defers it, so that hover, navigation and diagnostics work inside every template. Code written for MSVC's permissive lookup, such as a template using a name declared after it, then reports the errors a conforming compiler would. A command that passes -fdelayed-template-parsing (clang-cl: /Zc:twoPhase-), from the build or appended by a rule, compiles such code as the compiler does. The cost: the body of a template that nothing instantiates stays unparsed, and nothing inside it can be hovered or found; completion still works there.
Other Languages
Files of other languages a build compiles, such as assembler sources, are left alone: clice analyzes only C-family code.
Assembler sources
Assembler sources a build compiles, preprocessed or not, are left to the assembler: the index, lint and the editor skip them
File Encodings
A file works the same whatever its byte order mark or line endings.
Byte order marks
Files saved as UTF-8 with a byte order mark work like any other
Positions on the first line skip the mark, as the editor shows it, and data a file embeds keeps its bytes.
Windows line endings
Files whose lines end in CRLF answer at the same places as any other
Other encodings
A file saved in another encoding than UTF-8 reads as UTF-8, and clice names it once
Its bytes past ASCII are no UTF-8: the editor shows each as a replacement mark. When clice loads the project it names the files it found that are not UTF-8, once; saving them as UTF-8 fixes them.
Files Changing on Disk
A header another tool rewrites reaches the files that include it, without being opened.
Changes outside the editor
A header changed on disk reaches the files that include it at their next request, saved or not
Checkouts, generators and other tools rewrite headers behind the editor's back. The next request about an including file compiles it against the new text, wherever the header sits in its includes, while a rewrite of the same bytes costs nothing.
Cache
What clice compiles for headers and modules is kept on disk, with the index, so a restart starts warm.
Warm restarts
Precompiled headers outlive a restart, and changes made while the server was down still reach the files that use them
