This is an archive of the discontinued LLVM Phabricator instance.

Fix wrong error message when compiling C souce code
ClosedPublic

Authored by jyu2 on May 25 2023, 4:32 PM.

Details

Summary

Fix wrong error message when compiling C souce code:
Currently emit error as following for uses_allocators(alloc(traits)):

called object type 'omp_allocator_handle_t' (aka
'enum omp_allocator_handle_t') is not a function or function pointer

To fix this, since "alloc" is Id expresison(spce 5.2), during the parser
(in ParseOpenMP.cpp), using tryParseCXXIdExpression instead of
ParseExpression for C.

Diff Detail

Event Timeline

jyu2 created this revision.May 25 2023, 4:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 4:32 PM
jyu2 requested review of this revision.May 25 2023, 4:32 PM

Could you split it into 3 separate patches?

jyu2 updated this revision to Diff 525894.May 25 2023, 6:05 PM
jyu2 retitled this revision from Fix couple of problems in uses_allocators clause. to Fix wrong error message when compiling C souce code.
jyu2 edited the summary of this revision. (Show Details)

Thanks Alexey, sure I am separate the patch. This is first oen.

jyu2 added a comment.May 26 2023, 7:37 AM

Could you split it into 3 separate patch

Thanks Alexey! Sure I am split into three. Here is first one.

This revision is now accepted and ready to land.May 26 2023, 8:02 AM
This revision was landed with ongoing or failed builds.May 26 2023, 10:27 AM
This revision was automatically updated to reflect the committed changes.