Age | Commit message (Collapse) | Author | Files | Lines |
|
We need a finer grain to filter tests and organise them.
gcc/testsuite/ChangeLog:
* rust/compile/builtin_macro_compile_error.rs: Move to...
* rust/compile/macros/builtin/compile_error.rs: ...here.
* rust/compile/builtin_macro_concat.rs: Move to...
* rust/compile/macros/builtin/concat.rs: ...here.
* rust/compile/builtin_macro_eager1.rs: Move to...
* rust/compile/macros/builtin/eager1.rs: ...here.
* rust/compile/builtin_macro_eager2.rs: Move to...
* rust/compile/macros/builtin/eager2.rs: ...here.
* rust/compile/builtin_macro_eager3.rs: Move to...
* rust/compile/macros/builtin/eager3.rs: ...here.
* rust/compile/builtin_macro_env.rs: Move to...
* rust/compile/macros/builtin/env.rs: ...here.
* rust/compile/builtin_macro_include_bytes.rs: Move to...
* rust/compile/macros/builtin/include_bytes.rs: ...here.
* rust/compile/builtin_macro_include_bytes_location_info.rs: Move to...
* rust/compile/macros/builtin/include_bytes_location_info.rs: ...here.
* rust/compile/builtin_macro_include_str.rs: Move to...
* rust/compile/macros/builtin/include_str.rs: ...here.
* rust/compile/builtin_macro_include_str_location_info.rs: Move to...
* rust/compile/macros/builtin/include_str_location_info.rs: ...here.
* rust/compile/builtin_macro_not_found.rs: Move to...
* rust/compile/macros/builtin/not_found.rs: ...here.
* rust/compile/builtin_macro_recurse2.rs: Move to...
* rust/compile/macros/builtin/recurse2.rs: ...here.
* rust/compile/macros/builtin/builtin_macro.exp: New test.
* rust/compile/invalid_utf8: Move invalid-utf8 data to...
* rust/compile/macros/builtin/invalid_utf8: ...here.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
|
|
This will allow us to revert our dependency on extern types, which would
help our godbolt build as well as our various builders.
gcc/rust/ChangeLog:
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Remove extern
type feature.
* checks/errors/borrowck/ffi-polonius/src/lib.rs: Define FFIVector
per the nomicon's recommendation
https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs
|
|
gcc/testsuite/ChangeLog:
* rust/compile/macros/proc/proc_macro.exp: New deja gnu file to execute
proc-macro tests.
* rust/compile/proc_macro_attribute_crate_type.rs: Move to...
* rust/compile/macros/proc/attribute_crate_type.rs: ...here.
* rust/compile/proc_macro_attribute_non_function.rs: Move to...
* rust/compile/macros/proc/attribute_non_function.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_function.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_function.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_method.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_method.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_module.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_module.rs: ...here.
* rust/compile/proc_macro_attribute_private.rs: Move to...
* rust/compile/macros/proc/attribute_private.rs: ...here.
* rust/compile/proc_macro_crate_type.rs: Move to...
* rust/compile/macros/proc/crate_type.rs: ...here.
* rust/compile/proc_macro_derive_crate_type.rs: Move to...
* rust/compile/macros/proc/derive_crate_type.rs: ...here.
* rust/compile/proc_macro_derive_malformed.rs: Move to...
* rust/compile/macros/proc/derive_malformed.rs: ...here.
* rust/compile/proc_macro_derive_non_function.rs: Move to...
* rust/compile/macros/proc/derive_non_function.rs: ...here.
* rust/compile/proc_macro_derive_non_root_function.rs: Move to...
* rust/compile/macros/proc/derive_non_root_function.rs: ...here.
* rust/compile/proc_macro_derive_non_root_module.rs: Move to...
* rust/compile/macros/proc/derive_non_root_module.rs: ...here.
* rust/compile/proc_macro_derive_private.rs: Move to...
* rust/compile/macros/proc/derive_private.rs: ...here.
* rust/compile/proc_macro_non_function.rs: Move to...
* rust/compile/macros/proc/non_function.rs: ...here.
* rust/compile/proc_macro_non_root_function.rs: Move to...
* rust/compile/macros/proc/non_root_function.rs: ...here.
* rust/compile/proc_macro_non_root_method.rs: Move to...
* rust/compile/macros/proc/non_root_method.rs: ...here.
* rust/compile/proc_macro_non_root_module.rs: Move to...
* rust/compile/macros/proc/non_root_module.rs: ...here.
* rust/compile/proc_macro_derive_non_root_method.rs: Move to...
* rust/compile/macros/proc/non_root_trait_method.rs: ...here.
* rust/compile/proc_macro_private.rs: Move to...
* rust/compile/macros/proc/private.rs: ...here.
* rust/compile/proc_macro_pub_function.rs: Move to...
* rust/compile/macros/proc/pub_function.rs: ...here.
* rust/compile/proc_macro_pub_module.rs: Move to...
* rust/compile/macros/proc/pub_module.rs: ...here.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
|
|
gcc/rust/ChangeLog:
* ast/rust-ast.cc:
Fix Attribute constructors to copy inner_attribute
* checks/errors/rust-unsafe-checker.cc:
Add pass for #[may_dangle] in safe impl's
* hir/rust-ast-lower-item.cc:
Add support for unsafe impl's
* hir/rust-ast-lower-type.cc:
Lower attributes in impl's from AST to HIR
* hir/rust-hir-dump.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir-item.h:
Add unsafe support to Impl blocks in HIR
* hir/tree/rust-hir.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir.h:
Add has/get_outer_attribute to GenericParam
gcc/testsuite/ChangeLog:
* rust/compile/issue-3045-1.rs:
Add test for #[may_dangle] Generic Type triggering error
* rust/compile/issue-3045-2.rs:
Add test for #[may_dangle] Lifetime triggering error
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
|
|
gcc/testsuite/ChangeLog:
* rust/rustc/README.md: information about
rustc external directory.
* rust/rustc/rustc.exp: New test.
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-cfg-strip.cc:
Strip struct expr fields and strip fields in struct definition
* expand/rust-cfg-strip.h:
Signatures for new function maybe_strip_struct_expr_fields
gcc/testsuite/ChangeLog:
* rust/compile/macro-issue2983_2984.rs:
Add test to check for correct stripped fields
Signed-off-by: Antonio Gomes <antoniospg100@gmail.com>
|
|
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
Add rich error message and error code similiar to rustc with
associaed type and trait name
gcc/testsuite/ChangeLog:
* rust/compile/unknown-associated-item.rs: New test.
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-expand-visitor.cc:
Fix ICE caused by unique_ptr UB and buggy iterator use
gcc/testsuite/ChangeLog:
* rust/compile/issue-2987.rs:
Add test for deriving Clone and Copy at the same time
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.h (enum ParseMode):
Drop typedef in Cpp
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs:
Remove repr(C)
* libformat_parser/src/bin.rs: Use ffi
* libformat_parser/src/lib.rs: pub ffi, create ParseMode and match
rustc's parse mode
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect):
Added options for ParseMode
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Likewise.
* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler):
Likewise.
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Likewise.
* libformat_parser/src/bin.rs: Likewise.
* libformat_parser/src/lib.rs: Likewise.
|
|
Change the assert of (expr != nullptr) to
(this->expr != nullptr) because we assigned (std::move(expr)) to
this->expr, no need to assert expr
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct AnonConst):
Change assertion of constructor
(struct InlineAsmOperand):
Change assertion of constructor
|
|
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc:
Fix ICE caused by not finding enum variant by adding new error
message
gcc/testsuite/ChangeLog:
* rust/compile/issue-3046.rs:
Add test for new error message
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
|
|
First scan with "rg -v '\\r' gcc/testsuite/rust | rg 'dg-output'"
gcc/testsuite/ChangeLog:
* rust/execute/torture/issue-2187.rs:
Update pattern with \r* for dg-output tests
* rust/execute/xfail/macro1.rs: Likewise
|
|
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h: Add new get_operator_str method in
ArithmeticOrLogicalExpr and CompoundAssignmentExpr
* hir/tree/rust-hir.cc: Likewise
* typecheck/rust-hir-type-check-expr.cc: Improve error message for
operator expressions to display the correct operator symbol
gcc/testsuite/ChangeLog:
* rust/compile/shadow1.rs: Fix test for new error message
Signed-off-by: Antonio Gomes <antoniospg100@gmail.com>
|
|
gcc/rust/ChangeLog:
* Make-lang.in: Compile new file.
* checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go):
Use new class to report errors.
* checks/errors/borrowck/rust-borrow-checker-diagnostics.cc: New file.
* checks/errors/borrowck/rust-borrow-checker-diagnostics.h:
New file, adds new class.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
|
|
ChangeLog:
* .github/workflows/ccpp.yml: Switch to nightly version of rustc
to use unstable features, namely extern types for FFI.
gcc/rust/ChangeLog:
* Make-lang.in: Compile new file, rust-polonius.cc
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Opaque
type to represent FFIVector from C++.
* checks/errors/borrowck/ffi-polonius/src/gccrs_ffi_generated.rs:
Change types of fields in Output.
* checks/errors/borrowck/ffi-polonius/src/lib.rs: Added helper
functions to contruct Polonius output on C++ side,
used helpers to contruct Polonius output on C++ side.
* checks/errors/borrowck/polonius/rust-polonius-ffi.h (make_vector):
FFIVector is a wrapper around std::vector for transfering data
from Rust to C++.
(struct Output): Use pointers to FFIVector instead of bool to
store Polonius output data.
* checks/errors/borrowck/polonius/rust-polonius.h (FFIVector__new):
Helper function.
(FFIVector__new_vec_pair): Likewise.
(FFIVector__new_vec_triple): Likewise.
(FFIVector__push): Likewise.
(FFIVector__push_vec_pair): Likewise.
(FFIVector__push_vec_triple): Likewise.
* checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go):
Convert FFIVector to std::vector representation for easier
navigation.
* checks/errors/borrowck/polonius/rust-polonius.cc: New file,
implementation of helper functions.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
|
|
The visitor was still using the as_string() method.
gcc/rust/ChangeLog:
* hir/rust-hir-dump.cc (Dump::do_matcharm): New.
(Dump::do_matchcase): New.
(Dump::visit(MatchExpr)): Adjust, don't use as_string.
* hir/rust-hir-dump.h (Dump::do_matcharm, Dump::do_matchcase): New.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Remove unnecessary include.
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct AnonConst):
Safe-guard InlineAsm structs
(struct InlineAsmOperand): Likewise.
* expand/rust-macro-builtins-asm.cc (parse_reg_operand_in):
Likewise.
(parse_reg_operand_out): Likewise.
(parse_reg_operand_inout): Likewise.
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct TupleTemplateStr):
Store parse result of parse_format_string(s)
* expand/rust-macro-builtins-asm.cc (parse_format_strings):
Likewise
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_asm):
Clean up monadic operations on expected<>
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Addresses warning, put warn unused in right place
(parse_reg_operand_inout): Likewise.
(parse_asm_arg): Likewise.
* expand/rust-macro-builtins-asm.h (enum WARN_UNUSED_RESULT): Likewise.
(enum InlineAsmParseError): Likewise.
(validate): Likewise.
(parse_asm_arg): Likewise.
(parse_format_strings): Likewise.
(parse_clobber_abi): Likewise.
(parse_reg_operand): Likewise.
(parse_reg_operand_in): Likewise.
(parse_reg_operand_out): Likewise.
(parse_reg_operand_lateout): Likewise.
(parse_reg_operand_inout): Likewise.
(parse_reg_operand_inlateout): Likewise.
(parse_reg_operand_const): Likewise.
(parse_reg_operand_sym): Likewise.
(parse_reg_operand_unexpected): Likewise.
(parse_asm): Likewise.
(check_and_set): Likewise.
(parse_options): Likewise.
(parse_reg): Likewise.
(parse_format_string): Likewise.
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.h (enum InlineAsmParseError):
Add WARN_UNUSED_RESULT parse error
(enum WARN_UNUSED_RESULT): Likewise.
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
added comments
(parse_options): Likewise
(parse_asm_arg): Likewise
(parse_asm): Likewise
* expand/rust-macro-builtins-asm.h: Likewise
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_illegal_options.rs: new test
* rust/compile/inline_asm_illegal_operands.rs: New test.
This is expected to fail but we couldn't resolve parse_expr()'s
general functionality yet
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
Added tl::expected to parse_operand by implementing the validation
inside the parse_reg_operand function.
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Added tl::expected to parse_operand
* expand/rust-macro-builtins-asm.cc (parse_reg): Likewise.
(parse_reg_operand): Likewise.
(parse_reg_operand_const): Likewise.
(parse_reg_operand_inout): Likewise.
(parse_asm_arg): Likewise.
* expand/rust-macro-builtins-asm.h: Likewise.
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (check_and_set):
Scaffold expected on parse_options and asm_arg
(parse_options): Likewise
(parse_asm_arg): Likewise
* expand/rust-macro-builtins-asm.h (check_and_set): Likewise
(parse_label): Likewise
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand_in):
Finish expected parse_reg_operand
(parse_reg_operand_unexpected): Likewise
* expand/rust-macro-builtins-asm.h (parse_reg_operand_unexpected): Likewise
Signed-off-by: badumbatish <tanghocle456@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
Finish incorporating expected of parse_reg_operand
(parse_reg): Likewise.
(parse_reg_operand): Likewise.
(parse_reg_operand_in): Likewise.
(parse_reg_operand_out): Likewise.
(parse_reg_operand_lateout): Likewise.
(parse_reg_operand_const): Likewise.
(parse_reg_operand_inout): Likewise.
(parse_reg_operand_sym): Likewise.
(MacroBuiltin::asm_handler): Likewise.
(parse_asm_arg): Likewise.
(parse_asm): Likewise.
(parse_format_strings): Likewise.
(validate): Likewise.
* expand/rust-macro-builtins-asm.h (class InlineAsmParseError): Likewise.
(enum InlineAsmParseError): Likewise.
(validate): Likewise.
(parse_format_strings): Likewise.
(parse_reg_operand_in): Likewise.
(parse_reg_operand_out): Likewise.
(parse_reg_operand_lateout): Likewise.
(parse_reg_operand_inout): Likewise.
(parse_reg_operand_inlateout): Likewise.
(parse_reg_operand_const): Likewise.
(parse_reg_operand_sym): Likewise.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Handle case for RAW_STRING_LITERAL.
* ast/rust-ast.cc (AttributeParser::parse_meta_item_inner):
Likewise.
(AttributeParser::parse_literal): Likewise.
* ast/rust-ast.h: Likewise.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_literal):
Likewise.
* lex/rust-lex.cc (Lexer::parse_raw_string): Likewise.
* lex/rust-token.cc (Token::as_string): Likewise.
* lex/rust-token.h (enum PrimitiveCoreType): Likewise.
* parse/rust-parse-impl.h (Parser::parse_attr_input): Likewise.
(Parser::parse_literal_expr): Likewise.
(Parser::parse_pattern_no_alt): Likewise.
Signed-off-by: ansh <anshmalik2002@gmail.com>
|
|
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h:
Added ExprType::InlineAsm
* hir/tree/rust-hir.h:
Added ExprType::InlineAsm
|
|
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_outside_unsafe.rs: New test.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.h (enum class): Add InvocKind and AsmKind enums.
* ast/rust-macro.h: Switch semicolon boolean to InvocKind enum.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
* expand/rust-macro-builtins-asm.cc (MacroBuiltin::asm_handler): Likewise.
(parse_asm): Likewise.
* expand/rust-macro-builtins-asm.h (parse_asm): Likewise.
* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler): Likewise.
* expand/rust-macro-builtins-include.cc (MacroBuiltin::include_bytes_handler): Likewise.
(MacroBuiltin::include_str_handler): Likewise.
(MacroBuiltin::include_handler): Likewise.
* expand/rust-macro-builtins-location.cc (MacroBuiltin::file_handler): Likewise.
(MacroBuiltin::column_handler): Likewise.
(MacroBuiltin::line_handler): Likewise.
* expand/rust-macro-builtins-log-debug.cc (MacroBuiltin::assert_handler): Likewise.
* expand/rust-macro-builtins-utility.cc (MacroBuiltin::compile_error_handler): Likewise.
(MacroBuiltin::concat_handler): Likewise.
(MacroBuiltin::env_handler): Likewise.
(MacroBuiltin::cfg_handler): Likewise.
(MacroBuiltin::stringify_handler): Likewise.
* expand/rust-macro-builtins.cc (format_args_maker): Likewise.
(enum class): Likewise.
(inline_asm_maker): Likewise.
(MacroBuiltin::sorry): Likewise.
(MacroBuiltin::proc_macro_builtin): Likewise.
* expand/rust-macro-builtins.h: Likewise.
* expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Likewise.
(MacroExpander::expand_eager_invocations): Likewise.
(MacroExpander::expand_invoc): Likewise.
* expand/rust-macro-expand.h (struct MacroExpander): Likewise.
|
|
This is quite a rough fix (like a lot of the macro expansion code...) but
it allows built-in macros to be treated as statements. I *think* asm!()
might be the only one where it really matters, but also doing something
like
{
line!();
}
will now work, whereas before the macro invocation would not get expanded
properly and would be ignored.
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.h: Pass `is_semicolon` information to builtin
macro transcribers.
* ast/rust-macro.h: Pass semicolon information to transcriber..
* expand/rust-macro-builtins-asm.cc (MacroBuiltin::asm_handler): Likewise.
(parse_asm): Likewise.
* expand/rust-macro-builtins-asm.h (parse_asm): Likewise.
* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler): Likewise.
* expand/rust-macro-builtins-include.cc (MacroBuiltin::include_bytes_handler): Likewise.
(MacroBuiltin::include_str_handler): Likewise.
(MacroBuiltin::include_handler): Likewise.
* expand/rust-macro-builtins-location.cc (MacroBuiltin::file_handler): Likewise.
(MacroBuiltin::column_handler): Likewise.
(MacroBuiltin::line_handler): Likewise.
* expand/rust-macro-builtins-log-debug.cc (MacroBuiltin::assert_handler): Likewise.
* expand/rust-macro-builtins-utility.cc (MacroBuiltin::compile_error_handler): Likewise.
(MacroBuiltin::concat_handler): Likewise.
(MacroBuiltin::env_handler): Likewise.
(MacroBuiltin::cfg_handler): Likewise.
(MacroBuiltin::stringify_handler): Likewise.
* expand/rust-macro-builtins.cc (format_args_maker): Likewise.
(inline_asm_maker): Likewise.
(MacroBuiltin::sorry): Likewise.
(MacroBuiltin::proc_macro_builtin): Likewise.
* expand/rust-macro-builtins.h: Likewise.
* expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Likewise.
(MacroExpander::expand_invoc): Likewise.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Remove rust_unreachable.
* ast/rust-ast.cc (InlineAsm::accept_vis): Likewise.
* hir/tree/rust-hir.cc (InlineAsm::accept_vis): Likewise.
|
|
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Check for ?Trait in visitor
gcc/testsuite/ChangeLog:
* rust/compile/issue-2725.rs: New test.
Signed-off-by: Dave Evans <dave@dmetwo.org>
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parseDirSpec):
Partial second layer of expected in parsing asm
(parse_clobber_abi): Likewise
(parse_operand): Likewise
(parse_reg_operand): Likewise
(parse_asm_arg): Likewise
* expand/rust-macro-builtins-asm.h (parse_clobber_abi): Likewise
(parse_reg_operand): Likewise
(parse_operand): Likewise
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg):
Expected first layer done
(parse_reg_operand): Likewise.
(parse_asm_arg): Likewise.
(parse_format_strings): Likewise.
(parse_asm): Likewise.
(validate): Likewise.
* expand/rust-macro-builtins-asm.h (parse_asm_arg): Likewise.
(validate): Likewise.
(parse_format_strings): Likewise.
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_clobber_abi):
Move parser and last_token_id to InlineAsmCtx to prepapre
for tl::expected.
(parse_reg): Likewise.
(parse_operand): Likewise.
(parse_reg_operand): Likewise.
(check_and_set): Likewise.
(parse_options): Likewise.
(parse_format_string): Likewise.
(parse_asm_arg): Likewise.
(parse_asm): Likewise.
* expand/rust-macro-builtins-asm.h (class InlineAsmParseError): Likewise.
(parse_asm_arg): Likewise.
(check_and_set): Likewise.
(parse_operand): Likewise.
(parse_reg_operand): Likewise.
(parse_options): Likewise.
(parse_reg): Likewise.
(parse_clobber_abi): Likewise.
(parse_format_string): Likewise.
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Update parser to parse strings in the first stage
(parse_label): not needed right now
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_asm):
Scaffolding validation of asm!
(validate): Likewise
* expand/rust-macro-builtins-asm.h (validate): Likewise
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmOperand):
Partial support for operand
* expand/rust-macro-builtins-asm.cc (parse_reg_operand): Likewise.
(parse_label): Likewise.
* expand/rust-macro-builtins-asm.h (parse_label): Likewise.
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmOperand):
Refactoring and supporting more parse_reg_operand
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Likewise.
(rust_debug): Likewise.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Fix visitor-related warnings
* ast/rust-ast-collector.h: Likewise.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
* ast/rust-ast-visitor.h: Likewise.
* checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
* checks/errors/borrowck/rust-function-collector.h: Likewise.
* checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
* checks/errors/rust-const-checker.h: Likewise.
* expand/rust-derive.h: Likewise.
* expand/rust-macro-builtins-asm.cc (parse_reg_operand): Likewise.
* hir/rust-hir-dump.cc (Dump::visit): Likewise.
* hir/rust-hir-dump.h: Likewise.
* hir/tree/rust-hir-visitor.h: Likewise.
* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
* resolve/rust-ast-resolve-base.h: Likewise.
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Add potentially_nonpromoted_keywords set str
(check_identifier): likewise
* expand/rust-macro-builtins-asm.h (parse_format_string):
likewise
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_parse_operand.rs: fix warnings
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Successful parse of in and inout, albeit with str
(check_identifier): Likewise.
(parse_asm_arg): Likewise.
* expand/rust-macro-builtins-asm.h (parse_format_string): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_parse_operand.rs: New test.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h:
Scaffolding HIRFullVisitor for inline asm
* ast/rust-ast.cc (InlineAsm::accept_vis): Likewise.
* hir/tree/rust-hir-visitor.h (RUST_HIR_VISITOR_H): Likewise.
* hir/tree/rust-hir.cc (InlineAsm::accept_vis): Likewise.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast-visitor.h:
Scaffolding ast visitor for InlineAsm
* ast/rust-ast.cc (InlineAsm::accept_vis): Likewise.
* ast/rust-expr.h: Likewise.
|
|
gcc/rust/ChangeLog:
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Fix compile warnings.
(parse_options): Likewise.
(parse_asm): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_illegal_options.rs:
|
|
gcc/rust/ChangeLog:
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
Partial unsafe support for inline asm
* checks/errors/rust-unsafe-checker.h: Likewise.
* hir/tree/rust-hir-expr.h: Likewise.
* hir/tree/rust-hir.cc (InlineAsm::accept_vis): Likewise.
|
|
gcc/rust/ChangeLog:
* ast/rust-expr.h:
Add support for AST to HIR inline asm translation
* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
* hir/rust-ast-lower-base.h: Likewise.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
* hir/rust-ast-lower-expr.h: Likewise.
* hir/tree/rust-hir-expr.h (class InlineAsm): Likewise.
|
|
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs: compress
the test
* rust/compile/inline_asm_nop.rs: compress
the test
* rust/compile/inline_asm_faulty_clobber_1.rs: Removed.
* rust/compile/inline_asm_faulty_clobber_2.rs: Removed.
* rust/compile/inline_asm_nop_2.rs: Removed.
|