[cfe-commits] [PATCH] Determine if FromType is signed in conversion of character prvalues

Douglas Gregor dgregor at apple.com
Tue Jul 5 10:51:35 PDT 2011


On Jun 14, 2011, at 9:37 PM, David Majnemer wrote:

> Hi,
> 
> This is a simple patch, the FIXME was not fixable before due to the
> nonexistence of split wchar types in the BuiltinType::Kind enum. clang
> has had types like WChar_S for quite some time now so it should simply
> be a matter of querying the underlying BuiltinType's signedness which
> is what this patch should do.
> 
> I cannot seem to write a meaningful test. If one is needed, a pointer
> would be nice...


Patch looks good. Usually we would test this with something like

	int &f(unsigned); 
	float &f(long); 
	void g() { wchar_t w; int &ir = f(w); } 

but we don't seem to have any platforms where we can get this to resolve the way we want it. Please go ahead and commit

	- Doug



More information about the cfe-commits mailing list