aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-03-01 15:37:45 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-03-01 15:42:36 +0000
commit61b5a058a49df3c78d2e0f8ac8ef3eca80b67971 (patch)
tree23d5f77710c4caeee2ed2cd90416cab5a926d50a /gcc
parent3ff0f1a7bf230d641503fd1d2a2dc8066a729259 (diff)
downloadgcc-61b5a058a49df3c78d2e0f8ac8ef3eca80b67971.zip
gcc-61b5a058a49df3c78d2e0f8ac8ef3eca80b67971.tar.gz
gcc-61b5a058a49df3c78d2e0f8ac8ef3eca80b67971.tar.bz2
format-args: Add documentation for future expansion of function
gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler): Add documentation regarding future tasks.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/expand/rust-macro-builtins.cc26
1 files changed, 5 insertions, 21 deletions
diff --git a/gcc/rust/expand/rust-macro-builtins.cc b/gcc/rust/expand/rust-macro-builtins.cc
index b42d1ec..e4ca0d8 100644
--- a/gcc/rust/expand/rust-macro-builtins.cc
+++ b/gcc/rust/expand/rust-macro-builtins.cc
@@ -1052,23 +1052,7 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
{
auto input = format_args_parse_arguments (invoc);
- // auto fmt_arg
- // // FIXME: this eneds to be split up into a smaller function
- // = parse_single_string_literal (append_newline ?
- // BuiltinMacro::FormatArgsNl
- // : BuiltinMacro::FormatArgs,
- // invoc.get_delim_tok_tree (), invoc_locus,
- // invoc.get_expander ());
-
- // if (!fmt_arg->is_literal ())
- // {
- // rust_sorry_at (
- // invoc_locus,
- // "cannot yet use eager macro invocations as format strings");
- // return AST::Fragment::create_empty ();
- // }
-
- // FIXME: We need to handle this
+ // TODO(Arthur): We need to handle this
// // if it is not a literal, it's an eager macro invocation - return it
// if (!fmt_expr->is_literal ())
// {
@@ -1077,10 +1061,10 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
// token_tree.to_token_stream ());
// }
- // auto fmt_str = static_cast<AST::LiteralExpr &> (*fmt_arg.get ());
-
- // Switch on the format string to know if the string is raw or cooked
- // switch (fmt_str.get_lit_type ())
+ // TODO(Arthur): Handle this as well - raw strings are special for the
+ // format_args parser auto fmt_str = static_cast<AST::LiteralExpr &>
+ // (*fmt_arg.get ()); Switch on the format string to know if the string is raw
+ // or cooked switch (fmt_str.get_lit_type ())
// {
// // case AST::Literal::RAW_STRING:
// case AST::Literal::STRING: