This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Fix reporting of invalid shader attribute on HLSL entry function
ClosedPublic

Authored by rsandifo-arm on Apr 5 2023, 1:04 PM.

Details

Summary

If the HLSL entry function had a shader attribute that conflicted
with the pipeline stage specified in the target triple, Clang
would emit:

error: (null) attribute parameters do not match the previous declaration
conflicting attribute is here

(where the second line doesn't reference an attribute).

This was because the code constructed a dummy attribute that had
only a source location, but no kind or syntax.

Noticed while doing some changes to the attribute handling.

Diff Detail

Event Timeline

rsandifo-arm created this revision.Apr 5 2023, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 1:04 PM
Herald added a subscriber: Anastasia. · View Herald Transcript
rsandifo-arm requested review of this revision.Apr 5 2023, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 1:04 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
python3kgae accepted this revision.Apr 5 2023, 8:41 PM

Thanks for fix the issue.

This revision is now accepted and ready to land.Apr 5 2023, 8:41 PM
This revision was landed with ongoing or failed builds.Apr 6 2023, 2:57 AM
This revision was automatically updated to reflect the committed changes.