mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
.ccls
parent
0d00737114
commit
0d70eb46a0
16
FAQ.md
16
FAQ.md
@ -1,3 +1,7 @@
|
||||
### Does it support `compile_flags.txt`?
|
||||
|
||||
No. https://github.com/MaskRay/ccls/issues/110
|
||||
|
||||
### Some C/C++ headers are not recognized
|
||||
|
||||
#### if you are emacs user, make sure company-lsp is used
|
||||
@ -46,18 +50,6 @@ If you want to specify additional search paths:
|
||||
* `print '%clang\n%cpp -std=gnu++17\n-isystem/tmp/include' > .ccls`
|
||||
* emacs-ccls: `(setq ccls-extra-init-params '(:clang (:extraArgs ["-isystem" "/tmp/include"])))`
|
||||
|
||||
### `-std=c++1z` `-std=c++17` `bits/unordered_map.h`
|
||||
|
||||
In C++17 mode, it is possible to cause clang to crash when `bits/unordered_map.h` is indexed.
|
||||
See https://bugs.llvm.org/show_bug.cgi?id=37695 for details.
|
||||
The workaround is to add `-D__cpp_deduction_guides=0 -Wno-macro-redefined` to the initialization option `clang.extraArgs`
|
||||
|
||||
In Emacs, it is:
|
||||
```elisp
|
||||
(setq ccls-extra-init-params
|
||||
'(:clang (:extraArgs ("-D__cpp_deduction_guides=0" "-Wno-macro-redefined"))))
|
||||
```
|
||||
|
||||
### Project root detection
|
||||
|
||||
[emacs-ccls](https://github.com/MaskRay/emacs-cquery/) locates the project root in the following order:
|
||||
|
@ -75,6 +75,8 @@ Example `.ccls`:
|
||||
%clang
|
||||
%c -std=gnu11
|
||||
%cpp -std=gnu++14
|
||||
%objective-c %objective-cpp -DGNUSTEP
|
||||
%c %cpp -DFOO
|
||||
-pthread
|
||||
|
||||
# Includes
|
||||
|
Loading…
Reference in New Issue
Block a user