-
Notifications
You must be signed in to change notification settings - Fork 2
/
.clangd
44 lines (44 loc) · 1.07 KB
/
.clangd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# vim:set ft=yaml ts=2 sw=2 et:
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# for clangd from https://clangd.llvm.org/
---
# treat *.h files as C++ source code
If:
PathMatch: src/.*\.h
PathExclude: vendor/.*
CompileFlags:
Add:
- -xc++
---
# C++ flags
If:
PathMatch: [ src/.*\.h, src/.*\.cpp ]
PathExclude: vendor/.*
CompileFlags:
Add:
- -std=gnu++17
# -std=gnu++20 # requires clangd >= 11.0
# -std=gnu++23 # requires clangd >= 18.0
---
# common flags for all C/C++ files
If:
PathMatch: [ src/.*\.h, src/.*\.c, src/.*\.cpp ]
PathExclude: vendor/.*
CompileFlags:
Add:
# see https://github.com/clangd/clangd/issues/1038 : Support deterministic relative include path
- -Ivendor
- -I../vendor
- -I../../vendor
- -DDEBUG
- -fno-strict-aliasing
- -fno-strict-overflow
- -funsigned-char
Diagnostics:
Includes:
# IgnoreHeader: A list of regexes. Include Cleaner will not produce diagnostics
# for headers whose path is a suffix match for any of these.
IgnoreHeader:
- src/.*\.h
UnusedIncludes: None
...