<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - getGlobalID() always returns 0"
href="https://bugs.llvm.org/show_bug.cgi?id=33923">33923</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>getGlobalID() always returns 0
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>me@tiferrei.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18842" name="attach_18842" title="Source file, output and test file">attachment 18842</a> <a href="attachment.cgi?id=18842&action=edit" title="Source file, output and test file">[details]</a></span>
Source file, output and test file
Hello there,
I was trying to get some kind of ID for each node that Clang passes me, I
needed this to later detect if functions are repeatedly called, and I'd use the
ID to match functions.
So I decided to take a look at `getGlobalID()` (clang::Decl::getGlobalID) and
see if this would give me some unique identifiers. Oddly enough, this seems to
always return an ID of "0" for all functions. So after some googling I also
found this post:
<a href="http://clang-developers.42468.n3.nabble.com/Getting-the-unique-ID-for-a-clang-Decl-td4052968.html">http://clang-developers.42468.n3.nabble.com/Getting-the-unique-ID-for-a-clang-Decl-td4052968.html</a>
which seems to get to this same conclusion.
I am a beginner in clang generally and so I don't know if this is just
something that I'm doing incorrectly or really a bug. I have attached the
specific source file and some example output.
PS: The ideal for me would be to actually get the hex code that is shown right
after each node's type (in "CompoundStmt 0x7f8c39807198 <col:12, line:21:1>"
I'd like to get "0x7f8c39807198")
Thank you,
tiferrei</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>