[cfe-dev] Clang SA: GDM tags

Bhargava Shastry bshastry at sec.t-labs.tu-berlin.de
Wed Mar 25 10:48:05 PDT 2015


Hi,

I am writing a Generic Data Map (GDM) client, a checker basically.
Comment in ProgramState.h reads:

> The typical way that clients generate unique tags are by taking the address of a static variable.

Question: Can one use pointer to Decl as a GDM tag? In other words, are
Decl pointers in a translation unit unique?

Code perusal reveals that Decls belong to an object instance (possibly
AnalysisConsumer). So, in theory they are non-unique and should not be
used as a GDM tag. Is that correct?

Thanks and Regards,
Bhargava



More information about the cfe-dev mailing list