This is prone to ODR violations and generally frowned upon in many
codebases (e.g. LLVM). The checker flags definitions, variables and
classes in the global namespace. Common false positives like extern "C"
functions are filtered, symbols with internal linkage or hidden
visibility are not warned on either.
On LLVM most of the instances are helper functions that should be just
made static or globals that belong into a namespace.
I think it would be better to check it in matcher.
I see that there is isExternC, but it only works for FunctionDecl, but I think that adding isExternC for VarDecl would be good