mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-01 12:11:51 +00:00
Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)
llvm-svn: 228928
This commit is contained in:
1 parent
351dde4e03
commit
c08e8f81ec
1 file changed
+1
-1
@@ -33,8 +33,8 @@ void test ( const CharT *s ) {
|
||||
string_view_t sv1;
|
||||
string_t str = (string_t) sv1;
|
||||
|
||||
assert ( sv1.size() == 0);
|
||||
assert ( sv1.size() == str.size ());
|
||||
assert ( std::char_traits<CharT>::compare ( sv1.data(), str.data(), sv1.size()) == 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user