补充 .clangd 配置。
Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
parent
2ad9cf9737
commit
83a28d4779
@ -32,6 +32,8 @@ Ctrl+Shift+P -> clangd: open project configuration file
|
||||
# Enabled: Yes
|
||||
# ParameterNames: No
|
||||
# DeducedTypes: Yes
|
||||
Diagnostics:
|
||||
Suppress: pragma-pack
|
||||
|
||||
CompileFlags:
|
||||
Add:
|
||||
@ -44,7 +46,9 @@ CompileFlags:
|
||||
- -Xcompiler*
|
||||
```
|
||||
|
||||
其中 -x 为 gcc 参数,用于忽略源代码文件扩展名,并使用 -x 参数指定的语言类型。如果源码文件不是标准后缀名称(.c,.cpp )或语法与扩展名不符,则 gcc 编译器便不能通过后缀名判断语言类型,此时可以通过该参数指定语言类型。取值可以为:
|
||||
其中 Suppress: pragma-pack 是为了消除源码中 #pragma pack(push) 错误的警告提示“Unterminated '#pragma pack (push, ...)' at end of file”。该提示属于 clangd 的 [Bug](https://github.com/clangd/clangd/issues/1167)。
|
||||
|
||||
-x 为 gcc 参数,用于忽略源代码文件扩展名,并使用 -x 参数指定的语言类型。如果源码文件不是标准后缀名称(.c,.cpp )或语法与扩展名不符,则 gcc 编译器便不能通过后缀名判断语言类型,此时可以通过该参数指定语言类型。取值可以为:
|
||||
|
||||
- -xc
|
||||
- -xc++
|
||||
|
Loading…
x
Reference in New Issue
Block a user