[cfe-commits] [Patch] Add -Wmissing-variable-declarations

Ed Schouten ed at 80386.nl
Thu Oct 18 02:57:22 PDT 2012


Hi Eli,

2012/8/1 Eli Friedman <eli.friedman at gmail.com>:
> On Tue, Jul 24, 2012 at 7:06 AM, Ed Schouten <ed at 80386.nl> wrote:
>> I've updated the patch. As usual, it can be downloaded from:
>>
>> http://80386.nl/pub/wmissing-variable-declarations.txt
>
> @@ -6839,8 +6839,10 @@
>        }
>
>        // Record the tentative definition; we're done.
> -      if (!Var->isInvalidDecl())
> +      if (!Var->isInvalidDecl()) {
>          TentativeDefinitions.push_back(Var);
> +        CheckCompleteVariableDeclaration(Var);
> +      }
>        return;
>      }
>
> Calling CheckCompleteVariableDeclaration here doesn't make sense; the
> variable isn't complete at this point.  If we're going to call it, it
> should be from Sema::ActOnEndOfTranslationUnit.
>
> Otherwise, looks fine.

Great! Care to take another look?

http://80386.nl/pub/wmissing-variable-declarations.txt

(Be sure to refresh)

-- 
Ed Schouten <ed at 80386.nl>



More information about the cfe-commits mailing list