Sirraide wrote:

> Is this addressing a diagnostic you're seeing in the wild? This shouldn't be 
> necessary because the `case` statements are adjacent to one another with only 
> comments/whitespace between them: https://godbolt.org/z/oM7x65hq9
> 
> (I'd like to understand the motivation better because I don't think we want 
> to add `[[fallthrough]]` to all adjacent cases in the code base, so this 
> seems inconsistent.)

I agree that it seems unnecessary and I probably wouldn’t add it, but in this 
case the comment indicates (at least to me) that it’s maybe not obvious that 
fallthrough was intended (for whatever reason)—and at the very least, there is 
precedent for us using `[[fallthrough]]` in adjacent case labels in some places.

https://github.com/llvm/llvm-project/pull/85921
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to