[libcxx-commits] [clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)
Richard Smith via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 25 14:55:10 PDT 2024
================
@@ -6848,6 +6848,14 @@ CXXRecordMembersNamed(StringRef Name, Sema &S, QualType Ty) {
return Results;
}
+QualType Sema::getTypeMember(QualType Type, StringRef Name) {
+ auto Results = CXXRecordMembersNamed<TypeDecl>(Name, *this, Type);
+ assert(Results.size() <= 1);
+ if (Results.empty())
+ return {};
+ return Context.getTypeDeclType(*Results.begin());
+}
----------------
zygoloid wrote:
This is bypassing access and ambiguity diagnostics, which doesn't seem correct given that a `common_type` specialization could have a private `type` member.
https://github.com/llvm/llvm-project/pull/99473
More information about the libcxx-commits
mailing list