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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/tlibcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@
#define __has_include(...) 0
#endif

#if defined(__clang__)
#if defined(__GNUC__)
# define _LIBCPP_COMPILER_GCC
#elif defined(__clang__)
# define _LIBCPP_COMPILER_CLANG
# ifndef __apple_build_version__
# define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
# endif
#elif defined(__GNUC__)
# define _LIBCPP_COMPILER_GCC
#elif defined(_MSC_VER)
# define _LIBCPP_COMPILER_MSVC
#elif defined(__IBMCPP__)
Expand Down
2 changes: 1 addition & 1 deletion sdk/tlibcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -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.

_LIBCPP_NORETURN
inline _LIBCPP_INLINE_VISIBILITY
Expand Down