leonardchan added a comment.

In https://reviews.llvm.org/D50278#1189919, @rjmccall wrote:

> I would expect this to replace the existing warning, not to appear together 
> with it.


Will do.



================
Comment at: test/Sema/conditional-expr.c:78
+                       // expected-error@-1{{converting 
'__attribute__((address_space(2))) int *' to type 'void *' changes address 
space of pointer}}
+                       // expected-error@-2{{converting 
'__attribute__((address_space(3))) int *' to type 'void *' changes address 
space of pointer}}
 
----------------
rjmccall wrote:
> Also, these diagnostics seem wrong.  Where is `void *` coming from?
When dumping the AST this is what the resulting type is for the conditional 
expression already is if the operands are 2 pointers with different address 
spaces.

According to this comment, the reason seems to be because this is what GCC does:

```
 6512     // In this situation, we assume void* type. No especially good
 6513     // reason, but this is what gcc does, and we do have to pick
 6514     // to get a consistent AST.
```


Repository:
  rC Clang

https://reviews.llvm.org/D50278



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

Reply via email to