Note: None of the answers provided at Get Apple clang version and corresponding upstream LLVM version seems to work anymore.
The download page at http://releases.llvm.or
launch terminal and enter:
clang --version
Apple clang version 11.0.0 (clang-1100.0.33.16)
This wikipedia table maps Xcode and Apple clang versions to LLVM versions. Your clang-902.0.39.1 appears to be based on LLVM 5.0.2.
You could try using
echo | clang -dM -E - | grep __clang
and maybe that will give you more reliable numbers. Although I'm speculating since I'm not on a Mac.
Also, clang has had the -pedantic
option for a long long time - many versions before 6.0. -pedantic
is a GCC option and clang takes after GCC in its options.