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

Richard legalize at xmission.com
Sun May 4 18:20:40 PDT 2014


In article <53657C53.5040609 at gmail.com>,
    Kim <soldoutseashell at gmail.com> writes:

> 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.

This problem has also surfaced with unit test libraries that try to
output assertion messages in a format compatible with the error pane
in VS.

It's actually worse than you think.

What was detected as a matching expression has changed in different
editions of Visual Studio.  I believe the last time this stopped
working with unit test frameworks it was because the matcher became
sensitive to spaces around the :'s, but its been a while and I don't
recall the details.

So, how to fix this in clang-cl?  Well, I suppose you could introduce
command line arguments to affect the formatting of the messages to be
compatible with a particular edition of VS.  An alternate solution is
to wrap the execution of clang-cl and massage the message output to be
compatible.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the cfe-dev mailing list