JonasToth added a comment.

In https://reviews.llvm.org/D50953#1230003, @shuaiwang wrote:

> In https://reviews.llvm.org/D50953#1229287, @JonasToth wrote:
>
> > What happens to pointers in a typedef (in the sense of `*` instead of `&`)?
>
>
> I checked around and I believe reference type is the only type we're 
> explicitly matching right now. We'll need to handle carefully when handling 
> pointer types in the future.


We match on pointers as values. So figure this out `int * >const< ptr = 
nullptr`.
And the constness transformation is especially intersting for pointer typedefs, 
because in `typedef int * IntPtr; const IntPtr p1; IntPtr const p2;` p1 and p2 
are  different things. It would be nice if you could check, that the value 
semantic of the pointer is detected through the typedef as well.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50953



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

Reply via email to