[PATCH] D118552: [clang] [concepts] Correctly(?) handle placeholder types in ExprRequirements.

Nathan Sidwell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 31 10:28:33 PST 2022


urnathan added inline comments.


================
Comment at: clang/lib/AST/ASTContext.cpp:3373
 ASTContext::getLValueReferenceType(QualType T, bool SpelledAsLValue) const {
-  assert(getCanonicalType(T) != OverloadTy &&
-         "Unresolved overloaded function type");
+  if (T->isPlaceholderType()) {
+    assert(T->isSpecificPlaceholderType(BuiltinType::UnknownAny) &&
----------------
sorry to be picky, but
 (a) why the {...} on the single body stmt? Isn't that against style?
 (b) are we sure the if's condition is sufficiently const so that it goes away when the assert is inactive?  if's containing a single assert make me nervous.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118552/new/

https://reviews.llvm.org/D118552



More information about the cfe-commits mailing list