Skip to content

Conversation

@foxtran
Copy link
Member

@foxtran foxtran commented Feb 21, 2025

This patch fixes warning which occurs during compilation of clang with GCC:

C++ style comments are not allowed in ISO C90

Similar PR for clang: #128189

@llvmbot
Copy link
Member

llvmbot commented Feb 21, 2025

@llvm/pr-subscribers-llvm-support

Author: None (foxtran)

Changes

This patch fixes warning which occurs during compilation of clang with GCC:

C++ style comments are not allowed in ISO C90

Similar PR for clang: #128189


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

1 Files Affected:

  • (modified) llvm/include/llvm/Support/AutoConvert.h (+4-4)
diff --git a/llvm/include/llvm/Support/AutoConvert.h b/llvm/include/llvm/Support/AutoConvert.h
index 5d6d9394ef1d8..4f6a3d2ac48fa 100644
--- a/llvm/include/llvm/Support/AutoConvert.h
+++ b/llvm/include/llvm/Support/AutoConvert.h
@@ -55,14 +55,14 @@ std::error_code restorezOSStdHandleAutoConversion(int FD);
 /** \brief Set the tag information for a file descriptor. */
 std::error_code setzOSFileTag(int FD, int CCSID, bool Text);
 
-// Get the the tag ccsid for a file name or a file descriptor.
+/** Get the the tag ccsid for a file name or a file descriptor. */
 ErrorOr<__ccsid_t> getzOSFileTag(const char *FileName, const int FD = -1);
 
-// Query the file tag to determine if it needs conversion to UTF-8 codepage.
+/** Query the file tag to determine if it needs conversion to UTF-8 codepage. */
 ErrorOr<bool> needzOSConversion(const char *FileName, const int FD = -1);
 
-} // namespace llvm
-#endif // __cplusplus
+} /* namespace llvm */
+#endif /* __cplusplus */
 
 #endif /* __MVS__ */
 

Comment on lines +58 to 63
/** Get the the tag ccsid for a file name or a file descriptor. */
ErrorOr<__ccsid_t> getzOSFileTag(const char *FileName, const int FD = -1);

// Query the file tag to determine if it needs conversion to UTF-8 codepage.
/** Query the file tag to determine if it needs conversion to UTF-8 codepage. */
ErrorOr<bool> needzOSConversion(const char *FileName, const int FD = -1);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is disabled in C code, I made these changes to unify style in whole file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants