I think the right way to handle this would be to filter out declarations that are neither `FunctionDecl`s nor `VarDecl`s after performing the lookup. (According to the specification, we should also filter out declarations with internal linkage.) We should also filter out internal-linkage declarations and non-TU-scope declarations when we perform the deferred handling of `ExtnameUndeclaredIdentifiers` in `ActOnVariableDeclarator` and `ActOnFunctionDeclarator`.
That said, I'm not sure why your testcase was failing -- `LookupSingleName` in `LookupOrdinaryName` mode in C should not find tag names, so we should have deferred adding the attribute already. Is a `typedef` missing from the testcase, perhaps? http://reviews.llvm.org/D10187 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
