Skip to content

Commit

Permalink
[locop] Fix for static analysis
Browse files Browse the repository at this point in the history
This will fix for static analysis to check nullptr.

Signed-off-by: SaeHie Park <saehie.park@gmail.com>
  • Loading branch information
seanshpark committed Jan 22, 2025
1 parent b63d00a commit 57350dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/locop/src/CanonicalNodeSummaryBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace
*/
std::string opname(const loco::Node *node)
{
if (node->dialect() == loco::CanonicalDialect::get())
if (node && node->dialect() == loco::CanonicalDialect::get())
{
auto canonical_node = loco::must_cast<const loco::CanonicalNode *>(node);

Expand Down

0 comments on commit 57350dd

Please sign in to comment.