[PATCH] D66487: Fix -Wimplicit-fallthrough warnings in regcomp.c
Nathan Huckleberry via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 11:20:07 PDT 2019
Nathan-Huckleberry created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Nathan-Huckleberry added a reviewer: aaron.ballman.
Nathan-Huckleberry added a subscriber: nickdesaulniers.
Since clang does not support comment style fallthrough annotations
these should be switched.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66487
Files:
llvm/lib/Support/regcomp.c
Index: llvm/lib/Support/regcomp.c
===================================================================
--- llvm/lib/Support/regcomp.c
+++ llvm/lib/Support/regcomp.c
@@ -537,7 +537,7 @@
break;
case '{': /* okay as ordinary except if digit follows */
REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
+ __attribute__((fallthrough));
default:
ordinary(p, c);
break;
@@ -733,7 +733,7 @@
break;
case '*':
REQUIRE(starordinary, REG_BADRPT);
- /* FALLTHROUGH */
+ __attribute__((fallthrough));
default:
ordinary(p, (char)c);
break;
@@ -1635,7 +1635,7 @@
return;
}
} while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* fallthrough */
+ __attribute__((fallthrough));
default: /* things that break a sequence */
if (newlen > g->mlen) { /* ends one */
start = newstart;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66487.216196.patch
Type: text/x-patch
Size: 849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190820/5bc11a85/attachment.bin>
More information about the llvm-commits
mailing list