[clang] 9de972e - [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (#107050)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 12:35:15 PDT 2024


Author: Ming-Yi Lai
Date: 2024-09-05T12:35:12-07:00
New Revision: 9de972e3e1ecea506a3884bd2fc47570ce83e4df

URL: https://github.com/llvm/llvm-project/commit/9de972e3e1ecea506a3884bd2fc47570ce83e4df
DIFF: https://github.com/llvm/llvm-project/commit/9de972e3e1ecea506a3884bd2fc47570ce83e4df.diff

LOG: [clang] Fix FnInfoOpts::operator&= and FnInfoOpts::operator|= not updating assigned operands (#107050)

This affects CodeGenTypes::arrangeCall.  No test because the only current in-tree use of that function isn't affected.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGCall.h

Removed: 
    


################################################################################
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