Silence some -Wstring-conversion warnings

lldbassert(!"foo") -> lldbassert(0 && "foo")

In one case, this actually detected a logic error in the assertion (missing !).

llvm-svn: 291102
This commit is contained in:
Pavel Labath 2017-01-05 13:18:42 +00:00
parent 3480e83118
commit f31c9d27a4
3 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ lldb::addr_t IRMemoryMap::FindSpace(size_t size) {
err = process_sp->GetMemoryRegionInfo(
region_info.GetRange().GetRangeEnd(), region_info);
if (err.Fail()) {
lldbassert(!"GetMemoryRegionInfo() succeeded, then failed");
lldbassert(0 && "GetMemoryRegionInfo() succeeded, then failed");
ret = LLDB_INVALID_ADDRESS;
break;
}

View File

@ -498,7 +498,7 @@ void ClangModulesDeclVendorImpl::ForEachMacro(
ti->getLocation(), &invalid);
if (invalid) {
lldbassert(!"Unhandled token kind");
lldbassert(0 && "Unhandled token kind");
macro_expansion.append("<unknown literal value>");
} else {
macro_expansion.append(

View File

@ -2119,7 +2119,7 @@ CompilerType ClangASTContext::CreateStructForIdentifier(
if (!type_name.IsEmpty() &&
(type = GetTypeForIdentifier<clang::CXXRecordDecl>(type_name))
.IsValid()) {
lldbassert("Trying to create a type for an existing name");
lldbassert(0 && "Trying to create a type for an existing name");
return type;
}