Hi cfe-commits, This patch handles a specific (but surprisingly common) case when a fall-through occurs to a switch label immediately followed by a break;. In this case it doesn't make sense to suggest a fall-through annotation, almost certainly inserting break; is a good fix-it. Example:
switch (x) {
case 111:
f();
case 222: // don't offer "[[clang::fallthrough]];", just "break;"
break;
}
Please, review this patch.
--
Best regards,
Alexander Kornienko
fallthrough-to-empty-case.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
