[cfe-commits] [PATCH] "missing else" warning

Alexander Zinenko ftynse at gmail.com
Fri Jan 18 10:41:57 PST 2013


Hi!

I implemented a warning in parser as suggested here
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121217/159766.html,
e.g. warn in the following case
if () {
} if () { // probably should have been 'else if'
} else {
}

Please review!

This diagnostic found two places in chromium and another one in firefox
source base that are suspicious to have missed else.

By the way, there is a name clash between
Parser::ParenParseOption::CompoundStmt and CompoundStmt from AST.  Maybe
the former is worth renaming?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130118/34c4b100/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing-else.patch
Type: application/octet-stream
Size: 4638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130118/34c4b100/attachment.obj>


More information about the cfe-commits mailing list