[cfe-commits] [PATCH][PR11329] Generalize -Wempty-body: warn when statement body is a empty

Anna Zaks ganna at apple.com
Wed Jan 4 13:17:22 PST 2012


On Jan 4, 2012, at 11:44 AM, Dmitri Gribenko wrote:

> I agree that we might want to reduce false positive rate for `for' and
> `while' statements, but more elaborate ways (for example, checking if
> the statement is followed by a CompoundStmt) would require shifting
> this to static analyzer.
> 

This would still be a syntactic check. Why can't it be part of sema checking?

Anna.

> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list