local/unnamed enums as diagnostic parameters

Hi,

we've got a bunch of warnings on bootstrap bots since a few days ago
related to the use of local or anonymous enums in Sema::Diag(). This
results in template operator<< of SemaDiagnosticBuilder being
instantiated with an unnamed type, which, AFAIK, is invalid. Seems
like the right fix is cast such values to (int),

http://lab.llvm.org:8011/builders/clang-x86_64-debian-selfhost-rel/builds/4751/steps/compile.llvm.stage2/logs/warnings%20(10)

What really concerns me is the fact that self-hosted build of clang
has not been warning-free for several days, and no one seems to care.
And the bots do not enforce it. If this is still a goal (and I believe
it should be) then I suggest turning on -Werror on one or all
self-hosted bots and paying attention to regressions.

This is an extension to c++98 and OK in c++11. I think it is a common
extension and we can just disable the warning. Richard, what do you
think?

Generally, the factor blocking us using C++11 features within Clang is
lack of support for the feature from system compilers that might be
used to build Clang. If every compiler we care about supports this
feature (in its C++98 mode, where applicable -- and someone will need
to verify that), then I'm fine with disabling the warning, but I'd
prefer to do that at the LLVM level rather than at the Clang level.

Chris: does that sound reasonable to you?

Generally, the factor blocking us using C++11 features within Clang is
lack of support for the feature from system compilers that might be
used to build Clang. If every compiler we care about supports this
feature

(As far as I know, none of MSVS 2005, 2008, 2010, 2012, gcc 4.2, 4.4, 4.6
warn about unnamed type template parameters, only clang does. We use them
in Chromium.)