Page MenuHomePhabricator

Added example for integer constant [DOCS]
AcceptedPublic

Authored by sushmaunnibhavi on Sat, Apr 17, 11:19 AM.

Diff Detail

Event Timeline

sushmaunnibhavi requested review of this revision.Sat, Apr 17, 11:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSat, Apr 17, 11:19 AM
xgupta accepted this revision.Sat, Apr 17, 12:09 PM
xgupta added a subscriber: aqjune.

LGTM, But also adding @aqjune as a second reviewer.

Would you please also add the example for Boolean, Float-Point, Null pointer, and Token constant so the Simple Constants section looks complete?
Feel free to ask if you can't find their examples in test cases.

This revision is now accepted and ready to land.Sat, Apr 17, 12:09 PM

Also please update the title to include a tag like for this one [Docs].

Hi,

Would you explain what this patch is for?

I think add %in, 1 isn't constant... it is an instruction.

Hi,

Would you explain what this patch is for?

I think add %in, 1 isn't constant... it is an instruction.

Actually, this patch is for adding examples for the simple constants section in Langref.

sushmaunnibhavi retitled this revision from Added example for integer constant to Added example for integer constant [DOCS].Sat, Apr 17, 11:39 PM

I'm not sure whether this is a good direction - adding one example for each item might be pretty verbose considering that they are basic constructs.
What about having a code snippet that includes all of these types (including integers) after There are no constants of type x86_mmx.?

+ Adding reviewers who are working as reviewers for LangRef patches

nikic added a subscriber: nikic.Sun, Apr 18, 2:07 AM

Yeah, this doesn't look particularly useful to me.

Something I'd love to see though is a listing of special values for all floating point types. Always takes me a while to figure out how to test various inf/nan/sz for different float types, with their encoding peculiarities.