[llvm] 771e4e8 - regcomp.c: Restore LLVM_FALLTHROUGH to fix -Wc23-extensions

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 18:01:46 PDT 2024


Author: Fangrui Song
Date: 2024-04-25T18:01:41-07:00
New Revision: 771e4e89662f623be6e45bd4b84103552e5e910f

URL: https://github.com/llvm/llvm-project/commit/771e4e89662f623be6e45bd4b84103552e5e910f
DIFF: https://github.com/llvm/llvm-project/commit/771e4e89662f623be6e45bd4b84103552e5e910f.diff

LOG: regcomp.c: Restore LLVM_FALLTHROUGH to fix -Wc23-extensions

Added: 
    

Modified: 
    llvm/lib/Support/regcomp.c

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index 9555a25e18e99b..990aef32a396fa 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -538,7 +538,7 @@ p_ere_exp(struct parse *p)
 		break;
 	case '{':		/* okay as ordinary except if digit follows */
 		REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
-		[[fallthrough]];
+		LLVM_FALLTHROUGH;
 	default:
 		ordinary(p, c);
 		break;
@@ -734,7 +734,7 @@ p_simp_re(struct parse *p,
 		break;
 	case '*':
 		REQUIRE(starordinary, REG_BADRPT);
-		[[fallthrough]];
+		LLVM_FALLTHROUGH;
 	default:
 		ordinary(p, (char)c);
 		break;
@@ -1634,7 +1634,7 @@ findmust(struct parse *p, struct re_guts *g)
 					return;
 				}
 			} while (OP(s) != O_QUEST && OP(s) != O_CH);
-			[[fallthrough]];
+			LLVM_FALLTHROUGH;
 		default:		/* things that break a sequence */
 			if (newlen > g->mlen) {		/* ends one */
 				start = newstart;


        


More information about the llvm-commits mailing list