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.