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
diff --git a/lldb/source/Expression/IRMemoryMap.cpp b/lldb/source/Expression/IRMemoryMap.cpp
index 008838d..7b9d266 100644
--- a/lldb/source/Expression/IRMemoryMap.cpp
+++ b/lldb/source/Expression/IRMemoryMap.cpp
@@ -126,7 +126,7 @@
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;
}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index c542b36..4ddf697 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -498,7 +498,7 @@
ti->getLocation(), &invalid);
if (invalid) {
- lldbassert(!"Unhandled token kind");
+ lldbassert(0 && "Unhandled token kind");
macro_expansion.append("<unknown literal value>");
} else {
macro_expansion.append(
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index caebd0c..e5fb9dc 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -2119,7 +2119,7 @@
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;
}