What is Clang-Format and how does ReSharper support it?
Clang-Format is a widely-used C++ code formatter. As it provides an option to define code style options in YAML-formatted files — named .clang-format or _clang-format — these files often become a part of your project where you keep all code style rules. To see the full list of Clang-Format style options and examples of configuration files, check out the Clang-Format documentation.
Clang-Format in your solution
By default, Clang-Format properties are enabled; they will override preferences defined in ReSharper and Visual Studio options as well as EditorConfig styles. If you want ReSharper to ignore Clang-Format styles for code formatting and code syntax, clear the corresponding checkbox on the page of ReSharper options.
When Clang-Format support is enabled and there are .clang-format or _clang-format files that affect the current file, ReSharper will help you understand which Clang-Format styles are applied and where these settings come from:
In the File Formatting Info window, you can see and study all .clang-format and _clang-format files that affect the current file:
Supported Clang-Format Options
Supported in languages
This feature is supported in the following languages and technologies: