mizvekov marked 2 inline comments as done.
mizvekov added inline comments.

================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:8643
     QualType MatchedType =
-        BuildDecltypeType(E, E->getBeginLoc()).getCanonicalType();
+        BuildDecltypeType(E, E->getBeginLoc(), true, true).getCanonicalType();
     llvm::SmallVector<TemplateArgument, 1> Args;
----------------
mizvekov wrote:
> rsmith wrote:
> > Instead of adding complexity to the type system to deal with this special 
> > case, can you directly create a `ParenExpr` here?
> Hmm I thought about that. Since I am a bit unfamiliar with the code there, I 
> was not sure it was going to end up being more or less complicated than the 
> proposed solution. But I'll give it a shot if that looks simpler to you.
So yeah, now we just get the type of the expression directly, by using the now 
exposed underlying code from decltype.
This is OK since the expressions in the requires clause were never dependent in 
the first place.
Even though just creating the parensexpr would likely lead to a smaller change 
as in number of lines of code modified, I think not using it makes the fact 
that dependency is not an issue here more clear in the code than just reusing 
the full decltype machinery.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98160

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to