[cfe-dev] -emit-html example
Török Edwin
edwintorok at gmail.com
Fri Apr 18 04:09:30 PDT 2008
Chris Lattner wrote:
> One of the spiffy things that Ted is doing with his static analysis
> stuff is having it emit reports in HTML. A required part of this is
> just being able to turn code itself into HTML. I think that the stuff
> clang is doing is pretty cool, so I thought I'd show an example.
>
> Here's "gcc.c" from llvm-gcc converted to html with:
>
> $ clang -I <tons of stuff> gcc.c -emit-html -o gcc.html
>
>
>
>
> the code has line numbers and is syntax highlighted. In addition, if
> you float your mouse over a macro (which are displayed in red bold
> letters), a pop-up shows the tokens that that instance of the macro
> expanded out into. I picked gcc.c because it has a ton of macros.
> Take a look at the examples around line 1410 and line 750 for some fun
> examples.
Line 1446 has a ^L that shows up ugly in firefox, but the original
source has it too.
Maybe control characters should be output escaped and with a different
class?
Best regards,
--Edwin
More information about the cfe-dev
mailing list