diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-11-28 00:44:16 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-11-28 00:44:16 -0500 |
| commit | f537c51f2560564042da690e8fe3b6e85d9592c8 (patch) | |
| tree | 8c1570ea09a4978047bb45bd889f0f4dd989bb9c /src/ir.cpp | |
| parent | 1ab84a27d374e666463c606dc1cd1c4972b52a74 (diff) | |
| parent | 57049b95b3fe183ea995f212b18e70212eaac23e (diff) | |
| download | zig-f537c51f2560564042da690e8fe3b6e85d9592c8.tar.gz zig-f537c51f2560564042da690e8fe3b6e85d9592c8.zip | |
Merge branch 'c-field-expr' of https://github.com/dimenus/zig into dimenus-c-field-expr
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
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); } } } |
