[libcxx-commits] [clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 23 03:03:27 PDT 2024
================
@@ -2282,6 +2282,10 @@ class Sema final : public SemaBase {
/// Check to see if a given expression could have '.c_str()' called on it.
bool hasCStrMethod(const Expr *E);
+ // Check whether a type member 'Type::Name' exists, and if yes, return the
+ // type. If there is no type, the QualType is null
+ QualType getTypeMember(StringRef Name, QualType Type);
----------------
Sirraide wrote:
```suggestion
/// Check whether a type member 'Type::Name' exists, and if yes, return the
/// type. If there is no type, the QualType is null
QualType getTypeMember(QualType Type, StringRef Name);
```
This should probably be a doc comment.
Nit: since that entails touching this file anyway: I’d also swap the two parameters because reading `Type::Name` in the comment but having the first parameter be `Name` and the second `Type` makes it a bit harder to read, but that might also just be a me problem ;Þ
https://github.com/llvm/llvm-project/pull/99473
More information about the libcxx-commits
mailing list