azabaznov marked an inline comment as done.
azabaznov added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:15289
+            ExpectedResultType->getAs<PointerType>()) {
+      ExpectedResultType = SemaRef.Context.getCanonicalType(
+          RemoveAddressSpaceFromPtr(SemaRef, ExpectedPtrTy->getTypePtr()));
----------------
Anastasia wrote:
> FYI I think `ExpectedResultType` is going to be in always in the canonical 
> form here by the way it is constructed so `getCanonicalType` should be 
> redundant.
> 
> 
Not sure if I understand this one, because `QualType` can't be cast to 
`CanQualType` so I think `getCanonicalType()` is needed. But I tried to unify 
existing logic and rewrote `RemoveAddressSpaceFromPtr()` to return 
`CanQualType` as it can be implicitly cast to `QualType`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96178

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

Reply via email to