[llvm-bugs] [Bug 33923] New: getGlobalID() always returns 0
llvm-bugs at lists.llvm.org
Tue Jul 25 06:15:20 PDT 2017
Bug ID: 33923
Summary: getGlobalID() always returns 0
OS: MacOS X
Assignee: unassignedclangbugs at nondot.org
Reporter: me at tiferrei.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18842
Source file, output and test file
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:
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")
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs