D115187 exposed CoroutineSuspendExpr's operand, which makes some nodes to show up twice during the traversal, confusing the check for unsequenced operations. Skip the operand since it's already handled as part of the common expression and get rid of the misleading warnings.
Out of curiosity, since getCommonExpr() is itself a subexpression of getReadyExpr(), getSuspendExpr(), and getResumeExpr() (which are also children of the CoroutineSuspendExpr), shouldn't getCommonExpr() be skipped for the same reason?
This looks not true. For this example:
foo() is the Operand. And the Common is auto __tmp__ = operator co_await(foo()). ReadyExpr should be __tmp__.await_ready();. SuspendExpr should be __tmp__.await_suspend(); and ResumeExpr should be __tmp__.await_resume();.
So the method here looks good to me.
Thanks for the review, will push once all tests pass!
Only test failing is ClangScanDeps/modules-full.cpp on Windoes, which is unrelated to this change.
Thank you for the explanation! I overlooked the fact that ReadyExpr/SuspendExpr/ResumeExpr use an OpaqueValueExpr wrapping CommonExpr rather than using CommonExpr directly.