Fixed #7248 (crash in ValueType::str())
This commit is contained in:
parent
1e0979779e
commit
2f26195b23
|
@ -3934,5 +3934,5 @@ std::string ValueType::str() const
|
||||||
if (constness & (2 << p))
|
if (constness & (2 << p))
|
||||||
ret += " const";
|
ret += " const";
|
||||||
}
|
}
|
||||||
return ret.substr(1);
|
return ret.empty() ? ret : ret.substr(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3008,6 +3008,9 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void valuetype() {
|
void valuetype() {
|
||||||
|
// stringification
|
||||||
|
ASSERT_EQUALS("", ValueType().str());
|
||||||
|
|
||||||
// numbers
|
// numbers
|
||||||
ASSERT_EQUALS("signed int", typeOf("1", "1"));
|
ASSERT_EQUALS("signed int", typeOf("1", "1"));
|
||||||
ASSERT_EQUALS("unsigned int", typeOf("1U", "1U"));
|
ASSERT_EQUALS("unsigned int", typeOf("1U", "1U"));
|
||||||
|
|
Loading…
Reference in New Issue