[llvm] 4700058 - [llvm-remarkutil] Fix building with Xcode 12

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 00:30:04 PDT 2023


Author: Martin Storsjö
Date: 2023-10-13T10:28:46+03:00
New Revision: 47000586caca4424e88372d8ab4f8b2c0178ee4b

URL: https://github.com/llvm/llvm-project/commit/47000586caca4424e88372d8ab4f8b2c0178ee4b
DIFF: https://github.com/llvm/llvm-project/commit/47000586caca4424e88372d8ab4f8b2c0178ee4b.diff

LOG: [llvm-remarkutil] Fix building with Xcode 12

This fixes erorrs like these:

llvm-project/llvm/tools/llvm-remarkutil/RemarkCounter.h:90:14: error: call to deleted constructor of 'llvm::Error'
      return E;
             ^
llvm-project/llvm/include/llvm/Support/Error.h:189:3: note: 'Error' has been explicitly marked deleted here
  Error(const Error &Other) = delete;
  ^
llvm-project/llvm/include/llvm/Support/Error.h:496:18: note: passing argument to parameter 'Err' here
  Expected(Error Err)
                 ^

Added: 
    

Modified: 
    llvm/tools/llvm-remarkutil/RemarkCounter.h

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-remarkutil/RemarkCounter.h b/llvm/tools/llvm-remarkutil/RemarkCounter.h
index 89cd3f7388d072c..54bba8d7cc99550 100644
--- a/llvm/tools/llvm-remarkutil/RemarkCounter.h
+++ b/llvm/tools/llvm-remarkutil/RemarkCounter.h
@@ -87,7 +87,7 @@ struct Filters {
     Filter.ArgFilter = std::move(ArgFilter);
     Filter.RemarkTypeFilter = std::move(RemarkTypeFilter);
     if (auto E = Filter.regexArgumentsValid())
-      return E;
+      return std::move(E);
     return Filter;
   }
   /// Returns true if \p Remark satisfies all the provided filters.
@@ -165,11 +165,11 @@ struct ArgumentCounter : Counter {
     for (auto &Arg : Arguments) {
       if (Arg.IsRegex) {
         if (auto E = checkRegex(Arg.FilterRE))
-          return E;
+          return std::move(E);
       }
     }
     if (auto E = AC.getAllMatchingArgumentsInRemark(Buffer, Arguments, Filter))
-      return E;
+      return std::move(E);
     return AC;
   }
 


        


More information about the llvm-commits mailing list