I would suggest using a full-blown c++ parser instead.
Clang is a suit of libraries that fully understand C++ because the very libraries that you can use for your analysis are those used by the compiler (talk about dog fooding). You can access several "layers": Abstract Syntax Tree, Control Flow Graph. And there is already a static analyzer framework in place for which you can implement passes.
Finally, and perhaps the most interesting thing, you can interact from C++ OR C, and there are even Python bindings (though notably incomplete) on top of the C interface.
Honestly, given the god-aweful complexity of C++ grammars, it would take a masochist to use anything short of a real semantic parser nowadays.
Other parsers (courtesy of Ira Baxter) include: