Skip to content

Commit 7754b65

Browse files
committed
[lldb][NFC] lldb_assert->lldbassert in ClangExpressionParser
lldbassert is the macro that takes care of passing along line/file/function to the lldb_assert function. Let's call that instead of manually calling the function.
1 parent eed57dd commit 7754b65

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,23 +281,22 @@ ClangExpressionParser::ClangExpressionParser(
281281

282282
// We can't compile expressions without a target. So if the exe_scope is
283283
// null or doesn't have a target, then we just need to get out of here. I'll
284-
// lldb_assert and not make any of the compiler objects since
284+
// lldbassert and not make any of the compiler objects since
285285
// I can't return errors directly from the constructor. Further calls will
286286
// check if the compiler was made and
287287
// bag out if it wasn't.
288288

289289
if (!exe_scope) {
290-
lldb_assert(exe_scope, "Can't make an expression parser with a null scope.",
291-
__FUNCTION__, __FILE__, __LINE__);
290+
lldbassert(exe_scope &&
291+
"Can't make an expression parser with a null scope.");
292292
return;
293293
}
294294

295295
lldb::TargetSP target_sp;
296296
target_sp = exe_scope->CalculateTarget();
297297
if (!target_sp) {
298-
lldb_assert(target_sp.get(),
299-
"Can't make an expression parser with a null target.",
300-
__FUNCTION__, __FILE__, __LINE__);
298+
lldbassert(target_sp.get() &&
299+
"Can't make an expression parser with a null target.");
301300
return;
302301
}
303302

0 commit comments

Comments
 (0)