Brew doctor asking to update xcode, while its already updated
The problem here is just simply that brew is detecting an old version of Xcode. If it was objecting to the version of the command line tools that you have installed you'd be getting a different error message.

A newer Command Line Tools release is available.
Update them from Software Update in the App Store.


You can see the actual code here yourself. The checks for Xcode and the command line tools are separate.

The way to fix this message from brew doctor is either to remove the old version of Xcode or update it.