How can I get the #pragma pack information in Clang Static Analyzer?

Hi all,

Some program may specify the #pragma pack information for controlling record layout. Now I want to get the default or the specified #pragma pack information in Clang Static Analyzer. So how can I obtain this kind of information in my checker?

Thanks a lot.

Are you trying to check what alignment a record has within the static analyzer? I think you should be able to check the alignment attributes (ex: AlignMac68kAttr or MaxFieldAlignmentAttr) on a given RecordDecl to see what the set alignment is.

Cheers,

Anna.