For a few years now, FreeBSD has been carrying around a patch to recognize "CC" and "clang-CC" as progname aliases for g++ mode. I would really like to get this into upstreamed, to eliminate as many custom patches as I can.
I've just put the FreeBSD specific part between #if FreeBSD delimiters, but I suspect other OSes with case sensitive filesystems, and a historic usage of CC as g++ aliases will also want to use this. Those can add additional defines later on.