[cfe-dev] USR for CTU analysis

Gábor Márton via cfe-dev cfe-dev at lists.llvm.org
Mon May 20 08:55:27 PDT 2019


> But this is a C program. What does template mean in C?
That appears to be a simple C function then with two ulong params.

 > Also, ASTImporter sometimes raises “name conflict” even though the
function has a unique name and the AST file is in ctu-dir.
You may get a "name conflict" if two nodes in the merged AST has different
definitions.
Here is one example with two TUs:
// a.c
enum A { x, y, z };
// b.c
enum B { z };
Now merging them would result a conflicting definition for the global enum
constant `z` which has the value 2 in a.c and 0 in b.c. This is a
warning/error because we cannot answer which value we should use during the
analysis.

Gabor

On May 20, 2019, at 8:38 AM, Gábor Márton <martongabesz at gmail.com> wrote:
>
> Taking a look at USRGeneration.cpp, it seems to me that '#l#l' indicates
> two (template?) arguments with ulong types.
>
> Gabor
>
> On Sat, May 18, 2019 at 10:43 PM Kihong Heo via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi list,
>>
>> index::generateUSRForDecl sometimes returns USR names followed by special
>> characters such as
>>
>> c:@F at UA_memoryManager_calloc#l#l
>> c:ua_types.c at F@clear_noInit#*v#*1$@S at UA_DataType#
>>
>> Could someone explain what “#l#l” mean?
>> And the second case looks quite different from other cases. It would be
>> appreciated if you could give some explanation.
>>
>> Thanks,
>> Kihong
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190520/d5f2bac2/attachment.html>


More information about the cfe-dev mailing list