diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index f699ff3c2637d55088f761a7ec4a910a6af4df6b..2435a8f0dd42f607bf4968ad24235bead293008f 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -231,7 +231,7 @@ module OS
         end
       end
 
-      def latest_version
+      def latest_clang_version
         # As of Xcode 8 CLT releases are no longer in sync with Xcode releases
         # on the older supported platform for that Xcode release, i.e there's no
         # CLT package for 10.11 that contains the Clang version from Xcode 8.
@@ -266,7 +266,7 @@ module OS
         clang_version = detect_clang_version
         return false unless clang_version
 
-        ::Version.new(clang_version) < latest_version
+        ::Version.new(clang_version) < latest_clang_version
       end
 
       def detect_clang_version