# Clangd

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> `文件 | 设置 | 语言与框架 | C/C++ | Clangd`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 语言与框架 | C/C++ | Clangd`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

在此对话框中，可以配置特定设置并检查 Clangd 使用的 LLVM Clang 修订版本。

![Clangd 设置](https://resources.jetbrains.com/help/img/idea/2026.3/cl_clangd_settings.png)

|  项  |  描述  |
| --- | --- |
|  显示来自 Clangd 的错误和警告  |     选中此复选框以启用 Clangd 的警告和错误，这些内容将显示在编辑器中，而不是 CLion 的代码错误。       使用复选框下方的字段指定您想要启用的 Clangd 警告列表。 默认的警告集包括：       ```CONSOLE -Wno-unused-variable -Wno-shadow -Wshadow-field-in-constructor-modified -Wshadow-ivar -Wno-implicit-function-declaration -Wno-switch -Wno-parentheses -Wbitwise-op-parentheses -Wdangling-else -Wlogical-not-parentheses -Wlogical-op-parentheses -Woverloaded-shift-op-parentheses -Wparentheses-equality -Wshift-op-parentheses  ```    |
|  通过 Clangd 使用 clang-tidy  |     选中此复选框以通过 Clangd 启用 [clang-tidy](clang-tidy-checks-support.html)。 启用此选项还会打开以下 CLion 检查：        * [参数选择缺陷](argument-selection-defects-inspection.html)    * 空声明或语句    * 预处理器指令注释    * 可简化的语句    * [无约束变量类型](c-20-concepts.html#inspections)    * 从构造函数或析构函数中进行虚拟调用     > **Tip:** > 有关更多信息，请参阅 [C/C++ 检查列表](list-of-c-cpp-inspections.html)。    |

