This patch extends the loops checks that originally only had checked
for-loops to also check while and do-while loops.  Changes are:

- Add a bit to VarDecl to keep track if a variable has been passed by
reference (but not const reference) or had its address taken.
- If the bit above is set on a variable, do not emit the warning.  Also,
don't emit the warning for parameter variables in while loops.
- Don't warn on variable declared inside a conditional.
- Don't warn when there is a function call to a noreturn function inside
the loop.

Attachment: loop-analysis.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to