[compiler-rt] [scudo] Make comment compatible with gcc (PR #106137)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 13:46:47 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Caslyn Tonelli (Caslyn)
<details>
<summary>Changes</summary>
gcc interprets a backslash '\' as the last char before a new line as a line continuation character, even in a comment context. This can produce an "error: multi-line comment [-Werror=comment]".
This PR places an innocuous '.' following the '\' so that the comment can compile with gcc.
---
Full diff: https://github.com/llvm/llvm-project/pull/106137.diff
1 Files Affected:
- (modified) compiler-rt/lib/scudo/standalone/secondary.h (+1-1)
``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 985e2392641ae2..0690cb65b68468 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -426,7 +426,7 @@ class MapAllocatorCache {
// The difference between the retrieved memory chunk and the request
// size is at most MaxAllowedFragmentedPages
//
- // / MaxAllowedFragmentedPages * PageSize \
+ // / MaxAllowedFragmentedPages * PageSize \.
// +--------------------------+-------------+
// | | |
// +--------------------------+-------------+
``````````
</details>
https://github.com/llvm/llvm-project/pull/106137
More information about the llvm-commits
mailing list