[llvm] [mlir] eliminating g++ warnings (PR #105520)

Frank Schlimbach via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 00:28:12 PDT 2024


================
@@ -94,6 +94,7 @@ class Pass {
     Option(Pass &parent, StringRef arg, Args &&...args)
         : detail::PassOptions::Option<DataType, OptionParser>(
               parent.passOptions, arg, std::forward<Args>(args)...) {}
+    Option &operator=(const Option &other) = default; // gcc11 -Wdeprecated-copy
----------------
fschlimb wrote:

> > See above, done.
> 
> What was done exactly? Sorry, I'm not quite following.

There were 2 discussions on the same topic.
I removed the explicit operator from the code and disabled the warning for gcc versions <12 if flag is supported.
The cmake files also clarifies why the warning is disabled.
This will keep the compiler warning for newer versions which do not report the false positive without adding unneeded code.

https://github.com/llvm/llvm-project/pull/105520


More information about the llvm-commits mailing list