This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG33e21610f9cd: [clang] makes `__is_trivially_equality_comparable` available as a struct (authored by cjdb).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148677/new/ https://reviews.llvm.org/D148677 Files: clang/lib/Parse/ParseDeclCXX.cpp clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp Index: clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp =================================================================== --- /dev/null +++ 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 <class T, class U> +struct Same { + static constexpr auto value = __is_same(T, U); +}; + +template <class T> +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<int>::type, __is_trivially_equality_comparable<int>::type>; Index: clang/lib/Parse/ParseDeclCXX.cpp =================================================================== --- clang/lib/Parse/ParseDeclCXX.cpp +++ 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,
Index: clang/test/SemaCXX/libcxx_is_trivially_equality_comparable_hack.cpp =================================================================== --- /dev/null +++ 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 <class T, class U> +struct Same { + static constexpr auto value = __is_same(T, U); +}; + +template <class T> +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<int>::type, __is_trivially_equality_comparable<int>::type>; Index: clang/lib/Parse/ParseDeclCXX.cpp =================================================================== --- clang/lib/Parse/ParseDeclCXX.cpp +++ 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,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits