[clang] [clang][docs] Fix example in likely/unlikely attr documentation (PR #126372)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 9 11:25:18 PDT 2025


AaronBallman wrote:

> Hmm, I think what this section is trying to demonstrate is that ‘_According to the standard_, this is in the path of execution and therefore _supposed_ to be considered unlikely, but we don’t do that’, so maybe it’d be better to reword/expand the comment instead?

This matches my understanding. Basically, the `CompoundStmt` that gets added for that example makes the `NullStmt` the second statement in the branch rather than the first, and we give up on that, IIUC.

https://github.com/llvm/llvm-project/pull/126372


More information about the cfe-commits mailing list