Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

When did apple clang branched off vanilla clang?


Asked by Kimberly Reeves on Nov 30, 2021 FAQ



After setting up Mac OS and installing Command Line Tools for XCode 12.2 we have all we need: Looking at the _LIBCPP_VERSION macro in libc++ 's __version header we can see that this version of Apple Clang has been branched off vanilla Clang somewhere in the 10.0.0 development cycle.
Also,
Apple chose to develop a new compiler front end from scratch, supporting C, Objective-C and C++. This "clang" project was open-sourced in July 2007.
Consequently, CLion turns it on automatically when there is a .clang-format file under the project root. Code style rules are applied as you type, including indentation, auto-completion, code generation, and refactorings. clang-format can also be enabled without a .clang-format file.
In fact,
Previous versions used to say what LLVM version they corresponded to, but starting with 7.0, Apple decided to no longer do that. They even define the __clang_version__ and related preprocessor macros to indicate the Apple version number, not the LLVM version. So they're useless for this as well.
Similarly,
Configuring Style with clang-format ¶ clang-format supports two ways to provide custom style options: directly specify style configuration in the -style= command line option or use -style=file and put style configuration in the.clang-format or _clang-format file in the project directory.