diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -1622,6 +1622,7 @@ tok::kw___is_signed, tok::kw___is_standard_layout, tok::kw___is_trivial, + tok::kw___is_trivially_equality_comparable, tok::kw___is_trivially_assignable, tok::kw___is_trivially_constructible, tok::kw___is_trivially_copyable, diff --git a/clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp b/clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp new file mode 100644 --- /dev/null +++ b/clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=gnu++20 -fms-extensions -Wno-microsoft %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=gnu++2b -fms-extensions -Wno-microsoft %s + +template +struct Same { + static constexpr auto value = __is_same(T, U); +}; + +template +struct __is_trivially_equality_comparable { // expected-warning{{keyword '__is_trivially_equality_comparable' will be made available as an identifier for the remainder of the translation unit}} + using type = T; +}; + +using A = Same<__is_trivially_equality_comparable::type, __is_trivially_equality_comparable::type>;