summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_demangle.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-03-08 20:50:28 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-03-08 20:50:28 +0000
commit71c4857a078506ef9fe9ac7c5be83864f45784ff (patch)
treef60caba074af00cdc3a2f031c1c4dcb9ce019fce /libcxxabi/src/cxa_demangle.cpp
parent37c247c13c49ef365cdac3e206e5651586d9435c (diff)
downloadbcm5719-llvm-71c4857a078506ef9fe9ac7c5be83864f45784ff.tar.gz
bcm5719-llvm-71c4857a078506ef9fe9ac7c5be83864f45784ff.zip
Enable/silence -Wsign-compare.
llvm-svn: 152335
Diffstat (limited to 'libcxxabi/src/cxa_demangle.cpp')
-rw-r--r--libcxxabi/src/cxa_demangle.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp
index 7cfd1a81e10..95a873a89a9 100644
--- a/libcxxabi/src/cxa_demangle.cpp
+++ b/libcxxabi/src/cxa_demangle.cpp
@@ -42,8 +42,8 @@ public:
size_t __size_;
__node* __left_;
__node* __right_;
- long double __value_;
long __cached_size_;
+ long double __value_;
public:
__node()
: __name_(0), __size_(0), __left_(0), __right_(0), __cached_size_(-1)
@@ -3718,7 +3718,7 @@ public:
{
if (__left_ == 0)
{
- if (__size_ < t_end - t_begin)
+ if (__size_ < static_cast<size_t>(t_end - t_begin))
{
__left_ = t_begin[__size_];
__size_ = 0;
@@ -8149,7 +8149,7 @@ __demangle_tree::__parse_template_param(const char* first, const char* last)
if (t == last || *t != '_')
return first;
++sub;
- if (sub < __t_end_ - __t_begin_)
+ if (sub < static_cast<size_t>(__t_end_ - __t_begin_))
{
if (__make<__sub>(__t_begin_[sub]))
first = t+1;
@@ -10078,7 +10078,7 @@ __demangle_tree::__parse_source_name(const char* first, const char* last)
if (++t == last)
return first;
}
- if (last - t >= n && __make<__source_name>(t, n))
+ if (static_cast<size_t>(last - t) >= n && __make<__source_name>(t, n))
first = t + n;
}
}
@@ -10576,7 +10576,7 @@ __demangle_tree::__parse_substitution(const char* first, const char* last)
if (t == last || *t != '_')
return first;
++sub;
- if (sub < __sub_end_ - __sub_begin_)
+ if (sub < static_cast<size_t>(__sub_end_ - __sub_begin_))
{
if (__make<__sub>(__sub_begin_[sub]))
first = t+1;
@@ -10809,13 +10809,13 @@ printf("\n");
const unsigned N = 4096;
char tmp[N];
ptrdiff_t s;
- if (est <= bs)
+ if (static_cast<size_t>(est) <= bs)
{
char* e = dmg_tree.__get_demangled_name(buf);
*e++ = '\0';
s = e - buf;
}
- else if (est <= N)
+ else if (static_cast<size_t>(est) <= N)
{
char* e = dmg_tree.__get_demangled_name(tmp);
*e++ = '\0';
@@ -10823,7 +10823,7 @@ printf("\n");
}
else
s = static_cast<ptrdiff_t>(dmg_tree.size() + 1);
- if (s > bs)
+ if (static_cast<size_t>(s) > bs)
{
buf = static_cast<char*>(realloc(buf, static_cast<size_t>(s)));
if (buf == NULL)
@@ -10835,9 +10835,9 @@ printf("\n");
if (n)
*n = static_cast<size_t>(s);
}
- if (est > bs)
+ if (static_cast<size_t>(est) > bs)
{
- if (est <= N)
+ if (static_cast<size_t>(est) <= N)
strncpy(buf, tmp, static_cast<size_t>(s));
else
*dmg_tree.__get_demangled_name(buf) = '\0';
OpenPOWER on IntegriCloud