[clang] [clang][docs] Fix example in likely/unlikely attr documentation (PR #126372)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 8 07:06:04 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Marc Auberer (marcauberer)
<details>
<summary>Changes</summary>
Fixes #<!-- -->126362
---
Full diff: https://github.com/llvm/llvm-project/pull/126372.diff
1 Files Affected:
- (modified) clang/include/clang/Basic/AttrDocs.td (+3-3)
``````````diff
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 0ad4c958d09830..2a0354a3222eba 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -2450,9 +2450,9 @@ path of execution, but that can be confusing:
.. code-block:: c++
- if (b) {
- [[unlikely]] --b; // In the path of execution,
- // this branch is considered unlikely.
+ if (b) [[unlikely]] {
+ --b; // In the path of execution,
+ // this branch is considered unlikely.
}
if (b) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/126372
More information about the cfe-commits
mailing list