What Is Clang-Tidy?

What Is Clang-Tidy?

Clang-Tidy is an open-source static analysis tool for C, C++, and Objective-C, developed as part of the LLVM project.

It integrates seamlessly with the Clang compiler front-end, enabling deep static analysis of the code. Clang-Tidy can be used to check coding standards such as those derived from MISRA C++, CERT C++, or internal guidelines.

Its primary purpose is to help developers improve code quality, maintainability, and correctness by identifying and suggesting fixes for problematic code patterns.

Why Is Clang-Tidy Relevant for Functional Safety?

Why Is Clang-Tidy Relevant for Functional Safety?

In safety-relevant development in automotive (ISO 26262), industrial automation (IEC 61508), and avionics (DO-178C), static code analysis is required by the corresponding safety standards. Clang-Tidy is an open-source solution that can help perform static code analysis. It offers a variety of built-in checks and can also be extended to meet project needs. Clang-Tidy helps prevent common programming errors that could lead to system malfunctions or hazardous situations.

Can Clang-Tidy Be Used in Safety-Relevant Projects?

Can Clang-Tidy Be Used in Safety-Relevant Projects?

If Clang-Tidy is used in safety-relevant development according to safety norms like ISO 26262, it must undergo qualification in accordance with the corresponding norm to demonstrate its suitability and reliability. Although Clang-Tidy is open-source and not qualified out of the box, it can be integrated into a qualified toolchain through qualification processes or by using a qualification kit that supports compliance.

We offer a dedicated Qualification Kit for Clang-Tidy

Use the Validas QKit to qualify Clang-Tidy, reducing programming errors and ensuring standards compliance.

Sebastian Heinemann
Business and Organization Development Manager

How to Use Clang-Tidy in Safety-Critical Projects

How to Use Clang-Tidy in Safety-Critical Projects

Since Clang-Tidy is open-source software, it does not support commercial coding standards such as MISRA C, MISRA C++, and AUTOSAR C++14 out of the box, but it can be extended with checks for those standards. According to safety norms such as ISO 26262, tool qualification of Clang-Tidy is required. We can provide support in extending Clang-Tidy to meet the project’s needs.

Stay informed

We’ll occasionally use your email address to share updates on upcoming webinars, events, and the latest news about our products and services.

External content - Hubspot

At this point you will find content from a third-party provider that you can display with one click.

By loading the form, personal data may be transmitted to the third-party provider. You can find more information in our privacy policy.