Author: Amr Hesham Date: 2026-09-18T18:52:38Z New Revision: fedbd3bdbe650fce8fe92a020698cc2db55a4ed7
URL: https://github.com/llvm/llvm-project/commit/fedbd3bdbe650fce8fe92a020698cc2db55a4ed7 DIFF: https://github.com/llvm/llvm-project/commit/fedbd3bdbe650fce8fe92a020698cc2db55a4ed7.diff LOG: [CIR][NFC] Fix compilation error CIRGenModule (#224694) Fix deduced conflicting types for parameter when calling std::max with unsigned long and unsigned long long, can be fixed by `std::max(f.getAlignment().value_or(1), 2ull)` but in this line, the alignment is always less than 2 because of the parent if condition, so max is always 2 Added: Modified: clang/lib/CIR/CodeGen/CIRGenModule.cpp Removed: ################################################################################ diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp index ccb4525e2632c..0ec24e963e5ab 100644 --- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp @@ -3401,7 +3401,7 @@ void CIRGenModule::setCIRFunctionAttributesForDefinition( // member function, set its alignment accordingly. if (getTarget().getCXXABI().areMemberFunctionsAligned()) { if (isa<CXXMethodDecl>(decl) && f.getAlignment().value_or(1) < 2) - f.setAlignment(std::max(2ul, f.getAlignment().value_or(1))); + f.setAlignment(2); } } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
