Hi,
I'm trying to solve an issue with a clang-tidy check on the following example code:
static union {
int global;
};
Clearly this shows up in the AST as a CXXRecordDecl under the TranslationUnitDecl: https://godbolt.org/z/j8GqxvEYd
For debugging, I am overriding the ASTConsumer::HandleTopLevelDecl function in MatchASTConsumer, and I am just simply dumping the Decls that get picked up by it.
I notice that this CXXRecordDecl of the union is not picked up by this function.
Is this intentional? Why are global anonymous unions not registered as a "top level declaration"?
Thanks!