[cfe-dev] Can all static data in C++ project be found with the command line?

Yuri yuri at rawbw.com
Wed Oct 22 07:42:25 PDT 2014


Often it is beneficial to have the list of all static values in C++ 
project. (Reasons include analyzing thread safety and static 
initialization order problems)
Obviously, this should be doable when the code is compiled with clang. 
But is there a reasonable command line that can do this?
It is possible to print out all code in textual .ll form, and grep for 
certain patterns. But I am looking for a nicer way.

Yuri



More information about the cfe-dev mailing list