From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id C9C63385E44D for ; Thu, 1 Aug 2024 14:58:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C9C63385E44D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C9C63385E44D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524357; cv=none; b=XCA+ZdvKdW0XlBmKxRYkeg5tVYNVp8kxLmFqy1pSVefsSPiDDKb5zZZRouTMUjBNLi+mgtzIGPSufORE5Ot+kie7RHU8mT07xfovo339W0SGpfiRYg3FzDsn1maHEzEtd9ipvLbz+FIojbjeH+kjnsXolk/3IN1F71UWQKv8qEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524357; c=relaxed/simple; bh=SZ+kKNR6xPaOAtQWwN9aEUslluuJtK6p6bZTfbuEO20=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=twDeM7n2daHaBC15bqIUI3cMy2DGn1RGSp4r1uzdLHErhVMnB2n0ItE/8SkBDobvFHmsB3IHzAbzh6VNdi8S60jtsIY9JfQgh8KVgsOHJBy52RWgGVBb1a4zBJjz3d+jL88+zCR9FCoU4Pclct1ctwcBMYZ43EMU1k1yKL0N0Fk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5b214865fecso6004127a12.1 for ; Thu, 01 Aug 2024 07:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524337; x=1723129137; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YiBUtq1XWqjBCg2iF7WzIcQuUokxk93/nEMyFiZk7pg=; b=Ta5iHAfJu8ZcWFVYvq1H9d/HyXPiAVqdot2MdEfMKd1+jRWmprcjHja3ErfJG0Aesk qpG3QtFp1jUc10QN9ITZsvrpsdoD1wi0YacHsN84Ft5ZZbXyhOfscUITMfyeImVTrFOX jh76QRlfZObzanDvEBrIERgDcYWucWp+4Kza+q90CrOTnCKIVRUdyNF28Tn2tmdj+VuH 5kX0KXHT990PwGrH3RUFXiN8lc8VM5SJRk06oObrOfmHSqgIPvVL6IATM71IakGeSz0R nFbR/6n5XN0CoW6C5nlH3Nctpw9xeTo/cH2WD0kzZpQpbIclC1fzMU4Cb1sg2n0ZmqL1 n+8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524337; x=1723129137; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YiBUtq1XWqjBCg2iF7WzIcQuUokxk93/nEMyFiZk7pg=; b=I6nKEc+Ae4NoX7XEapKKzQ8RwC4+TyRb8UmiiBzRWbk2dQL2ydnPQLYHuBWqVW4VgW kjf1zMAq2Fur7op/WXmpyzEdx0rs5WMyeet8ujwnLlJvmqUFpaTqB8yWkOsbq5wk2cm4 6lnqMVLXp+tRFSJ1ZTzWw5euXiItGIOi2qDRBxTNbPmH82sdQOH9RO3ei09uM71+ey3j VNyGe0uAZIQKmi9/lNK1zOVGsA7jdTK5Nqw4eo1/dW8aOppppAqKf7T3vc79t5ngOgyf 0h3et+oB+mLc9Ohap2RHgRhCjBRnACOvccy9z7Rnm4YQoo4BlmNOvhuBnyIdQWtUhKu5 KtMg== X-Gm-Message-State: AOJu0YyF/X4LPRdgEh7fWEas3WzKb3PSEmQKzC8aFCPihi+9M8WF23uM m1u7DBXQy8U+8keGvlDZTEkD9f1aOAMMQwOfgq0e2sX2OBjlCRNclexGYWy174n3aDLSjF7vFFR m/deD X-Google-Smtp-Source: AGHT+IF2YMpMqp6mOPp3hexlai9mxaNK2McQMzAqNPllMGtriqjOPDhtecaygSpxUgq8YB+qENwLOw== X-Received: by 2002:aa7:c651:0:b0:5b7:92b5:35a0 with SMTP id 4fb4d7f45d1cf-5b7f59e04f8mr345666a12.37.1722524337203; Thu, 01 Aug 2024 07:58:57 -0700 (PDT) Received: from platypus.lan ([2a04:cec2:9:dc84:3622:6733:ff49:ee91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590592sm10252456a12.25.2024.08.01.07.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 07:58:56 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [PATCH 033/125] gccrs: format-args: Add documentation for future expansion of function Date: Thu, 1 Aug 2024 16:56:29 +0200 Message-ID: <20240801145809.366388-35-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com> References: <20240801145809.366388-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler): Add documentation regarding future tasks. --- gcc/rust/expand/rust-macro-builtins.cc | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/gcc/rust/expand/rust-macro-builtins.cc b/gcc/rust/expand/rust-macro-builtins.cc index b42d1ec9367..e4ca0d8ba3b 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 (*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 + // (*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: -- 2.45.2