This is an archive of the discontinued LLVM Phabricator instance.

[Sema] SequenceChecker: C++17 sequencing rule for call expressions.
ClosedPublic

Authored by riccibruno on Feb 23 2019, 6:48 AM.

Details

Summary

In C++17 the postfix-expression of a call expression is sequenced before each expression in the expression-list and any default argument.

Diff Detail

Repository
rC Clang

Event Timeline

riccibruno created this revision.Feb 23 2019, 6:48 AM
riccibruno updated this revision to Diff 190671.EditedMar 14 2019, 11:02 AM

Don't visit the pre-argument expression(s). A pre-argument expression is only present for CUDAKernelCallExpr, and it is just a CallExpr for the configuration call, which I don't think we need to visit. This makes the usage of CallExpr::arguments() possible and results in cleaner code.

Friendly ping.

riccibruno retitled this revision from [Sema] SequenceChecker: C++17 sequencing rule for call expression. to [Sema] SequenceChecker: C++17 sequencing rule for call expressions..

Rebased

Rebased on top of current master and D58297. Friendly ping !

Maybe @aaron.ballman / @rsmith could take a look? This patch blocks the whole patch stack.

Maybe @aaron.ballman / @rsmith could take a look? This patch blocks the whole patch stack.

I rebased it on top of the others already accepted patches. I just need to get back +w access to the GitHub repo to commit them, but this patch is not blocking them anymore.

Note that I am not entirely sure that the implementation in getMemoryLocation is the right way to do this; I think that this patch should be considered a work-in-progress.

Maybe @aaron.ballman / @rsmith could take a look? This patch blocks the whole patch stack.

I rebased it on top of the others already accepted patches. I just need to get back +w access to the GitHub repo to commit them, but this patch is not blocking them anymore.

Note that I am not entirely sure that the implementation in getMemoryLocation is the right way to do this; I think that this patch should be considered a work-in-progress.

Duh, I meant to post this comment in D57660 instead. Still this patch is not blocking the other already accepted patches.

riccibruno changed the repository for this revision from rC Clang to rG LLVM Github Monorepo.Dec 18 2019, 2:55 PM

@rsmith Could you take a look at this patch when you have some time? This is the last C++17 sequencing rule which is missing from SequenceChecker and is very similar to the other already accepted patches.

riccibruno updated this revision to Diff 267865.Jun 2 2020, 6:34 AM

Updated with the test case from PR20819.

rsmith accepted this revision.Jun 2 2020, 5:46 PM
This revision is now accepted and ready to land.Jun 2 2020, 5:46 PM

Great! thanks for the review @rsmith .

This revision was automatically updated to reflect the committed changes.