[clang] [clang] Use ISO C90 style comment in C code (PR #128189)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 07:55:25 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: None (foxtran)

<details>
<summary>Changes</summary>

This patch fixes warning which occurs during compilation of clang with GCC:
```
C++ style comments are not allowed in ISO C90
```


---
Full diff: https://github.com/llvm/llvm-project/pull/128189.diff


1 Files Affected:

- (modified) clang/tools/c-index-test/c-index-test.c (+1-1) 


``````````diff
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 0e7de8b98ea07..2fdb1b2548ff6 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -1223,7 +1223,7 @@ static CXString createCXString(const char *CS) {
 static CXString duplicateCXString(const char *CS) {
   CXString Str;
   Str.data = strdup(CS);
-  Str.private_flags = 1; // CXS_Malloc
+  Str.private_flags = 1; /* CXS_Malloc */
   return Str;
 }
 

``````````

</details>


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


More information about the cfe-commits mailing list