https://bugs.llvm.org/show_bug.cgi?id=33923
Bug ID: 33923
Summary: getGlobalID() always returns 0
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: m...@tiferrei.com
CC: llvm-bugs@lists.llvm.org
Created attachment 18842
--> https://bugs.llvm.org/attachment.cgi?id=18842&action=edit
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:
http://clang-developers.42468.n3.nabble.com/Getting-the-unique-ID-for-a-clang-Decl-td4052968.html
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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs