Tweak fallthrough comments to get recognized by gcc7 (#4298)

GCC gained a new warning, -Wimplicit-fallthrough, which warns about
implicitly falling through a case statement. The regular expressions
used at the default level (-Wimplicit-fallthrough=3) don't match with
a colon at the end. The comment also needs to be followed (after
optional whitespace and other comments) by a 'case' or 'default'
keyword, i.e. it will not be recognized with a '}' between the comment
and the keyword.
This commit is contained in:
Heiko Becker
2017-05-08 22:35:55 +02:00
committed by Wouter van Oortmerssen
parent 8f8a27d6e5
commit bbb72f0b73
2 changed files with 4 additions and 4 deletions

View File

@@ -301,7 +301,7 @@ Type DestinationType(const Type &type, bool vectorelem) {
case BASE_TYPE_VECTOR:
if (vectorelem)
return DestinationType(type.VectorType(), vectorelem);
// else fall thru:
// else fall thru
default: return type;
}
}
@@ -348,7 +348,7 @@ std::string DestinationMask(const Type &type, bool vectorelem) {
case BASE_TYPE_VECTOR:
if (vectorelem)
return DestinationMask(type.VectorType(), vectorelem);
// else fall thru:
// else fall thru
default: return "";
}
}