[clang] [clang][CFG] Sequence RHS before LHS for overloaded assignment operators in CFG to match C++17 rules (PR #181113)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 12 06:51:41 PST 2026
================
@@ -2542,6 +2543,19 @@ CFGBlock *CFGBuilder::VisitChildren(Stmt *S) {
return B;
}
+CFGBlock *CFGBuilder::VisitCallExprChildren(CallExpr *C) {
+ // C++17 onwards require that the right operand is sequenced before the left
+ // operand.
+ if (auto *OCE = dyn_cast<CXXOperatorCallExpr>(C)) {
----------------
vbvictor wrote:
Am I missing something, but we don't check we have C++17-or-later anywhere?
Seems to me like a reverse bug.
https://github.com/llvm/llvm-project/pull/181113
More information about the cfe-commits
mailing list