How do I know what Xcode versions are supported in Homebrew for my specific macOS version?

The runtime error message prints the maximum version for macOS 10.14:

Please update to Xcode 11.3.1

I don’t think brew documentation contain this information, but the source code contains the table in switch-case blocks, both for

  def latest_version(macos: MacOS.version)
    case macos
    when "10.14" then "11.3.1"

  def minimum_version
    case MacOS.version
    when "10.14" then "10.2"

so brew thinks any version from Xcode version 10.2 through 11.3.1 will work on macOS 10.14.

There’s a seperate table for the Command Line Tools (CLT) which says the minimum Xcode version is 10.0.0.