Created
June 7, 2022 02:35
-
-
Save trxcllnt/dad9565a1cfd54aedbe8fcf052a7cd45 to your computer and use it in GitHub Desktop.
basic `clangd` C/C++/CUDA config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apply this config conditionally to all C files | |
If: | |
PathMatch: .*\.(c|h)$ | |
CompileFlags: | |
Compiler: /usr/bin/gcc | |
--- | |
# Apply this config conditionally to all C++ files | |
If: | |
PathMatch: .*\.(c|h)pp | |
CompileFlags: | |
Compiler: /usr/bin/g++ | |
--- | |
# Apply this config conditionally to all CUDA files | |
If: | |
PathMatch: .*\.cuh? | |
CompileFlags: | |
Compiler: /usr/local/cuda/bin/nvcc | |
--- | |
# Tweak the clangd parse settings for all files | |
CompileFlags: | |
Add: | |
# report all errors | |
- "-ferror-limit=0" | |
Remove: | |
# strip CUDA fatbin args | |
- "-Xfatbin*" | |
# strip CUDA arch flags | |
- "-gencode*" | |
- "--generate-code*" | |
# strip CUDA flags unknown to clang | |
- "-ccbin*" | |
- "--compiler-options*" | |
- "--expt-extended-lambda" | |
- "--expt-relaxed-constexpr" | |
- "-forward-unknown-to-host-compiler" | |
- "-Werror=cross-execution-space-call" | |
Hover: | |
ShowAKA: No | |
InlayHints: | |
Enabled: No | |
Diagnostics: | |
Suppress: | |
- "variadic_device_fn" | |
- "attributes_not_allowed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment