It is way more than that.
There are more keywords than class to look for, you have to understand modifiers, virtual inheritance, multiple inheritance, visibility, namespaces, namespace aliases, inline namespaces. And then of course all the nasty things you can do with the preprocessor, conditional compilation, macros. Even the syntax is not that easy than you think, scatter some inline comments between the components, move the separators around, omit whitespace, don't get confused by forward declarations. Plus that what oBFusCATed wrote before i finished this text
.
If you don't deal with all that you end up with very limited functionality that pretty much only covers cases in which you don't need the diagram at all or simply can take a look whatever doxygen generates for you.