[PATCH] D66487: Fix -Wimplicit-fallthrough warnings in regcomp.c

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 11:55:32 PDT 2019


nickdesaulniers requested changes to this revision.
nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Support/regcomp.c:540
 		REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
-		/* FALLTHROUGH */
+		__attribute__((fallthrough));
 	default:
----------------
aaron.ballman wrote:
> The macros in Compiler.h should be updated so that this can use `LLVM_FALLTHROUGH` instead to prevent compile errors.
ah, right, otherwise we get into situations where older versions of clang (or other bootstrap compilers) that don't have this feature don't understand this attribute


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66487/new/

https://reviews.llvm.org/D66487





More information about the llvm-commits mailing list