Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`. Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because: * MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds * but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds. Differential Revision: https://phabricator.services.mozilla.com/D56440
This commit is contained in:
@@ -3887,7 +3887,7 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
||||
break; // If we are submitting, do not send click event
|
||||
}
|
||||
// else fall through and treat Space like click...
|
||||
MOZ_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
}
|
||||
case NS_FORM_INPUT_BUTTON:
|
||||
case NS_FORM_INPUT_RESET:
|
||||
@@ -3909,7 +3909,7 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
||||
case NS_VK_UP:
|
||||
case NS_VK_LEFT:
|
||||
isMovingBack = true;
|
||||
MOZ_FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case NS_VK_DOWN:
|
||||
case NS_VK_RIGHT:
|
||||
// Arrow key pressed, focus+select prev/next radio button
|
||||
|
||||
Reference in New Issue
Block a user