Clang-cl - errors and warning messages slightly different from MSVC

Hi Clang developers,

Thanks very much for a great compiler, and in particular for the
amazing MSVC-compatible support in Clang-cl. I bumped into an
intriguing issue, which may have been discussed previously; if so
apologies, as my google-fu didn't uncover any matches.

The TL;DR of it is that I use clang-cl with CDash (part of the CMake
toolset) and I noticed that there are some tiny differences in error
reporting between Clang-cl and MSVC, causing the CDash scrapping
regexes to fail [1]. Basically, it boils down to the introduction of
an extra space after "error" and "warning" in Clang-cl, when compared
to MSVC [2].

I wonder if there is a rationale for these differences, and if not, if
it is possible to remove the extra space.

Many thanks for your time.

Basically, it boils down to the introduction of an extra space after "error" and "warning" in Clang-cl, when compared to MSVC [2].

Apologies, meant to say before, i.e. instead of ": warning ", I see ":
warning ". Same for errors.

Hi Clang developers,

Thanks very much for a great compiler, and in particular for the
amazing MSVC-compatible support in Clang-cl. I bumped into an
intriguing issue, which may have been discussed previously; if so
apologies, as my google-fu didn't uncover any matches.

The TL;DR of it is that I use clang-cl with CDash (part of the CMake
toolset) and I noticed that there are some tiny differences in error
reporting between Clang-cl and MSVC, causing the CDash scrapping
regexes to fail [1]. Basically, it boils down to the introduction of
an extra space after "error" and "warning" in Clang-cl, when compared
to MSVC [2].

I wonder if there is a rationale for these differences, and if not, if
it is possible to remove the extra space.

Well, this is embarrassing.

Many eyes have seen these diagnostics and yet nobody noticed, or at
least bothered to report, the extra space before, so thank you very
much for raising this!

It is indeed a bug; the extra space is not supposed to be there. Our
tests should have caught this:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/diag-format.c?view=markup
however the testing tool helpfully ignored the difference in
horizontal whitespace.

The fix is here: https://reviews.llvm.org/D58377

This will of course not help users of older versions of Clang, so it
might still be a good idea to make CDash's regexes less strict about
this whitespace if possible.

Thanks,
Hans

<whitespace differences in error reporting>

Well, this is embarrassing.

Many eyes have seen these diagnostics and yet nobody noticed, or at
least bothered to report, the extra space before, so thank you very
much for raising this!

No problems!

It is indeed a bug; the extra space is not supposed to be there. Our
tests should have caught this:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/diag-format.c?view=markup
however the testing tool helpfully ignored the difference in
horizontal whitespace.

The fix is here: https://reviews.llvm.org/D58377

You're a superstar Hans, thanks very much for the quick turnaround.

This will of course not help users of older versions of Clang, so it
might still be a good idea to make CDash's regexes less strict about
this whitespace if possible.

I'll have a chat with the CDash devs, now the problem is understood
maybe they will be OK with such a patch.

Thanks very much.