https://github.com/mylai-mtk updated https://github.com/llvm/llvm-project/pull/107050
>From e542003d82acfad40e1a3174ca23edf6e08a753f Mon Sep 17 00:00:00 2001 From: Ming-Yi Lai <ming-yi....@mediatek.com> Date: Wed, 19 Jun 2024 11:28:52 +0800 Subject: [PATCH] [clang] Fix bug of FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands --- clang/lib/CodeGen/CGCall.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 6fa65e1916183a..92e0cc43919ca4 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -450,12 +450,12 @@ inline FnInfoOpts operator&(FnInfoOpts A, FnInfoOpts B) { llvm::to_underlying(B)); } -inline FnInfoOpts operator|=(FnInfoOpts A, FnInfoOpts B) { +inline FnInfoOpts &operator|=(FnInfoOpts &A, FnInfoOpts B) { A = A | B; return A; } -inline FnInfoOpts operator&=(FnInfoOpts A, FnInfoOpts B) { +inline FnInfoOpts &operator&=(FnInfoOpts &A, FnInfoOpts B) { A = A & B; return A; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits