I've found that most often the proper way to fix this warning is to add
static, because if the code otherwise compiles and links, the function
or variable is apparently not needed outside of the TU.
There is no fix-it for the rare case of an "extern definition", because
that would require removing extern and I have no idea how to get the
source location of the storage class specifier from a VarDecl. I believe
this information is only available earlier in the AST construction from
DeclSpec::getStorageClassSpecLoc(), but we don't have that here.