<div dir="ltr"><div><div><div><div><div><div>Actually we use some extension over the C language.<br></div><div>Our build process is as follow :<br></div><div><br></div>User C files with special macros.<br></div>    --> C preprocessor --><br>
</div>Preprocessed C files with special macros.<br></div>    --> Specialized preprocessor --><br></div>Pure preprocessed C files<br></div>    --> Compiler (or analyzer)<br><div>Binary files (or report)<br></div><div>
<br></div><div>This build process is transparent for the developers using this "special C dialect". All preprocessed files are temporary files.<br></div><div>What i would like to achieve, is to relate the reports to the user written files (not to the temporary preprocessed files).<br>
</div><div></div><div><br></div><div>If i understand correctly, it is not possible to do this with html output, as it is directly created from the clang AST ?<br><br></div><div></div><div>Do you consider the <file> <line> <col> attribute in the plist report as the "presumed location" ? (doesn't honor #line at the moment)<br>
</div><div>Or is the  "presumed location"only the "stderr" report ? (already honor #line)<br><br></div><div>So the way to go seems to translate the plist according to the #line.<br></div><div>Then i need to transform them into a "manager friendly format"...<br>
<br></div><div>Do you know any open source tool that already perform some king of formating of clang generated plist reports that could serve as an example ?<br></div><div><br></div><div>Thanks,<br></div><div>Julien<br></div>
<div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-07 18:33 GMT+02:00 Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The plist diagnostic locations are deliberately not using #line numbers because they are intended for consumption by an IDE. If you had a (pre-preprocessed) file with #line markers in it, you wouldn't want those to screw up the plist display (and in Xcode's case, the nice arrows), especially if you no longer had the original file.<br>

<br>
The HTML output, likewise, is built on top of being able to print the entire input file as HTML. Since Clang doesn't have any other representation of the source, it has to use the file you give it, i.e. the preprocessed file. (This is also why the HTML output cannot display cross-file issues, so it's already something we'd be willing to change.) For the text that describes the location of the bug, though, it could definitely make sense to honor #line. Clang's term for this is the "presumed location".<br>

<br>
What is your desired output?<br>
Jordan<br>
<div><div class="h5"><br>
<br>
On Jul 7, 2014, at 2:42 , Julien Tous <<a href="mailto:julien.tous@gmail.com">julien.tous@gmail.com</a>> wrote:<br>
<br>
> I am using the static-analyser through scan-build command on code that has already been preprocessed by an external tool.<br>
> Although the stdout diagnostic uses the #line informations contained in the preprocessed source files, both the plist and html outputs don't.<br>
><br>
> I would very much like to get html reports on the user written code instead of the preprocessed one.<br>
><br>
> Here come the questions :<br>
><br>
> Is there an existing way to transform a plist report into an html report ?<br>
> I could then output reports in plist, convert them using #lines information, transform them into an html report.<br>
><br>
> Are there other tools that render the plist files into a user friendly representation ?<br>
><br>
> Can someone help me to identify what is missing to directly handle the #line directive directly in the html report (i have a very limited knowledge of the toolchain right now), and comment on the difficulty of the task, and if it would make sense to integrate it ?<br>

><br>
> Thanks,<br>
> Julien<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div><br></div>