title: How can I find the actual Clang version on Mac?
body: <p>Note: None of the answers provided at <a href="https://stackoverflow.com/questions/33603027/get-apple-clang-version-and-corresponding-upstream-llvm-version">Get Apple clang version and corresponding upstream LLVM version</a> seems to work anymore.</p>
  
  <p>The download page at <a href="http://releases.llvm.org/download.html" rel="noreferrer">http://releases.llvm.org/download.html</a> and the Wikipedia article at <a href="https://en.wikipedia.org/wiki/Clang" rel="noreferrer">https://en.wikipedia.org/wiki/Clang</a> seems to indicate that the most recent Clang version is 6.0.0.</p>
  
  <p>But on my macOS High Sierra version 10.13.3, I see this output:</p>
  
  <pre><code>$ clang --version
  Apple LLVM version 9.1.0 (clang-902.0.39.1)
  Target: x86_64-apple-darwin17.4.0
  Thread model: posix
  InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  $ which clang
  /usr/bin/clang
  </code></pre>
  
  <p>This does not seem right. Why is the Apple's version of Clang greater than the current version of Clang?</p>
  
  <p>How do I find out which version of Clang hosted on <a href="http://releases.llvm.org/download.html" rel="noreferrer">http://releases.llvm.org/download.html</a> does my Mac's version of Clang correspond to?</p>
  
  <p>I ask this because I see <a href="http://releases.llvm.org/6.0.0/tools/clang/docs/UsersManual.html" rel="noreferrer">http://releases.llvm.org/6.0.0/tools/clang/docs/UsersManual.html</a> documenting a <code>-pedantic</code> option for the <code>clang</code> command line, but it is not documented in the man page of <code>clang</code> on my system.</p>
  
  <pre><code>$ man clang | grep pedantic
  $ clang --help | grep pedantic
  $
  </code></pre>