Hi Eli, 2012/6/21 Eli Friedman <[email protected]>: > Ah... looks like we don't call it for tentative definitions (which we > handle in Sema::ActOnEndOfTranslationUnit). This has no effect for > the existing checks in CheckCompleteVariableDeclaration because none > of them apply to global variables in C. That could easily be changed, > though.
Gotcha! Thanks for the pointer. > Actually, you might want some special handling for tentative > definitions. What do you expect the warning to do for a testcase like > "int x; int x = 10;"? Well, effectively I want to do the same as C++: int x must always be preceded by extern int i, which is typically placed in a header file. > I think it just got renamed to getPreviousDecl(). Got it. I've updated the patch. As usual, it can be downloaded from: http://80386.nl/pub/wmissing-variable-declarations.txt -- Ed Schouten <[email protected]> _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
