-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[libc++](NFC) Remove unused include caused by wrong __has_include #141328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-libcxx Author: Tomohiro Kashiwada (kikairoya) ChangesThe parameter passed to __has_include has to be quoted by Full diff: https://github.com/llvm/llvm-project/pull/141328.diff 1 Files Affected:
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index d981d137cf1ba..c15ce54fae23a 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -34,7 +34,7 @@
# define _CTYPE_DISABLE_MACROS
#endif
-#if __has_include("<langinfo.h>")
+#if __has_include(<langinfo.h>)
# include <langinfo.h>
#endif
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that nobody complained so far, is this even required?
On linux (or most of other systems), this typo is silently treated as header is not found Anyway,
|
The parameter passed to __has_include has to be quoted by `<>` or `"`, not both. Due to this typo, the guarded header is never included. No problem has been reported by unconditionally skip of including, so it would be safe to simply remove the conditionally include block.
a35faec
to
860f2ac
Compare
The parameter passed to __has_include has to be quoted by
<>
or"
, not both.