Skip to content

Commit 4700058

Browse files
committed
[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) ^
1 parent 411ceac commit 4700058

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/tools/llvm-remarkutil/RemarkCounter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct Filters {
8787
Filter.ArgFilter = std::move(ArgFilter);
8888
Filter.RemarkTypeFilter = std::move(RemarkTypeFilter);
8989
if (auto E = Filter.regexArgumentsValid())
90-
return E;
90+
return std::move(E);
9191
return Filter;
9292
}
9393
/// Returns true if \p Remark satisfies all the provided filters.
@@ -165,11 +165,11 @@ struct ArgumentCounter : Counter {
165165
for (auto &Arg : Arguments) {
166166
if (Arg.IsRegex) {
167167
if (auto E = checkRegex(Arg.FilterRE))
168-
return E;
168+
return std::move(E);
169169
}
170170
}
171171
if (auto E = AC.getAllMatchingArgumentsInRemark(Buffer, Arguments, Filter))
172-
return E;
172+
return std::move(E);
173173
return AC;
174174
}
175175

0 commit comments

Comments
 (0)