2

Besides simply get and check the decls' name, are there some methods in clang to compare whether two or more decls (clang::Decl) are same or not?

ignorer
  • 327
  • 1
  • 11
  • Did you ever solve this? – Peter Mar 30 '21 at 09:27
  • I would think the solution is `clang::Decl::getID`. – Peter Mar 30 '21 at 09:37
  • If you are comparing two `Decl` objects that are both in memory at the same time, and both part of the same translation unit, then just compare their addresses to see if they are the same object. Otherwise, please explain in more detail what you mean by "same". – Scott McPeak Jul 23 '23 at 16:36

0 Answers0