Enable/silence -Wconversion.

llvm-svn: 152328
This commit is contained in:
Howard Hinnant 2012-03-08 20:16:45 +00:00
parent 941d092933
commit d121eb2c24
4 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@ then
fi
EXTRA_FLAGS="-std=c++0x -stdlib=libc++ -fstrict-aliasing -Wstrict-aliasing=2 \
-Wsign-conversion -Wshadow -Wnewline-eof"
-Wsign-conversion -Wshadow -Wconversion -Wnewline-eof"
case $TRIPLE in
*-apple-*)

View File

@ -460,7 +460,7 @@ class __source_name
: public __node
{
public:
__source_name(const char* __name, unsigned __size)
__source_name(const char* __name, size_t __size)
{
__name_ = __name;
__size_ = __size;
@ -5962,7 +5962,7 @@ class __dot_suffix
: public __node
{
public:
__dot_suffix(__node* name, const char* suffix, unsigned sz)
__dot_suffix(__node* name, const char* suffix, size_t sz)
{
__left_ = name;
__name_ = suffix;
@ -10259,7 +10259,7 @@ __demangle_tree::__parse_nested_name(const char* first, const char* last)
}
break;
case 'U':
assert(!"__parse_nested_name U");
// assert(!"__parse_nested_name U");
// could have following <template-args>
break;
case 'T':

View File

@ -247,7 +247,7 @@ readEncodedPointer(const uint8_t** data, uint8_t encoding)
p += sizeof(uint32_t);
break;
case DW_EH_PE_udata8:
result = *((uint64_t*)p);
result = static_cast<uintptr_t>(*((uint64_t*)p));
p += sizeof(uint64_t);
break;
case DW_EH_PE_sdata2:
@ -527,7 +527,7 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception
// Walk call-site table looking for range that
// includes current PC.
uint8_t callSiteEncoding = *lsda++;
uint32_t callSiteTableLength = readULEB128(&lsda);
uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
const uint8_t* callSiteTableStart = lsda;
const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;
const uint8_t* actionTableStart = callSiteTableEnd;

View File

@ -54,7 +54,7 @@ heap_node *node_from_offset ( const heap_offset offset )
{ return (heap_node *) ( heap + ( offset * sizeof (heap_node))); }
heap_offset offset_from_node ( const heap_node *ptr )
{ return static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node); }
{ return static_cast<heap_offset>(static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node)); }
void init_heap () {
freelist = (heap_node *) heap;
@ -87,7 +87,7 @@ void *fallback_malloc(size_t len) {
p->len -= nelems;
q = p + p->len;
q->next_node = 0;
q->len = nelems;
q->len = static_cast<heap_size>(nelems);
return (void *) (q + 1);
}