mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-22 23:47:51 +00:00
Merge remote-tracking branch 'offical/master'
This commit is contained in:
+1
-1
@@ -8729,7 +8729,7 @@ gb_internal ExprKind check_or_branch_expr(CheckerContext *c, Operand *o, Ast *no
|
||||
// okay
|
||||
} else {
|
||||
gbString s = type_to_string(right_type);
|
||||
error(node, "'%.*s' requires a boolean or nil-able type, got %s", s);
|
||||
error(node, "'%.*s' requires a boolean or nil-able type, got %s", LIT(name), s);
|
||||
gb_string_free(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3493,20 +3493,6 @@ gb_internal DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
|
||||
error(elem, "Expected a string value for '%.*s'", LIT(name));
|
||||
}
|
||||
return true;
|
||||
} else if (name == "warning") {
|
||||
ExactValue ev = check_decl_attribute_value(c, value);
|
||||
|
||||
if (ev.kind == ExactValue_String) {
|
||||
String msg = ev.value_string;
|
||||
if (msg.len == 0) {
|
||||
error(elem, "Warning message cannot be an empty string");
|
||||
} else {
|
||||
ac->warning_message = msg;
|
||||
}
|
||||
} else {
|
||||
error(elem, "Expected a string value for '%.*s'", LIT(name));
|
||||
}
|
||||
return true;
|
||||
} else if (name == "require_results") {
|
||||
if (value != nullptr) {
|
||||
error(elem, "Expected no value for '%.*s'", LIT(name));
|
||||
|
||||
@@ -1082,6 +1082,9 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
build_context.build_mode = BuildMode_Assembly;
|
||||
} else if (str == "llvm" || str == "llvm-ir") {
|
||||
build_context.build_mode = BuildMode_LLVM_IR;
|
||||
} else if (str == "test") {
|
||||
build_context.build_mode = BuildMode_Executable;
|
||||
build_context.command_kind = Command_test;
|
||||
} else {
|
||||
gb_printf_err("Unknown build mode '%.*s'\n", LIT(str));
|
||||
gb_printf_err("Valid build modes:\n");
|
||||
@@ -1091,6 +1094,7 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
gb_printf_err("\texe\n");
|
||||
gb_printf_err("\tasm, assembly, assembler\n");
|
||||
gb_printf_err("\tllvm, llvm-ir\n");
|
||||
gb_printf_err("\ttest\n");
|
||||
bad_flags = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user