[clang] [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (PR #107050)
Ming-Yi Lai via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 4 20:19:59 PDT 2024
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.lai at 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;
}
More information about the cfe-commits
mailing list