From: Tom Tromey <tom@tromey.com>
To: Manish Goregaokar <manish@mozilla.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix handling of discriminantless univariant enums in Rust
Date: Mon, 31 Oct 2016 03:29:00 -0000 [thread overview]
Message-ID: <87oa21urfz.fsf@tromey.com> (raw)
In-Reply-To: <CAFOnWknmXfXaEzTsPYjTxP5R+J+o-NOBPHwEvfDC+YPKYa5ULA@mail.gmail.com> (Manish Goregaokar's message of "Sun, 30 Oct 2016 20:19:27 -0700")
>>>>> "Manish" == Manish Goregaokar <manish@mozilla.com> writes:
Manish> Updated. Not sure what the style issues are, could you point them out?
Sure. There's also the GNU coding standards document, plus some docs on
the gdb wiki somewhere.
Manish> }
Manish> + else if (TYPE_NFIELDS (type) == 1) {
Brace placement. Should line up with that "}" just above.
Manish> + /* Sometimes univariant enums are encoded without a
Manish> + discriminant. In that case, treating it as an encoded enum
Manish> + with the first field being the actual type works. */
Subsequent text in a multi-line comment should line up under the
"Sometimes".
Period followed by two spaces ends a sentence, so one more space before
"In".
Manish> + const char* field_name = TYPE_NAME (TYPE_FIELD_TYPE (type, 0));
Manish> + const char* last = rust_last_path_segment (field_name);
"char *"
Manish> + ret.name = concat (TYPE_NAME (type), "::", last, (char *) NULL);
Manish> + ret.field_no = RUST_ENCODED_ENUM_REAL;
Manish> + ret.is_encoded = 1;
Manish> + return ret;
Manish> + }
This brace and the whole block will be indented a bit more due to the
brace placement issue.
thanks,
Tom
next prev parent reply other threads:[~2016-10-31 3:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 23:52 Manish Goregaokar
2016-10-28 19:57 ` Manish Goregaokar
2016-10-30 2:48 ` Tom Tromey
2016-10-30 2:53 ` Tom Tromey
2016-10-30 2:58 ` Manish Goregaokar
2016-10-30 3:06 ` Manish Goregaokar
2016-10-30 3:34 ` Tom Tromey
2016-10-30 3:36 ` Manish Goregaokar
2016-10-30 3:40 ` Manish Goregaokar
2016-10-31 3:03 ` Tom Tromey
2016-10-31 3:20 ` Manish Goregaokar
2016-10-31 3:29 ` Tom Tromey [this message]
2016-10-31 3:47 ` Manish Goregaokar
2016-10-31 6:17 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oa21urfz.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=manish@mozilla.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox