aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-11-28 03:00:13 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-11-28 03:00:13 -0500
commit8d5c4a67a7dfe2e1fc07f84515d59405c4100b5c (patch)
tree9e0a7501730d34fd8fe0dafdadb172733008e162 /src/ir.cpp
parent1ab84a27d374e666463c606dc1cd1c4972b52a74 (diff)
parente745544dacc5bda010fc65e5c8b81cb3b5249223 (diff)
downloadzig-8d5c4a67a7dfe2e1fc07f84515d59405c4100b5c.tar.gz
zig-8d5c4a67a7dfe2e1fc07f84515d59405c4100b5c.zip
Merge branch 'dimenus-c-field-expr'
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index f632a261f6..7c15b48bee 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6302,8 +6302,9 @@ static Buf *get_anon_type_name(CodeGen *codegen, IrExecutable *exec, const char
buf_appendf(name, ")");
return name;
} else {
+ //Note: C-imports do not have valid location information
return buf_sprintf("(anonymous %s at %s:%" ZIG_PRI_usize ":%" ZIG_PRI_usize ")", kind_name,
- buf_ptr(source_node->owner->path), source_node->line + 1, source_node->column + 1);
+ (source_node->owner->path != nullptr) ? buf_ptr(source_node->owner->path) : "(null)", source_node->line + 1, source_node->column + 1);
}
}
}