Clang

Clang
Original author(s)Chris Lattner
Developer(s)LLVM Developer Group
Initial releaseSeptember 26, 2007; 17 years ago (2007-09-26)[1]
Stable release
19.1.0[2][3] Edit this on Wikidata / 17 August 2024; 45 days ago (17 August 2024)
Repository
Written inC++
Operating systemUnix-like
PlatformAArch64, ARMv7, IA-32, x86-64, ppc64le[4]
TypeCompiler front end
LicenseApache 2.0 with LLVM Exceptions[5][6]
Websiteclang.llvm.org

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.[9] It acts as a drop-in replacement for the GNU Compiler Collection (GCC), supporting most of its compiling flags and unofficial language extensions.[10][11] It includes a static analyzer, and several code analysis tools.[12]

Clang operates in tandem with the LLVM compiler back end and has been a subproject of LLVM 2.6 and later.[13] As with LLVM, it is free and open-source software under the Apache 2.0 software license.[5][6] Its contributors include Apple, Microsoft, Google, ARM, Sony, Intel, and AMD.

Clang 17, the latest major version of Clang as of October 2023, has full support for all published C++ standards up to C++17, implements most features of C++20, and has initial support for the upcoming C++23 standard.[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]

  1. ^ "LLVM 2.1 Release Notes". llvm.org. LLVM Developer Group. September 27, 2007. Archived from the original on November 17, 2016. Retrieved April 30, 2018.
  2. ^ "LLVM 19.1.0". GitHub. August 17, 2024. Retrieved August 17, 2024.
  3. ^ "LLVM 19.1.0 Released!". August 17, 2024. Retrieved August 17, 2024.
  4. ^ "Releases". llvm – llvm-project repo. LLVM Developer Group. August 27, 2021. Archived from the original on September 12, 2021. Retrieved September 12, 2021 – via GitHub.com.
  5. ^ a b "LICENSE.TXT", llvm.org, LLVM Developer Group, archived from the original on November 11, 2020, retrieved September 24, 2019
  6. ^ a b "LLVM Developer Policy", llvm.org, LLVM Developer Group, § Copyright, License, and Patents, archived from the original on November 13, 2012, retrieved September 12, 2021
  7. ^ Christopher, Eric (July 3, 2008). "simply wonder pronunciation of Clang". LLVMdev (Mailing list). Retrieved September 22, 2015.
  8. ^ "OpenMP Support". LLVM Project Blog. May 22, 2015. Archived from the original on March 26, 2016. Retrieved March 28, 2016.
  9. ^ "C++ Heterogeneous-Compute Interface for Portability". GitHub. Archived from the original on June 27, 2020. Retrieved February 18, 2020.
  10. ^ "Clang Language Extensions". Archived from the original on February 24, 2014. Retrieved November 8, 2017. In addition to the language extensions listed here, Clang aims to support a broad range of GCC extensions.
  11. ^ Cite error: The named reference GCCCompat was invoked but never defined (see the help page).
  12. ^ "Clang Static Analyzer". LLVM. Archived from the original on April 30, 2018. Retrieved September 3, 2009.
  13. ^ "Getting Involved with the Clang Project", clang.llvm.org, LLVM Developer Group, archived from the original on April 27, 2018, retrieved September 18, 2012, Clang is a subproject of the LLVM Project, but has its own mailing lists because the communities have people with different interests.
  14. ^ Cite error: The named reference cxx_status was invoked but never defined (see the help page).
  15. ^ "Clang 17.0.1 Release Notes". LLVM. Retrieved October 25, 2023.