[cfe-dev] Visual Studio parsable error output from clang-cl

Hans Wennborg hans at chromium.org
Mon May 5 15:44:36 PDT 2014


Hi Kim,

On Sat, May 3, 2014 at 4:31 PM, Kim <soldoutseashell at gmail.com> wrote:
> Hi guys,
>
> I'm working on an extension for visual studio 2013 that will let me compile
> with clang-cl and I want to have the output from clang fully integrated into
> the output pane and error list. The errors I'm getting from clang-cl look
> like this:

Would your extension be doing anything different from e.g. the
"LLVM-vs2013" toolset that gets installed by the llvm toolchain
installer from http://llvm.org/builds/? Because improvements to that
are welcome :)

> C:\Users\Kim\Documents\Visual Studio
> 2013\Projects\ConsoleApplication8\ConsoleApplication8\Source.cpp(5,2) :
> error: use of undeclared identifier 'ohno'
>
> While the regular VS error format looks like this:
>>c:\users\kim\documents\visual studio
>> 2013\projects\consoleapplication8\project1\source.cpp(6): error C2065:
>> 'safsa' : undeclared identifier
>
> And the clang error line is not parsed for the error list correctly with
> ParseOutputStringForTaskItem

Do you have any idea of what the critical difference is between the
output formats?

[..]

> I figure that clang-cl outputs visual studio compatible error messages by
> default but I just wanted to check with the experts. Maybe someone here has
> already got this working.

It tries to be compatible, but it's probably not perfect. If you know
how to make the output more compatible, that would be great.

Thanks,
Hans



More information about the cfe-dev mailing list