[PATCH] D93981: Fix some compiler warnings
Sanjoy Das (Work Account) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 2 22:29:50 PST 2021
sanjoy.google updated this revision to Diff 314267.
sanjoy.google added a comment.
Fix commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93981/new/
https://reviews.llvm.org/D93981
Files:
llvm/include/llvm/Support/TaskQueue.h
llvm/unittests/Support/CrashRecoveryTest.cpp
mlir/include/mlir/Parser.h
mlir/tools/mlir-tblgen/OpFormatGen.cpp
mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
Index: mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
===================================================================
--- mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+++ mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
@@ -244,7 +244,7 @@
"is", "lambda", "nonlocal", "not", "or", "pass",
"raise", "return", "try", "while", "with", "yield"});
return keywords.contains(str);
-};
+}
/// Checks whether `str` would shadow a generated variable or attribute
/// part of the OpView API.
Index: mlir/tools/mlir-tblgen/OpFormatGen.cpp
===================================================================
--- mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -1641,7 +1641,7 @@
lastWasPunctuation);
// Emit a whitespace element.
- if (NewlineElement *newline = dyn_cast<NewlineElement>(element)) {
+ if (isa<NewlineElement>(element)) {
body << " p.printNewline();\n";
return;
}
Index: mlir/include/mlir/Parser.h
===================================================================
--- mlir/include/mlir/Parser.h
+++ mlir/include/mlir/Parser.h
@@ -67,7 +67,7 @@
// contain the operations inside of it.
if (failed(op.verify()))
return OwningOpRef<ContainerOpT>();
- return std::move(opRef);
+ return opRef;
}
} // end namespace detail
Index: llvm/unittests/Support/CrashRecoveryTest.cpp
===================================================================
--- llvm/unittests/Support/CrashRecoveryTest.cpp
+++ llvm/unittests/Support/CrashRecoveryTest.cpp
@@ -109,8 +109,9 @@
std::string Str = RawStream.str();
// FIXME: Handle "Depth" parameter in PrintStackTrace() function
// to print stack trace upto a specified Depth.
- if (!Triple(sys::getProcessTriple()).isOSWindows())
+ if (!Triple(sys::getProcessTriple()).isOSWindows()) {
EXPECT_EQ(std::string::npos, Str.find("#1"));
+ }
}
#ifdef _WIN32
Index: llvm/include/llvm/Support/TaskQueue.h
===================================================================
--- llvm/include/llvm/Support/TaskQueue.h
+++ llvm/include/llvm/Support/TaskQueue.h
@@ -98,7 +98,7 @@
IsTaskInFlight = true;
}
}
- return std::move(F);
+ return F;
}
private:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93981.314267.patch
Type: text/x-patch
Size: 2269 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210103/3bd7d4bf/attachment.bin>
More information about the llvm-commits
mailing list