diff --git a/FAQ.md b/FAQ.md index d3e2d25..5d5fb4f 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,6 +1,6 @@ ### Some C/C++ headers are not recognized -#### Make sure company-lsp is used +#### if you are emacs user, make sure company-lsp is used M-x `company-diag`, make sure`Used backend:` includes `company-lsp`. There are at least three sets of implicit include paths. They take effect without your `-I` option in `.ccls` or `compile_commands.json` @@ -160,13 +160,13 @@ For headers that are not self-contained (e.g. some `/usr/include/bits/*.h` which #endif ``` -One approach ccls explored before was to compile its import file `a.c`, but it caused severe performance issue for some projects. +One approach ccls explored before was to compile its import file `a.c`, but it caused severe performance issues for some projects. For smaller files this does not matter and checking for a header guard may help the situation. ### Multi-version headers A header can be included in different translation units with different compiler flags. It may behave differently via `#ifdef`. -Ideally there should be some mechanism to switch among different views (compiler flags) when you are editing the file. +Ideally, there should be some mechanism to switch among different views (compiler flags) when you are editing the file. For efficiency, a header is only indexed with one set of compiler flags, so either the `#if` block or `#else` is indexed, the other is left blank.