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
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.