[cfe-dev] Getting fully qualified names of random qualtypes.

Sterling Augustine via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 13 14:01:18 PDT 2015


On Tue, Oct 13, 2015 at 1:33 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
>>
>> https://root.cern.ch/gitweb?p=root.git;a=blob;f=interpreter/cling/lib/Utils/AST.cpp
>>
>> Does it makes sense to upstream this functionality from cling into clang?
>>
>
> Presumably clang needs to do this in places already (diagnostic messages,
> etc?)? Have you found any instances of that? Is there existing code doing
> that work that could be refactored into something reusable (that way it's
> being actually executed and tested within Clang's many codepaths, which is
> helpful to avoid bitrot, etc)
>

To the best of my knowledge, it doesn't exist. Certainly not in
diagnostics, which try to reproduce what the user wrote, rather than what
they would need to write in general. (In particular, things like
template_A<nested_type_0, template_B<nested_type_1>> seem to never have
sub-types get fully expanded. I've looked for this in clang, and it is
possible I missed something, so happy for any pointers.

Clang is oriented to reproducing the source code as written, not what one
would need to write to access it from a random namespace.

This is one of several bits of functionality where the comment in my code
is: "one would think this is implemented somewhere in clang, but one would
be wrong". (Generic fully-qualified lookup being another. Also implemented
in cling, but is not very complicated, so not as big of a deal as this.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151013/2f3171db/attachment.html>


More information about the cfe-dev mailing list