This is an archive of the discontinued LLVM Phabricator instance.

[Clang][clang-cl] Implement `__builtin_FUNCSIG`
ClosedPublic

Authored by JMazurkiewicz on May 9 2023, 2:05 AM.

Details

Reviewers
aaron.ballman
Group Reviewers
Restricted Project
Commits
rG78d8312acea9: [Clang][clang-cl] Implement `__builtin_FUNCSIG`
Summary

This patch implements __builtin_FUNCSIG intrinsic which returns the same string as __FUNCSIG__.

Closes #58951.

Diff Detail

Event Timeline

JMazurkiewicz created this revision.May 9 2023, 2:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2023, 2:05 AM
JMazurkiewicz requested review of this revision.May 9 2023, 2:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2023, 2:05 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Try to fix formatting in ParseExpr.cpp.

Thank you! In general, this is looking pretty close to ready.

clang/lib/Parse/ParseExpr.cpp
807–809

Might as well revert the clang-format changes here.

clang/test/Preprocessor/feature_tests.c
2–5

We should continue to have non-ms-extension RUN lines as well. (This is testing feature tests, so enabling ms extensions can impact things in surprising ways and we don't want to lose coverage for non-ms modes.)

clang/test/Sema/source_location.c
2–5

I would add a RUN line for -fms-extensions, same as above.

clang/test/SemaCXX/source_location.cpp
2–4

Same here.

JMazurkiewicz marked 2 inline comments as done.
  • Address comments (thanks for the review @aaron.ballman!),
  • Remove clang-format changes (CI might fail),
  • Add extra tests in clang/test/Preprocessor/feature_tests.cpp.
aaron.ballman accepted this revision.May 18 2023, 7:42 AM

LGTM assuming precommit CI doesn't come back with surprises, though there are some minor typos in the release notes to be fixed. Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution? (If you need me to land it for you, I can fix up the release notes when I land, so you don't have to upload a new patch. If you land the changes yourself, feel free to fix the release notes while landing as well.)

clang/docs/ReleaseNotes.rst
195
This revision is now accepted and ready to land.May 18 2023, 7:42 AM

Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution?

Yes, my name and email: "Jakub Mazurkiewicz <mazkuba3@gmail.com>".

I can fix up the release notes when I land, so you don't have to upload a new patch.

Thank you in advance.

This revision was landed with ongoing or failed builds.May 19 2023, 9:03 AM
This revision was automatically updated to reflect the committed changes.