This is an archive of the discontinued LLVM Phabricator instance.

[LangRef] fix the function result attributes location explanation and example
ClosedPublic

Authored by khei4 on May 30 2023, 8:32 PM.

Details

Summary

I'm confused with the locations of attributes for the function result. I believe they come "before the result type".

Diff Detail

Event Timeline

khei4 created this revision.May 30 2023, 8:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2023, 8:32 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
khei4 requested review of this revision.May 30 2023, 8:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2023, 8:32 PM
nikic added inline comments.May 31 2023, 12:55 AM
llvm/docs/LangRef.rst
1101–1102

You are right that attributes for the result come before the return type, but the example attributes this listed are actually function attributes, not return value attributes. So you might want to adjust then to something like nonnull and signext.

khei4 updated this revision to Diff 526956.May 31 2023, 1:39 AM

change examples also

llvm/docs/LangRef.rst
1101–1102

Oh, thanks! I should have checked it also!

This revision is now accepted and ready to land.May 31 2023, 1:46 AM
khei4 retitled this revision from [LangRef] fix the function result attributes location explanation to [LangRef] fix the function result attributes location explanation and example.May 31 2023, 2:37 AM