================
@@ -32,8 +32,9 @@ namespace cir {
 mlir::LogicalResult runCIRToCIRPasses(mlir::ModuleOp theModule,
                                       mlir::MLIRContext &mlirCtx,
                                       clang::ASTContext &astCtx,
-                                      bool enableVerifier,
-                                      bool enableCIRSimplify);
+                                      bool enableVerifier, bool enableLibOpt,
----------------
bcardosolopes wrote:

The parameter order here is `(enableVerifier, enableLibOpt, enableCIRSimplify, 
libOptOptions)` but the implementation in `CIRPasses.cpp` defines them as 
`(enableVerifier, enableCIRSimplify, enableLibOpt, libOptOptions)`. The bools 
are swapped between declaration and definition.

It works by accident because the caller's argument order matches the 
implementation, but this will silently break if anyone writes a new call site 
following the header's parameter names. Making them consistent would be best.

https://github.com/llvm/llvm-project/pull/172487
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to