Created
August 13, 2024 12:38
-
-
Save abiiranathan/28dd86f414a7418da530ad4c5b2dc03b to your computer and use it in GitHub Desktop.
clangd configuration file for C/C++. Place it at /home/username/.clangd
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
InlayHints: | |
ParameterNames: No | |
DeducedTypes: No | |
Diagnostics: | |
UnusedIncludes: Strict | |
ClangTidy: | |
Add: [bugprone-*, cert-*, modernize-*, performance-*] | |
Remove: [bugprone-easily-swappable-parameters, modernize-use-trailing-return-type, cert-err33-c, cert-err34-c] | |
--- | |
CompileFlags: | |
Add: | |
- '-Wall' | |
- '-Wextra' | |
- '-Werror' | |
Remove: | |
- '-W*' # Remove any existing warning flags | |
--- | |
If: | |
PathMatch: '.*\.cpp' | |
CompileFlags: | |
Add: | |
- "-std=c++20" | |
- "-Wall" | |
- "-Werror" | |
- "-Wextra" | |
- "-ferror-limit=0" | |
Compiler: clang++ | |
--- | |
If: | |
PathMatch: '.*\.c' | |
CompileFlags: | |
Add: | |
- "-xc" | |
- "-Wall" | |
- "-Werror" | |
- "-Wextra" | |
- "-std=c2x" | |
- "-ferror-limit=0" | |
- "-fblocks" | |
Compiler: clang |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment