Skip to content
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

Update __config to make clangd happy #1019

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nzpznk
Copy link

@nzpznk nzpznk commented Mar 3, 2024

The sgx-sdk uses _LIBCPP_COMPILER_GCC macro to modify the stl. However, when using clangd, the language sever defines clang macro, so that if matches clang first, the _LIBCPP_COMPILER_GCC will not be defined, thus causing clangd to report error.

The sgx-sdk uses _LIBCPP_COMPILER_GCC macro to modify the stl. However, when using clangd, the language sever defines __clang__ macro, so that if matches __clang__ first, the _LIBCPP_COMPILER_GCC will not be defined, thus causing clangd to report error.
@@ -234,7 +234,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// TODO: GCC 5 lies about its support for C++17 (it says it supports it but it
// really doesn't). That breaks variant, which uses some C++17 features.
// Remove this once we drop support for GCC 5.
#if _LIBCPP_STD_VER > 14 && !(defined(_LIBCPP_COMPILER_GCC) && _GNUC_VER_NEW < 6000)
#if _LIBCPP_STD_VER > 14

Copy link
Contributor

Choose a reason for hiding this comment

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

you commit message seems not match the changes. Can you state the problem to solve, then describe the changes accurately?
I don't see you update variant. You also removed condition for _LIBCPP_COMPILER_GCC. The reason for the changes is not clear to me.
also note the TODO comment. It seems we should only drop the condition if we don't support GCC5.
I'm not sure if we decided to do that. Maybe others have more ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants