Clang (/ˈklæŋ/)[7] is a compiler front end for the programming languages C, C++, Objective-C, Objective-C++, and the software frameworks OpenMP,[8] OpenCL, RenderScript, CUDA, SYCL, and HIP.
[14] Since v16.0.0, Clang compiles C++ using the GNU++17 dialect by default, which includes features from the C++17 standard and conforming GNU extensions.
[15] In 2005, Apple Inc. made extensive use of LLVM in several commercial products,[16] including the iOS SDK and Xcode 3.1.
This enabled Apple to support OpenGL on computers using Intel GMA chipsets, increasing performance on those machines.
[5][6] For these reasons, Apple developed Clang, a new compiler front end which supports C, Objective-C and C++.
One of Clang's main goals is to provide a library-based architecture,[22] so that the compiler could interoperate with other tools that interact with source code, such as integrated development environments (IDE).
If an error is found during or after the fold step, it can be difficult to translate that back into one location in the original source.
Clang's error reports are more detailed, specific, and machine-readable, so IDEs can index the compiler's output.
Modular design of the compiler can offer source code indexing, syntax checking, and other features normally associated with rapid application development systems.
Clang implements many GNU language extensions and compiler intrinsics, some of which are purely for compatibility.
Clang also maintains application binary interface (ABI) compatibility with GCC-generated object code.