[cfe-dev] Question about include stack printing on diagnostic notes

Argyrios Kyrtzidis akyrtzi at gmail.com
Tue Sep 6 21:53:56 PDT 2011


On Sep 6, 2011, at 9:35 PM, Chandler Carruth wrote:

> On Tue, Sep 6, 2011 at 9:31 PM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> On Sep 6, 2011, at 9:06 PM, Chandler Carruth wrote:
> 
>> On Tue, Sep 6, 2011 at 8:55 PM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
>> Here's an example where I'd like include stack on the note:
>> 
>> Interesting example. Is there a heuristic here we could use to actually default some of these back on?
>> 
>> Off the cuff, maybe show it if
>> - the note and the diagnostic have the same location, and
>> - the include stack for the diagnostic and the note differ, and
>> - the include stack for the note differs from that of any previous notes for that diagnostic
> 
> How about show when the FileEntry of the note is the same as a previous note/warning but different FileID.
> 
> Can you explain this in terms that the average user of Clang (rather than developer) would understand? I *think* i understand it, but i'm not confident.

A FileEntry refers to the file in the file system but if the same source file (same FileEntry) is #include'd more than once then it gets a unique FileID each time.
So if we have 2 diagnostics that point inside the same file but inside different FileIDs it means they refer to different inclusions of the same file, thus it'd be useful to see the inclusion stacks in such a case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110906/5a550d1f/attachment.html>


More information about the cfe-dev mailing list